Sunday 10 January 2010

DIY radio controller for Lego

This was an experiment with a couple of Holtek remote control encoder and decoder chips (HT12E and HT12D) together with a cheap RF transmitter and receiver pair I picked up off ebay. OK, so the chips are not really designed for controlling models (more for opening your garage doors and so on) and lego's own IR controller would probably work better but its all good fun!

The receiver connects up to the Lego Power Functions 9V battery box and drives 2 power functions motors independently with forward/stop/reverse control. I bought a couple of power functions extension cables to get the connectors.



The receiver uses a cheap RF receiver module from ebay (I got receiver + transmitter for about £9) which is connected to the Holtek H12D. The address bits are all tied to ground and the data bits feed the 4 inputs of an L293D motor driver. A 7805 +5V regulator supplies the IC's and the RF receiver circuit (since the Lego 9V supply is too high for them)


The timing resistors on the H12D receiver are 100K + 12K in series. These pair with the transmitter's 1M + 470K (I'm not sure how good these selections are but it seems to work...)

The transmitter simply drives the 4 data bits of the H12E with tactile switches (closed to ground, pull ups on open). The H12E is powered and transmit enabled all the time the transmitter is on (to make sure the "all buttons off" state is transmitted to stop the motors)

Since there is no proportional control its all a bit stop-start and sometimes I found the receiver got "stuck" while the car was spinning on the spot and I had to place the transmitter really close (I think the electrical noise from the motors might be to blame.. but I also suspect my timing resistors not be quite right)

1 comment:

  1. do you have a shematic diagram for receiver
    plizz help

    ReplyDelete