My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
DCMP  
Direct Control Mode Plus - Enhanced firmware for Robouilder
Updated Mar 22, 2011 by phil.lev...@gmail.com

What is DCMP ?

DCMP enables Robobuilder to be controlled in real-time from a PC - examples of current demos include automated balance control, real time display of accelerometer, real time display of sound sensor, real time display of battery level, real time control of PSD, whilst simultaneously producing a smooth movement generated by servo position updates from a PC.

DCMP is a custom firmware for the Robobuilder humanoid robot. Its loaded onto the RBC unit using the RBC upload tool that comes with robot. See manual for instructions. The firmware puts the robot into "Direct Control mode" where servo commands to the serial port are transferred to the bus the servo are connected to. Any responses from the servos are transfered back to the PC.

Why use DCMP?

Direct Control Mode Plus - provides high speed access both to direct control servos and to the RBC units sensors enabling applications such as:-

  • Automated Balance
  • Continuous walking
  • Real-time access to sound, accelerometer, IR and Distance sensors

How does it work

On power up, the program will directly enter Direct Control (DC) mode and show Amber and Blue PF1/PF2 LEDS - pulsing (like a heart beat!). The lights on the left hand side represent an audio power meter - the louder the sound - the more lights on. If PF2 Button is held down during power up the program will enter re-charge mode - and a green power LED will flash.

DCMP provides direct access to Wck Bus to enable Servos to be controlled via serial port. In order to access additional a capabilities "The Plus" it intercepts a "servo read position" for servo ID 30 with the following data parameter and then returns a two byte data response, contain the information requested:

Details

cmdvaluesDescription
0Get Version New Reads the version 1st Byte Major value 2nd Byte the Minor value
1Get Y & Z Reads the accelerometer 1st Byte Y value 2nd Byte the Z value
2Get X & Z Reads the accelerometer 1st Byte X value 2nd Byte the Z value
3PSD on Set the Proximity Sensor Device on - for distance measuring
4PSD off Sets PSD off - i.e. powers down - takes at least 50ms to turn back on
5Get PSD Reads the current value of the PSD returned 1st byte 10-50 cm
6Get Voltage Gets the voltage - in mV - High byte / low byte
7Read IR Gets the current value of IR remote in 1st byte - 255 if nothing pressed. 2nd Byte contain PF1 & PF2 state (low when pressed)
8sampling on turns sound sampling on - activates 3 bar meter on RBC unit
9sampling off sampling off
10Read sound Returns the current sound buffer - 2 bytes, average of last 8 samples (4ms each)
11Read timer gets the current up time of robot in second:minutes
12Get MIC level Sample mic level 50 times and returns average
13I2C_read New Send a byte sequence and return a byte sequence from I2C bus (START-SEND-ACK-{READ-ACK}n-STOP
14I2C_write New Send a byte sequence to I2C bus (START-SEND-ACK-STOP)
15Read sensors New Send a byte sequence PSD, X, Y, Z, IR, Buttons, Snd level Bytes returned - Note change of order from r317
16Sound buffer New Send sound buffer first byte length followed by bytes
65 - 90Play Sound: Plays built in sound i.e. 65 = sound1, 66 sound 2 etc

Note:

  • cmds 13,14 are new from release r229
  • cmds 0,15,16 are new from release r311 (version 3.10)

LISP example programs using the RobobuilderLib.dll that run on a PC will be available to demo the capabilities. cmd 15 is supported by a new wckReadAll function.

Comment by pbenai...@gmail.com, Aug 14, 2010

Little error in this tableau, cmd 1 is Y & Z and cmd 2 is X & Z ;-)

Line 918 in wckMotion.cs :-)

Comment by project member phil.lev...@gmail.com, Aug 16, 2010

good thanks - now updated


Sign in to add a comment
Powered by Google Project Hosting