|
|
RoboSapienPet's Super Sapien Mods |
|
Thursday, 01 February 2007 12:57 |
NOTE: the following are DIY Do-It-Yourself hardware and software modifications to the commercial RoboSapien robot.
This is not a commercial kit.
You should have some experience with soldering and small electronic projects.
The hardware mods are not designed to be reversable (ie. no sockets, although possible not worth the hassle).
The mod is designed to be simple, using inexpensive and commonly available parts (under $5).
Software is open source and can be compiled using freely available free tools.
Do you have the stomach for it ?
To perform this modification, you have to take off the robot's back (4
screws), chop a number of wires are re-route them to a small board
containing the 20 pin AVR chip.
Here's a photo of my modification to show the work involved.
If this looks too scary or too destructive for your tastes, then please don't attempt this modification.
Also, do not attempt these kind of modifications if you only have a single robot, and can't afford to break it.
I recommend having at least two robots (one to modify, one as backup and to use normally).
SuperSapien Mod#1 - SapAVR - Early Adopter Version
The SapAVR modification adds a second microprocessor to take over control of the robot.
This provides "higher brain functions", non-volatile storage, a PC interface, a many other things.
The second microprocessor is an Atmel 20 pin "AVR" chip (from Atmel, part AVR90S2313, under $4).
The SapAVR chip designed to work in conjunction with the built-in CPU with minimal rewiring.
All the old features and many new features can be accessed from the existing RoboSapien remote control.
Goal: Add a second brain to the robot
Constraints: Economical (under $5), single chip, easy wiring
Standard Features: all normal RoboSapien features
Enhanced User Features: many, see below
Peripherals supported: disambiguated hand and foot sensors, standard remote, serial debug terminal to PC, extra serial for CMUCam
Other Technical Features: see below
Demo movie: available (check Movies page)
The following features are available by using a modified robot
running the SapAVR firmware and a standard remote.
For Early Adopters you will need a serial connection to a PC terminal.
Eventually all the core features will be accessible by the remote.
NOTE: not all the featured mentioned below are finished in the SapAVR0.1 release.
Standard User Features
When initially started, the SapAVR is in "standard" mode which acts as a "pass-thru".
You can control the robot exactly the same as a stock RoboSapien.
The sensors and programming logic work as usual (foot and heel and toe act the same).
The only difference is the "S>>" button. It is used as a special shift for new features.
If you press a certain sequence it will turn on the "Enhanced" mode (REVIEW: safer sequence TBD).
Enhanced User Features
When in enhanced mode you can do a lot of things with the robot and the standard remote:
- Hand and foot sensors disambiguated. The foot toe and heel sensors
trigger the same routine, but the hand sensors trigger different
routines.
- Four different sensor routines for hands and feet (left hand,
left foot, right hand, right foot). Twice as many as a stock
RoboSapien.
- Currently the sound sensor is not altered by SapAVR [future work]
- Five main general purpose routines. Triggerable from standard remote.
Five times as many as a stock RoboSapien.
- An optional startup routine is run when the robot is turned on
- Six optional routines (reserved for CMUCamera operations)
- All program steps are stored in E2PROM.
They are not lost when the power is turned off (unlike the stock RoboSapien).
It is even possible to program the original brain by the SapAVR every time the robot is turned on.
- Routines can be programmed in a similar fashion to a regular RoboSapien, but with fewer restrictions and a few new features:
- there is no set limit for the size of any one routine (ie. no 6
step limit for sensor routines, or 14 step limit for the main routine)
- Total room for all program steps is 96 Bytes (not the 32 bytes in the regular memory).
With the current implementation (which can be improved) that's close to 50 program steps.
- Programs can include several movements at the same time (eg: raise left arm and right arm at the same time)
- In future, programs can include more complex conditional logic.
- In future, better power management to be added (including ability of keeping both CPUs awake)
- If you don't like the features I picked, with a little "C++" programming, you can change it! (see below)
See the SapAVR remote instruction page for more detail.
What it can't do
You can't add new sounds or motions.
Why? -
The SapAVR sends control signals to the built-in CPU.
The built-in CPU handles all the RoboSapien movement and sound.
Therefore motions and sounds are limited to what is provided by the standard RoboSapien.
Enhanced Features - PC connection, debug terminal
The AVR chip has two serial/UART ports (0->3.3V RS-232 ports).
The hardware UART is reserved for other purposes, like the CMU Cam.
A 1200baud software UART is provided to connect to your PC, either for remote control or for debugging.
I call this the 'debug terminal' or 'debug console'.
You can type in commands from the debug terminal to control or monitor the SapAVR.
Example commands:
- 'E0', 'E1', 'E2' - set mode (idle, standard, enhanced)
- 'P' - poll input sensors
- 'I' - poll IR input (code from remote)
- 'O' - send IR code to built-in CPU (to perform motions/skits)
- 'A', 'W', 'D' - direct access E2PROM
- 'L', 'R' - trigger built-in routines
See the SapAVR debug console page for more detail.
Enhanced Features - Writing your own programs
- The SapAVR0.1 firmware is mostly written in C++. It is a relatively simple program.
There are portions in assembler (for smaller size).
- You can modify or change the firmware to do anything else you like.
- Programs can be written in C++, C or assembler.
The compiler, assembler and linker tools (from WinAVR) are free.
-
Allows custom firmware programs (programmed in C++, C or assembler)
- Enabling technology for other things (like RF remote control or color tracking camera)
More Technical Features
The AVR chip has 128 bytes of RAM, 32
bytes of registers, and 128 bytes of E2PROM.
The firmware is limited to 2K of code. Code generated by the C++
compiler is a little fat, so the 2K limit is very easy to hit, so don't
write unnecessary code.
The software UART for the debug terminal is hard coded at 1200 baud (8 bit, no parity).
The hardware UART available for other things, like CMU-Cam interface (for color tracking, see Mod#2).
It is up to you how you want to use the serial ports.
Currently there are only 2 unused i/o pins on the 20 pin AVR. If you don't need both UARTs, you can free up some pins.
The logic for handling the IR input and output is provided for you.
Almost everything else is very flexible and can be easily changed.
The SapAVR CPU runs at 4MHz, stealing the clock from the
built-in CPU.
The SapAVR CPU runs at 3.3V just like the built-in CPU, so no level
shifters are needed for signals between the two.
The AVR chip can run faster if needed.
There are many other features of the AVR chip that are not exploited.
Other larger AVR chips could be used.
In this use, the AVR90S2313 part doesn't have a lot of spare RAM/ROM or
extra pins, but it is small, cheap and commonly available.
Click here if you care to hear the reasons I chose it.
Early Adopter Version
This is the "Early Adopter" version of
the modification.
In theory in the future if a generally useful set of firmware features
stabilizes, not everyone needs to burn the chips themselves (ie. one
person can do it for many other people).
For now, if you aren't planning on burning your own chips, and at least
trying to program new features in C, C++ or assembler, then you may
want to wait for other alternatives.
NOTE: In this version both the AVR chip and the debug console
serial port connector are exposed.
Currently I remove the AVR chip to reprogram the firmware. The AVR chip
does support in-circuit programming (so in future the chip does not
need to be exposed outside the case, but I think it looks cool...)
D-I-Y Modification
If interested in the Mod#1 SapAVR modification, please click on the SapAVR D-I-Y page
Mod #2
The RoboSapienPet#2 builds on the Mod#1, and adds a color and motion tracking CMUCam (CMUCam 2).
It requires a CMUCam which costs approx. $100->$200 depending on the model.
Goal: Add a self contained camera to the robot, mainly for color tracking
Constraints: Relatively economical (>$100), built on SapAVR (Mod#1), no PC connection required
Enhanced User Features: see below
Other Technical Features: see below
Demo movie: ?? maybe later.
What this is not
This is not a wireless 'spy cam'. You can
easily hook up such a spy cam and watch it on a nearby TV or your
computer.
That can be fun, but that is not the goal of this project.
This project is to give the robot self contained vision and the ability
to react differently based on the objects it sees (especially their
color).
The location of mounting the camera is up to you.
I am currently experimenting with the camera in the chest.
RoboSapien with CMUCam 2 board and more expensive camera (other variations possible).
The CMUCam consists of a camera, interface logic and a CPU to do
the color and motion detection. The "AVR" chip controls the CMUCam and
coordinates it with the features.
NOTE: there is no external control, this is a stand-alone robot with vision!
Not a wireless "SpyCam" hooked up to a TV monitor or a PC.
All vision processing and decision logic occurs on the robot itself.
- Optional features - turn the feature on/off using the standard remote control [special shift mode]
- Other features available via the standard remote control
- Color detection - robot does different things depending on the color of the object/ball he sees
- Color location - robot does different things depending where the ball appears in the camera view.
- General movement detection - allows for hand signals regardless of the color of your hand, or other movement (requires CMUCam2).
- Future work: ? Soccer behavior ? - that may be a too difficult...
|
|
|
|
|
Nasa image of the Day |
| A Chameleon Sky |  | | The sands of time are running out for the central star of this the Hourglass Nebula. With its nuclear fuel exhausted, this brief, spectacular, closing phase of a sun-like star's life occurs as its outer layers are ejected and its core becomes a cooling, fading white dwarf. In 1995, astronomers used the Hubble Space Telescope to make a series of images of planetary nebulae, including the one above. Here, delicate rings of colorful glowing gas (nitrogen-red, hydrogen-green, and oxygen-blue) outline the tenuous walls of the 'hourglass.' The unprecedented sharpness of Hubble's images revealed surprising details of the nebula ejection process and may resolve the outstanding mystery of the variety of complex shapes and symmetries of planetary nebulae. Image Credit: NASA, WFPC2, HST, R. Sahai and J. Trauger (JPL)... | | 03 Sep 2010 | | 800x600 | 1024x768 | Large | |
|
|
|
|
Link Exchange |
|
Error: no links to display
|
|
|
|