Trossen Force Sensor  Top Banner
Results 1 to 8 of 8

Thread: Holographic Halloween Robot

  1. 3rd Place Holographic Halloween Robot

    Hi Trossen,

    For Halloween, I decided to make a robot project to entertain myself and the children. The idea was to make a radio control robot that would transmit both audio and video a vehicle platform. A NTSC camera with IR illuminator is used to capture video of my head. To keep my hands free for controlling the vehicle, a body mount (remember the Blair witch project?) was made to keep the camera on my head. My head and voice is then transmitted on the UHF band (ch19) to a horizontally mounted LCD tv. The TV projects upward to a 45 degree piece of plexiglass that generates a seemingly holographic floating head!

    Video can also come from a dvd player for non-live use. Audio/mic are mixed so "Wierd Science" back ground music can be played while I talk to unsuspecting trick-or-treaters. The base platform is a shop-rider electric wheelchair
    that I picked up on eBay for $60, It needed 24V scooter battery system and a motor controller (both picked up on eBay as well).

    Next ,I needed a quality RF radio. I went spread spectrum DX6 as it has fail-safe throttle down indication that I use to stop the robot if loss of communication happens - safety is paramount with a 100lb vehicle near kids!

    Next, I used an AVR to convert the RC pulse train into a MOTOR control PWM pulse train that is then low-passed and injected into the normal joystick pot controll interface of the electric wheel chair. All mathmatical mixing and limiting is handled within the AVR. I used BASCOM AVR and the whole thing is about 100 lines of code.

    The frame of the ghost was made from Home Depot rebar. I used a mig welder from Harbor Freight. The rib cage is also rebar. Wall-mart Christmas tree lights wrapped in white hockey cloth tape adorn the ribs and the arm structure. Cheese cloth provides the tattered clothing. Party City had a hollow rubber heart. By placing White blinking Christmas lights in it, it give the illusion that it is beating while suspended in the rib cage. The whole 110V system for the lighting and the TV is run from a 400W Kragen power inverter and has a separate 12V battery system.

    The control center has a black-back mask to prevent stray light from behind me getting into the captured face shot. On the right is the DVD/mp3 player. On the left is a monitor that shows what is being transmitted (ir cam or dvd). The audio mixer is on top. The UHF transmitter is in front - I mounted a tune knob for convenience on the front to keep it "locked in". I had to hack the video sender to run off of the 12V NIMH packs that sit below the black masking plate. They provide a mechanical counter-balance that reduces the fatigue of walking around with the over-the-shoulder control center. Black hockey tape wraps wire and sponge material for comfort.

    Watch it in action by following this youtube link:

    I hope you like this project. I thought of it on October 1, I have not had much sleep since then.

    Kind regards,
    Rodger Cleye
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	hbot smaller.JPG 
Views:	318 
Size:	46.6 KB 
ID:	92   Click image for larger version. 

Name:	command center smaller.jpg 
Views:	294 
Size:	44.6 KB 
ID:	93   Click image for larger version. 

Name:	dx6and charger smaller.JPG 
Views:	291 
Size:	60.6 KB 
ID:	94  
    Last edited by Alex; 10-31-2007 at 03:33 PM.

  2. #2
    Join Date
    Sep 2006
    Carol Stream, Illinois
    Rep Power

    Re: Holographic Halloween Robot

    Nice work Rodger! Do you have any more pics, possibly more of the circuitry behind this project?

    I got you entered in our contest

    �In the long history of humankind (and animal kind, too) those who learned to collaborate and improvise most effectively have prevailed�
    - Charles Darwin

  3. Re: Holographic Halloween Robot

    This project is pure evil genius!

    I like the idea of using a filtered pwm in place of the joystick pots. That really saved you from having to redesign the motor control system.

    Also, your translucent disembodied head is creepy as hell. Nice work!

  4. Trossen Distance Sensor  Thread Banner
  5. Re: Holographic Halloween Robot

    Thanks for the kind words Dave. If you think others would benefit from me posting the code for the RC to PWM translation let me know. It was a big time saver. It isn't very glamerous - I didn't even use interrupts because the 6 channel pulses come out sequentially from the DX6. As a result, I just do simple counters that start when the pulse goes high, and stop when the pulse goes low. The DX6 is a pleasure to work with, no crystals - just rock solid RC communication when ever you want it. The other thing I did was tank control translation to normal forward / backward / left / right as this was mixed previously in the joystick (that I replaced with the RC )
    Best regards,

  6. #5
    Join Date
    Sep 2006
    Carol Stream, Illinois
    Rep Power

    Re: Holographic Halloween Robot

    Hi Rodger!

    I definitely think that others would benefit from you posting the code. Could you possibly post it in a new thread under one of the Robotics forums?

    We're looking into installing a "projects" section in the community, where community members can post code and other various projects that they've been working on, make revisions to it, and have a place that they can discuss their project. Right now, it's a matter of finding the plugin that best suits everyone's needs

    �In the long history of humankind (and animal kind, too) those who learned to collaborate and improvise most effectively have prevailed�
    - Charles Darwin

  7. Re: Holographic Halloween Robot

    Yeah, we were actually just talking about RC>PWM conversion in another thread and I'm sure some people would like to see an example.

    The DX6 sounds like a great piece of equipment. I'll have to check that out.

  8. Re: Holographic Halloween Robot

    Okay Alex.
    Well, I didn't see a place to post that made sense, so I just thought I'd post here. Feel free to move it to a place you feel will better serve the community.

    The code provided here translates a radio control pulse train (from a SPEKTRUM DX6) into pure positive PWM suitable for low passing to create DAC like results that can then be used to override the pots in an electric wheel chair for motor control via remote.

    The code is in BASCOM AVR basic and this code is so small, it should be able to compile with the free demo version of BASCOM (if not, comment out the print statement so it doesn't have to pull in the print lib)

    The PM is just an eval board with schmit inverters that hang off the IOs of ATMEGA103. The 103 is the runt of the AVR family, but it's what I had laying around. If you use a superior chip (like the 128) you can use the internal osc of 8MHz and get twice the resolution.

    You are free to copy/abuse/tweak/discuss this code at will. It is offered as is (free), I cannot promise that I will have time to clarify any of its subtle points, nor can I be responsible for bad things that arise from its incorporation into your own projects (ie rogue run-away electric wheel-chairs).

    ================================================== ================================

    'Author: Rodger Cleye
    'Controls the HBOT with a SPEKTRUM 1.2 GHz RC setup
    'DEFINE THE RF INPUT INTERFACE+++++++++++++++++++++++++++++++++++++++++ ++++++++
    'Control Sequence and polarity from a factory programmed default Spektrum DX6
    '1) Throttle: 1.1mS stick down or FAILSAFE, 1,5mS stick center, 1.9mS stick up
    '2) Aileron: 1.1mS stick right, 1.5mS center stick, 1.9mS stick left
    '3) Elevator: 1.1mS stick down, 1.5mS center stick, 1.9mS stick up
    '4) Rudder
    '5) Ger
    '6) Aux
    'The update rate/latency from (1) back to (1) is 22mS (DX6,DSM1).
    'The interchannel gap (falling edge of previous to rising edge of next) is 35uS
    'Pulses are positive.
    '81 trim increments correspond to 180uS of adjustment (+/- 90uS)
    'Each trim can go 0 +/- 40 trim ticks
    'Therefore, 2.25uS per trim tick.

    'SELECT DEVICE ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++
    $regfile = "m103def.dat"
    'SELECT FREQUENCY OF DEVICE++++++++++++++++++++++++++++++++++++++++++++ +++++++++
    Const Processor_freq = 4000000
    'The div8 fuse bit must be removed from default to get 8MHz from cal'd RC osc
    $crystal = Processor_freq
    'SELECT HARDWARE UART BAUD RATE ++++++++++++++++++++++++++++++++++++++++++++++++
    $baud = 19200
    'must be lowered to 4800baud for RF and 2400 baud for text-to-speach
    'At lower bauds, few characters can get out in a 61Hz tick. Use the tick
    'counter to send out chars over many ticks
    'CONFIGURE COMPILER STACK OPTIONS ++++++++++++++++++++++++++++++++++++++++++++++
    $hwstack = 128
    'Stack for subroutines and functions return address
    $swstack = 128
    'Used for storing local variables and passed parameters in subs and functions
    $framesize = 128
    'Used for storing compiled strings
    '----------------------SPEKTRUM TO PERSONALITY MODULE/AVR----------------------
    ' -------- ------- ----------- ----------------- --------------
    ' PD2 SIG_IN4 PM3-3 AILERON (R-l/r) Right-wheel rev/fwd
    ' PD3 SIG_IN5 PM3-4 ELEVATOR (R-u/d) Left-wheel fwd/rev
    ' OC0 PB4 14 PM6-10, U7 this signal is bypassed straight to the conn.
    ' from the conn it goes through 170 ohms to 22uF for lowpassing for BLUE TEMPEST FWD/BAK JOY
    ' OC1A PB5 15 PM6-11 same bypass as above ORANGE TEMPEST LEFT/RIGHT JOY
    ' The positive PWM is high z for the first second after powerup allowing the tempest
    ' to calibrate against the bogus pot network. Then it is driven low Z where it can
    ' overpower the bogus pot network
    Throttle_not Alias Pind.1
    Ddrd.1 = 0
    'throttle_not is an input to AVR
    Portd.1 = 0
    'No pull-up required
    Aileron_not Alias Pind.2
    'Aileron_not is an input to AVR
    Portd.2 = 0
    'No pull-up required
    Elevator_not Alias Pind.3
    'Elevator_not is an input to AVR
    Portd.3 = 0
    'No pull-up required
    Ddrb.4 = 0
    'float fb pwm (OC0) while tempest motor driver calibrates against bogus pot
    Ddrb.5 = 0
    'float lr pwm (OC1A) while tempest motor driver calibrates against bogus pots
    Tccr0 = &B01100001
    'TCCC0 is positive FAST PWM, no prescaler
    Tccr1a = &B10000001
    'TCCR1 is positive FAST PWM
    'PWM set to 8-bit
    Tccr1b = &B00000001
    'No prescaler
    'SYSTEM/MOTOR INITIALIZATION ++++++++++++++++++++++++++++++++++++++++++++++++++ +
    Const Max_pwm = 255
    Const Rw_0speed_pwm = 180
    'The exact PWM value that results in stopped forward/backward motor operation
    Const Lw_0speed_pwm = 180
    'The exact PWM value that results in stopped left/right motor operation
    Ocr0 = Lw_0speed_pwm
    Ocr1al = Rw_0speed_pwm
    'Turn motors OFF!
    Waitms 1000
    'wait 1 sec while tempest cals
    Ddrb.4 = 1
    Ddrb.5 = 1
    'Now override the bogus pots with low impedance (170ohm into 22uF) PWM drive
    Dim Count As Word
    'reset to 0 when created (as are all dimensioned variables)
    Dim Throttle As Integer
    Dim Throttle_byte As Byte At Throttle Overlay
    Dim Aileron As Integer
    Dim Aileron_byte As Byte At Aileron Overlay
    Dim Elevator As Integer
    Dim Elevator_byte As Byte At Elevator Overlay
    Const Elevator_gain_init = 1.65
    Dim Elevator_gain As Single
    Elevator_gain = Elevator_gain_init
    Dim Aileron_gain As Single
    'MAIN LOOP ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++
    'Loop through the DX6 rf sequence, convert stick to motor pwm
    Loop Until Throttle_not = 1
    'Insure throttle pulse has not started
    Loop Until Throttle_not = 0
    'Wait for rising edge of Throttle (pulse start and 22mS RF sequence start)
    Count = Count + 1
    Loop Until Throttle_not = 1
    'Wait for falling edge of Throttle (end of pulse)
    Throttle = Count
    'Transfer the pulse width
    Count = 0
    'Reset the counter for the next measurement
    Loop Until Aileron_not = 1
    'Insure Aileron pulse has not started
    Loop Until Aileron_not = 0
    'Wait for rising edge of Aileron (pulse start)
    Count = Count + 1
    Loop Until Aileron_not = 1
    'Wait for falling edge of Aileron (end of pulse)
    Aileron = Count
    'Transfer the pulse width
    Count = 0
    'Reset the counter for the next measurement
    Loop Until Elevator_not = 1
    'Insure that the Elevator pulse has not started
    Loop Until Elevator_not = 0
    'Wait for the rising edge of Elevator (pulse start)
    Count = Count + 1
    Loop Until Elevator_not = 1
    'Wait for falling edge of Elevator (end of pulse)
    Elevator = Count
    'Transfer the pulse width
    Count = 0
    'Reset the counter for the next measurement
    'PROCESS CAPTURED DATA ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
    Const Min_capture_code = 150
    'Empirically observed (lowest code of stick given this count loop timing)
    Const Max_capture_code = 255
    'Empirically observed (highest code of stick given this count loop timing)
    Const Capture_code_range = Max_capture_code - Min_capture_code
    'This was seen to be about 108 counts
    Const Capture_code_offset = Capture_code_range / 2
    Throttle = Throttle - Min_capture_code
    If Throttle < 0 Then
    Throttle = 0
    End If
    If Throttle > Capture_code_range Then
    Throttle = Capture_code_range
    End If
    'Throttle is now a positive integer spanning the capture code range
    'PROCESS AILERON (feeds left/right mix)
    Aileron = Aileron - Min_capture_code
    Aileron = Capture_code_offset - Aileron
    Dim Aileron_s As Single
    Aileron_gain = Elevator_gain / 2
    'Define turning to be 1/2 the response of forward/backward
    Aileron_s = Aileron * Aileron_gain
    'Aileron is now a signed integer spanning the capture code range (stick reversed)
    'This can now span +/- 43 pwm counts (typical)
    'PROCESS ELEVATOR (feeds forward/backward mix
    Elevator = Elevator - Min_capture_code
    Elevator = Elevator - Capture_code_offset
    'Elevator is now a signed integer spanning the capture code range (stick normal)
    Dim Elevator_s As Single
    Elevator_s = Elevator * Elevator_gain
    'This can now span approx +/- 89 PWM counts (typical).
    Const Throttle_safety_thresh = 10
    'Going below this value shuts down the motors. This happens automatically
    'with the radio's fail-safe during out-of-range or transmitter off condition.
    'This acts as a user panic/key that prevents motion if the throttle is all the
    'way down.
    Dim Lw As Integer
    Dim Lw_byte As Byte At Lw Overlay
    'lw is left wheel
    Dim Rw As Integer
    Dim Rw_byte As Byte At Rw Overlay
    'rw is right wheel
    If Throttle_byte < Throttle_safety_thresh Then
    Lw = Lw_0speed_pwm
    Rw = Rw_0speed_pwm
    'Drive pot inputs to the null point to stop the motors
    'GOOD RF - AVR overdrives pots based on processed input
    Const Left_drift_percent = 5
    'The percent of full range that the stick is moved right to correct for left drift
    'with increasing forward speed
    Const Lw_drift_fixfactor = 1 + Left_drift_percent / 100
    Const Rw_drift_fixfactor = 1 -left_drift_percent / 100
    Lw = Elevator_s * Lw_drift_fixfactor
    'Correct for slow left drift with increasing forward motion
    Lw = Lw + Aileron
    'Aileron grows + with l/r stick to right. Left wheel must speed up to turn right
    Lw = Lw + Lw_0speed_pwm
    'Add the left wheel motor null offset
    Rw = Elevator_s * Rw_drift_fixfactor
    'Correct for slow left drift with increasing forward motion
    Rw = Rw - Aileron
    'Aileron grows - with l/r stick to left. Right wheel must speed up to turn left
    Rw = Rw + Rw_0speed_pwm
    'add the right wheel motor null offset

    Const Elevator_gain_dec = .05
    'Rate per interval the gain is reduced as long as a rail condition exists
    Const Elevator_gain_inc = Elevator_gain_dec / 3
    'Rate the AGC restores gain after a correction reduction occured
    If Lw > 255 Then
    Lw = 255
    Elevator_gain = Elevator_gain - Elevator_gain_dec
    End If
    If Lw < 0 Then
    Lw = 0
    Elevator_gain = Elevator_gain - Elevator_gain_dec
    End If
    If Rw > 255 Then
    Rw = 255
    Elevator_gain = Elevator_gain - elevator_gain_dec
    End If
    If Rw < 0 Then
    Rw = 0
    Elevator_gain = Elevator_gain - Elevator_gain_dec
    End If
    'Mixing can produce over and underflows - limit to fit in the pwm bytes
    'AGC will try to correct this.
    Elevator_gain = Elevator_gain + Elevator_gain_inc
    If Elevator_gain > Elevator_gain_init Then
    Elevator_gain = Elevator_gain_init
    End If
    End If
    Ocr0 = Lw_byte
    Ocr1al = Rw_byte
    'Print "LW=" ; Lw_byte ; " RW=" ; Rw_byte
    Goto Main
    'SHOPRIDER CABLE DEFINITION ++++++++++++++++++++++++++++++++++++++++++++++++++ ++
    'RED = +24V

    'TEMPEST MOTOR CONTROLLER PINOUT +++++++++++++++++++++++++++++++++++++++++++++++
    ' I(B-) I(B-)
    ' I(B+)* I(B+)
    ' I(L-) I(L+)
    ' I(R-) I(R+)
    '* - inhibit when connected to B- (GND)
    'BLUE WIRE, LEFT WHEEL FEED FEED (.5 - 4.5V). Increasing the voltage drives harder
    'forward. 0 speed is at 2.45 volts.
    'ORANGE WIRE, RIGHT WHEEL FEED (.5 - 4.5V). Increasing the voltage drives more left.
    '0 speed is set at 2.45 volts
    'WHITE WIRE - top of left right pot (about 4.3V)
    'GREEN WIRE - bottom of left right and forward backward pots (about .4V)
    'On Off Button
    'Black / Yellow Twist - - Black - + 24v , Yellow - + 24v Switched
    'Black / brown twist -- tempest status lamp.
    'hard on - GOOD!
    'blinking slow -- battery low
    'blinking fast -- malfunction , usually with joystick - motor is in safety shutdown
    '+++ 24VDC TO 5V REG BY LT (3 Diodes keep 27V input below 25V max, 1 diode drops output to 4.6V
    'AVR PROGRAMMING CABLE ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++
    '------------ ----------
    '1 MISO- 1
    '2 PRG_PWR
    '3 SCLK- 5
    '4 MOSI- 3
    '5 RST 7
    '6 GND 2,4,6,8,10,12,16
    '7 TXD
    '8 NC
    '9 NC
    'TEMPEST JOY EMULATOR ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++
    'RED ---------6K---------- GREEN

    ================================================== ================================

    I hope this helps with your projects. Check out the Sample Electronics programmer in the BASCOM AVR
    gui. Use your parallel port and a simple cable that you can make to program your AVR all within the same basic compiling environment.

    Best wishes,

  9. Re: Holographic Halloween Robot


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Contest Entry The eyeRobot: Robot Blind Aid
    By Shrimpy in forum Project Showcase
    Replies: 16
    Last Post: 02-07-2011, 09:20 AM
  2. [ANNOUNCE] Rat's Life: robot programming contest
    By omichel in forum Robotics General Discussion
    Replies: 4
    Last Post: 09-19-2008, 02:13 PM
  3. Kondo web page translated.
    By Droid Works in forum Humanoids, Walkers & Crawlers
    Replies: 4
    Last Post: 10-06-2007, 05:49 PM
  4. Contest Entry Make a wall avoiding robot! Part 1
    By Brandon121233 in forum Project Showcase
    Replies: 16
    Last Post: 09-12-2007, 04:41 PM
  5. Ping Pong robot
    By stefano.antonelli in forum Arbotix, Microcontrollers, Arduino
    Replies: 7
    Last Post: 08-13-2007, 08:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts