Difference between revisions of "TourRobot"

From Nottinghack Wiki
Jump to navigation Jump to search
(Created page with "{{Project|primary=Michael Erskine‎}} thumb|350px|Michael playing on the MAME machine during Barcamp 2011 Home arcade mach...")
 
(purge)
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Project|primary=[[User:Msemtd|Michael Erskine]]‎}}
+
{{Project|primary=[[User:Chunky|Matt Little]]‎}}
 +
=Overview=
 +
Giving tours around the hackspace takes time and effort.
 +
So the obvious solution is to build a robot to do it.
  
[[File:Michael-mame-DSCF3105.JPG|thumb|350px|Michael playing on the MAME machine during Barcamp 2011]]
+
Here are the details and build log.
Home arcade machine revamp
 
  
Update 01/10/2012
+
==Base Unit==
  
New screen - huge CRT VGA monitor with some screenburn and limited resolution
+
Basic base is the blue robot from [http://en.wikipedia.org/wiki/Real_Robots Real Robots Magazine]. I got this from a car boot sale and, at the first Arduino 101 day I fixed my arduino base to the robot.
 +
There is loads of detail on the [http://lpilsley.co.uk/cybot/ Lpilsley Cybot here].
  
  
Update 08/10/2012
+
==Motor Control==
  
Performance woes with SDLMAME in fullscreen.
+
The motor control unit has been left in to power the motors. Details on the circuit diagram are [http://lpilsley.co.uk/cybot/driver.htm here].
* tried a fresh PC with oodles of CPU/RAM - same result!
 
* registered on SDLMAME forum but registration needs approval - still waiting
 
* posted findings on MAME subreddit - general advice is "you need a much faster PC/GFX card to run SDLMAME these days"
 
* need to obtain and drop back to ancient xmame version
 
* find or make a slimmer case for new PC
 
  
Update 12/10/2012
+
==Audio Output==
* xmame (0.106-3.2 from http://packages.debian.org/source/squeeze/xmame I think) installed from the Debian package
+
An audio module [http://www.embeddedadventures.com/datasheets/MOD-1007_hw_v4.pdf MOD-1007 from Embedded Adventures] has been added for the tour audio. This uses 3v3, which is taken from the Arduino, although for high volumes this does not have enough current. A seperate regulator might be required.
* scaling problems again and now ALSA sound issues which might be down to the slow video rate
+
Follow the data sheet to see how to play different files using the serial data lines.
* a lot of messing around found a good video setup:
 
** xmame -video-mode 1 -fullscreen -fm 640x480x16 defender
 
* still need to work on the video modes and the general settings for performance
 
* wahcade setup required
 
* keyboard setup for all games
 
  
* http://www.anti-particle.com/forum_phpbb3/viewforum.php?f=2
+
==Line Following==
* http://wahki.mameau.com/index.php?title=Main_Page
+
There is also a line follower with a [http://lpilsley.co.uk/cybot/follower.htm circuit diagram here].
  
 +
==Brains==
 +
The Arduino is a Duemilanova with an ATMega328. I might upgrade to an Uno if needed.
  
----
+
===Arduino I/O Pins===
  
 +
====Digital====
 +
*0 -> Rx
 +
*1 -> Tx
 +
*2 -> Motor 1 Forward
 +
*3 -> Motor 1 Backward
 +
*4 -> Motor 2 Forward
 +
*5 -> Motor 2 Backward
 +
*6 ->
 +
*7 ->
 +
*8 ->
 +
*9 ->
 +
*10 -> Top switch Microswitch
 +
*11 -> RESET Sound Module
 +
*12 -> CLOCK Sound Module
 +
*13 -> SDATA Sound Module
  
 +
====Analog====
 +
*A0 -> LDR 1
 +
*A1 -> LDR 2
 +
*A2
 +
*A3 ->BUSY Sound Module
 +
*A4
 +
*A5
  
The development pages from some years back: http://www.tecspy.com/arcade
+
==Modes==
 +
I'd like it to work in different modes. These include:
 +
*Light finding
 +
This finds the brightest point in a room
 +
*Random movement
  
** recover games (and most importantly, the high scores) from the dead laptop
+
*No movement
*** HDD totally dead :( Need to obtain ROM sets again
 
** mamed front end http://phulshof.home.xs4all.nl/mame.html - compile and tweak
 
** better linux distro base - have kubuntu 7.10 - want Knoppix 6
 
** rewire controls matrix - should take a couple of hours
 
** Noisy fan on PC - heatpipe? ideas please
 
** Priority! Gauntlet rev 14 http://www.rom-world.com/file.php?id=23575
 
  
Update: 22/07/2011
+
*Volume controlled/Silent mode
  
I have now replaced the replacement PC!
+
=Collision Avoidance=
Seems to work mostly but some full system freezes have happened :(
+
==Ultrasonic Distance Detection==
  
MAMED has now been built and it works! After all these years the SDL libs are still compatible.
+
To start with I thought about using the Cybot Sonar Board.
 +
Distance is found using ultrasonic sensors re-purposed from the original Real Robot.
 +
These have [http://lpilsley.co.uk/cybot/sonario.htm circuit diagrams here].There is a [http://www.cybench.co.uk/cybot/sonar.php load more information on how the Ultrasonic sensors (called the "sonar board") works here].
  
The keyboard controller seems to work!
+
The microcontroller needs to output 8 pulses, each of 12.5uS length. Period is 25mS, which is an output frequency of 40kHz. Output is generated every 25mS.
  
* more button wiring to do
+
On the Sonar Board:
* more tweaking of mamed config
+
*Pins 5/6 are for the piezo outputs.
* more USB PlayStation2 contollers on the way
+
*Pins 2/3/4 requie 10k pull-ups.
 +
*Pins 2/3 are left/right input gating.
 +
*Pin 4 is the output
 +
The concept is:
 +
*Send a short blast of 40kHz output.
 +
*Wait a short while (so we dont pick up the signal due to the Tx/Rx being very close to each other).
 +
*Listen for the echo reply. The time it takes is a direct indication of how far away the object is. Sound travels at 343.2m/s at sea-level and at 20C.
  
TODO: [[User:Msemtd|Michael Erskine]] 09:06, 7 December 2011 (EST)
+
This was all looking a bit too complex. I decided to look around for easier to use boards.
 +
I was told about the [http://users.ece.utexas.edu/~valvano/Datasheets/HCSR04b.pdf HC-SR04] and [https://docs.google.com/document/d/1Y-yZnNhMYy7rwhAgyL_pfa39RsB-x2qR4vP8saG73rE/edit more details here]. and bought 2 on eBay for £6 delivered.
  
* replace LAN cable run from members room
 
* minimal Xorg server installation with BlackBox window manager or equivalent
 
** replace GDM with straight startx as low-permissions user
 
** replace XFCE with plain X init straight into mamed front end
 
* screen bezel fitting
 
** mark screen geometry when bezel fitted and screen in position
 
** router work on sizing and chamfer
 
** blackout tape and foam padding
 
 
Update: 05/04/2012
 
 
The machine is now in the studio (again!) and we have a working PC with a recent Xubuntu, functional mame install and all three DVDs of ROMs installed. The next stage is to get the mamed front-end starting automatically as an unprivileged user.
 
 
* Where I would previously have just used inittab, Ubuntu now uses upstart: -
 
** https://help.ubuntu.com/community/UbuntuBootupHowto
 
** http://upstart.ubuntu.com/cookbook/
 
* so we could have xdm (or equivalent) auto-login as the mame user and have their xinit launch mamed as the only X client
 
** create user and give access to all the files required
 
 
[[Category:Projects]]
 
[[Category:Projects]]
 
[[Category:Projects (in progress)]]
 
[[Category:Projects (in progress)]]

Latest revision as of 15:10, 7 February 2019

TourRobot
[[{{{image}}}|border|frameless|220px|center]]
Primary Contact Matt Little
Created {{{created}}}
Completed {{{completeddate}}}
Dormant {{{dormantdate}}}
Version {{{version}}}
Members {{{members}}}
Manufacturer {{{manufacturer}}}
Model {{{model}}}
Location [[{{{location}}}]]
GitHub / Repo {{{repo}}}
Status {{{status}}}
Type Undefined
Live Status {{{livestatus}}}
QR code

Overview

Giving tours around the hackspace takes time and effort. So the obvious solution is to build a robot to do it.

Here are the details and build log.

Base Unit

Basic base is the blue robot from Real Robots Magazine. I got this from a car boot sale and, at the first Arduino 101 day I fixed my arduino base to the robot. There is loads of detail on the Lpilsley Cybot here.


Motor Control

The motor control unit has been left in to power the motors. Details on the circuit diagram are here.

Audio Output

An audio module MOD-1007 from Embedded Adventures has been added for the tour audio. This uses 3v3, which is taken from the Arduino, although for high volumes this does not have enough current. A seperate regulator might be required. Follow the data sheet to see how to play different files using the serial data lines.

Line Following

There is also a line follower with a circuit diagram here.

Brains

The Arduino is a Duemilanova with an ATMega328. I might upgrade to an Uno if needed.

Arduino I/O Pins

Digital

  • 0 -> Rx
  • 1 -> Tx
  • 2 -> Motor 1 Forward
  • 3 -> Motor 1 Backward
  • 4 -> Motor 2 Forward
  • 5 -> Motor 2 Backward
  • 6 ->
  • 7 ->
  • 8 ->
  • 9 ->
  • 10 -> Top switch Microswitch
  • 11 -> RESET Sound Module
  • 12 -> CLOCK Sound Module
  • 13 -> SDATA Sound Module

Analog

  • A0 -> LDR 1
  • A1 -> LDR 2
  • A2
  • A3 ->BUSY Sound Module
  • A4
  • A5

Modes

I'd like it to work in different modes. These include:

  • Light finding

This finds the brightest point in a room

  • Random movement
  • No movement
  • Volume controlled/Silent mode

Collision Avoidance

Ultrasonic Distance Detection

To start with I thought about using the Cybot Sonar Board. Distance is found using ultrasonic sensors re-purposed from the original Real Robot. These have circuit diagrams here.There is a load more information on how the Ultrasonic sensors (called the "sonar board") works here.

The microcontroller needs to output 8 pulses, each of 12.5uS length. Period is 25mS, which is an output frequency of 40kHz. Output is generated every 25mS.

On the Sonar Board:

  • Pins 5/6 are for the piezo outputs.
  • Pins 2/3/4 requie 10k pull-ups.
  • Pins 2/3 are left/right input gating.
  • Pin 4 is the output

The concept is:

  • Send a short blast of 40kHz output.
  • Wait a short while (so we dont pick up the signal due to the Tx/Rx being very close to each other).
  • Listen for the echo reply. The time it takes is a direct indication of how far away the object is. Sound travels at 343.2m/s at sea-level and at 20C.

This was all looking a bit too complex. I decided to look around for easier to use boards. I was told about the HC-SR04 and more details here. and bought 2 on eBay for £6 delivered.