Open Lego Power Functions RC

At this moment I’m working on making an open source Lego Power Functions receiver, with the same functionality as the ‘normal’ infrared receiver, but with some extra features:

  • Servo output
  • Xtra small size (standard 2×4 Lego brick)

How did this get started?

Some months ago my nephew asked Lego Power Functions for his birhtday, and it triggered my interest immediately. Motors, batteries, LED lights in combination with LEGO, that sounded like what I had been doing with my brother years ago (he building the lego, me adding lights and sound and locomotion). After searchin a bit on the internet I found that LEGO has ‘opened’ the standard they use for the infrared protocol, and published a nice pdf with protocol info. So far, no one has made an open source receiver. I thought it would be interesting to see if I could  squeeze the receiver into a standard brick, and then let others build new and amazing constructions with that brick. Back to my roots: me doing electronics while someone else uses those electronics to build nice LEGO contraptions!

What is the status?

I’ve coded most of the protocol, only the ‘timeout’ feature has to be implemented. I’ve used an Atmel Attiny44A as microcontroller, and a TSOP4136 infrared receiver. I can now succesfully receive the two modern remote controls, still have to test the old fashioned train controller. Servo output is now also working on my prototype. I still have to finish my design, see how well the code behaves and measure some features of the original receiver to better mimic its behaviour in cases that are not -completely- described in the protocol document

What are plans for the future?

I’ve ordered PCB’s for a final / better prototype including motor controller, and I want to test that before making any sources public. When I’m happy with the performance I’ll open source everything: schematic, board file, firmware and my design considerations. Also, I’m planning to do some writeup on the codes used by several transmitters.

Are you looking for help?

Well, maybe someone could help me build a nice LEGO vehicle using (and showcasing) the small form factor. You’d need to house a battery, a 2×4 LEGO brick and any motor / servo to your liking.

Can you show us something?



Stay tuned for more!

3 thoughts on “Open Lego Power Functions RC

  1. Andreas says:

    Hey! I really like the idea and i’m looking forward to see your “final” solution.
    Currently i’m working on a similar project, but on quite another level. My plan is to use a cheap 8-9CH 2.4GHz Remote Control (Turnigy, ~55$) and basically build a circuit board that converts/amplifies the signals from the receiver to drive up to 8 LEGO DC motors with bipolar PWM-Signals. I’m currently still developping the complete schematics, so i cant really say how big the complete board/receiver will get. As signal converter i plan to use either a MSP430 or maybe a cortex M0 (i’m used to work with cortexes, so that would be easyer for me to set up).
    I guess it would be much more fun to play with the LEGO models if the controllers were a bit more advanced, and maybe others feel that way too?!

    • admin says:

      Hello Andreas,
      Thanks for your comment. The product is FINALLY getting to a state where I dare to release it; I’ve had quite some trouble with the motor drivers. If you plan to make your own receiver, please consider using my code. I’ll be glad to help out if anything is unclear!

  2. Roel says:

    I’m looking for your results in researching the old RC protocol.
    I’ve build a program for running 4 PF trains based on Arduino:
    But now I need to reverse engineering the older RC IR protocol.
    So to save some time maybe some info is already available.

    I’m curious,
    regards, middle of Holland

Leave a Reply

Your email address will not be published. Required fields are marked *