VintageCharlie

Custom Arduino lights/sound controller for automotive LEGO builds

Recommended Posts

Hi guys,

for my 69 muscle car project i decided to try building custom electronics. I get the idea of a pure LEGO approach - it is an interesting challenge, etc., but the solutions take up lots of space and the possibilities are rather limited.

So what i was thinking about is a package that would handle most of the typical automotive needs for lighting (and maybe additionally also the sounds, but that is optional, which is fine, as this approach would be pretty much modular by it's nature), it would be compatible with the standard LEGO IR control, IR receiver and battery box. Functions/features would include:

LIGHTS (All lights would go on and off with a short and smooth natural intensity gradient like on real lights):

- automatic left/right turn signals

- automatic reverse signal

- rc on/off switchable rear and front day lights

- rc on/off switchable main headlights

- rc on/off switchable emergency lights

- rc on/off switchable rotating beacon lights (8 LEDs in each of 2 beacons)

- rc switchable flashing patterns for beacon lights

SOUNDS:

- rc switchable automotive and/or thematic sounds

From what i could gather, it would be possible to make such a system out of the following (of course there are many alternatives, but Arduino seems to have many advantages over most other ways):

- Arduino Micro board (~2x5cm)

jaycon_systems_promicro_1.jpg

small IR receiver (for the extra RC switchable, non-automatic signals). From what i read here: http://www.hackvande...id=547#buildlog , seems like the TSOP4136 is a good option:

Vishay-TSOP4136..jpg

This would be it for the main parts, if no sound functionality would be desired.

For sound one would need to add these:

An SD card based audio module like the SOMO-14D (2x2cm)

09534-01.jpg

Ideally also an amplifier, here is a TPA2005D1 (but there are even smaller options than 2x2cm boards out there):

11044-01a.jpg

If sound functionality is desired, then one would additionally need an SD card audio module, a tiny amplifier and a small speaker.

The lights only controller which would essentially be handled by the Arduino micro board (~2x5cm)) would fit easily in a 5x11 LEGO flat panel and leave additional space for other components. For sound you would add a ~2x2cm SD card based audio module and ideally also an amplifier (can also be found in ~2x2cm size and even much smaller). A system with integrated sound functions could be sandwiched within 2 5x11 flat panels like this; without sound modules it would fit a single 5x11 flat panel:

blackbox-1.png

The flat panel-based housing would allow many ways of connecting it to builds and also leave some room for additional parts/modules, if necessary. It also enables various ways for wire-routing.

A single flat panel without the modules for sound (if these are not desired) could be easily fitted into roofs, hoods, base plates, etc. and the system would not be challenge to be structurally integrated and/or hidden from sight.

A fitting name might be - The Black Box Controller

The arduino micro has 7 PWM outputs, which allow for modulated LED intensities and hence realistic lighting effects can be achieved. If i am not mistaken, then this system would allow all the standard lighting functions of a car, plus the control of an advanced rotating beacon system, similar to what Zmei has made. I found this one, made by Catmacey: http://catmacey.word...sing-pic12f683/ Some more info: http://catmacey.word...raid-to-use-it/ And here it is in action: http://catmacey.word...eacon-for-lego/

The cool thing about this design is that it can run 8 LEDs on just 4 pins, which minimizes number of wires, makes the whole thing more reliable and easier to manage. Hence, the 3 other PWM outputs left would be even enough for more realistic turn signals (with smoother transients than just on/off) and even for the reverse and day-lights to go on with a short and smooth transient, which would result in a more realistic and aesthetic lighting.

The beacon LED's could be programmed for any other layout, not just rotating beacons.

On the control side of things, the standard LEGO IR joystick remote could be used with this. The simplest and most efficient way (and most appealing to me personally) would be to set the controller up so that the automated signals (left/right tun, reverse) are received from the standard LEGO IR receiver along with the corresponding drive commands for the motors. While the switchable lighting options would be available from the same remote, by selecting a different channel to which the additional IR receiver is tuned. By adding a second joystick remote control it would be possible to get instant access to the switchable functions without the need to switch channels - but that would be optional and easy to configure either way.

This is approximately, what i would like to attempt building. Initially probably without the sound funcitonality - to keep cost lower and to make things more manageable, as i am an electronics beginner at best.

I have seen people making various kinds of such functions in many different ways, but it's mostly just one or the other function and each time with different parts. I thought it would be great to make an attempt of an integrated system that can be easily improved/programmed and that is modular in its nature. Something, that almost everyone willing to go with custom electronics for his build, could easily utilize for his needs.

This would also be a quite cost-efficient solution. The most expensive part being the micro Arduino board at ~25$. The advantage of it is, that it does not require any additional hardware to connect to a PC for programming. And the size/functionality is hard to beat and it is totally modular. If one only needs the automated turn and reverse signals, you can even leave out the extra IR receiver.

Well, so far my idea. My problem is that i am a noob in electronics, and totally ignorant in regard to programming. Hence i am very intrigued, if there are people here, who would be interested to participate into developing something like this and making instructions available to public. It would be a cool arduino project and it would make great custom electronics for lego (and other) builds easily accessible to almost anyone.

Edited by VintageCharlie

Share this post


Link to post
Share on other sites

I understand it is an ideological question. As i noted above, i am not a purist - i think the builds can become much more attractive, interactive, playable, functional and fun with custom light controls, also custom chrome parts is another area where the builds profit greatly in regard to the aesthetics. Why not - i mean, we are not official LEGO designers who have to deal with restrictions from production and sales volumes, etc. And many guys have done some elements of all this one way or another for their builds. I think it would be great to have a highly customizable system and one would not have to reinvent the wheel each time he would like to add something as simple as flashing turn signal to his build. Also, look at the third party market for custom LEGO electronics (mostly lighting) there are so many products, but none of them would come even close to this. Also in regard to cost, this would be unbeatable compared to what you would fork out for ready-made solutions.

Edited by VintageCharlie

Share this post


Link to post
Share on other sites

I can help you if you write - while problem do you have. I can develop any part from this (progrsmm, board, etc. except LEGO).

Share this post


Link to post
Share on other sites

It sounds like it's very much still in RND. Why create a new thread?

Share this post


Link to post
Share on other sites

Grum64, thanks for the links. I have seen their products. They are prbably a good bet, if you just want to add simple light systems. But you end up paying a lot if you want to make something more complicated (each module about 20$) and the programmability/customization of the more complex system is quite limited. Also, rotating beacons would not be possible, neither an extra IR receiver, etc.

Bzroom, i started a new thread because the previous one helped me to grasp what might be possible and what might be the most effective platform (mostly thanks to your extensive and valuable input) and it dealt with various alternative ways for a partial set of features. The concept became quite a bit more ambitious than i initially thought and i arrived at a more clear idea about the system. Hence i wanted to begin a new thread that takes off with this basic concept, with Arduino at heart.

Serg, thanks for the note! It would be great if you would be willing to participate in the development of the controller.

I imagine it would be a great open source project - i would not be into making money from this - it would be based on volunteer participation. I hope this would be ok with you.

I'm about to buy a Arduino micro board and am looking into an IR receiver best suited to operate with the lego IR remote control.

Here is some information on the LEGO IR receiver (which to me is mostly alienese):

http://www.philohome...ons_RC_v110.pdf

For now it looks like TSOP4136 would be a good choice (it was used by a builder, who made a custom small form factor IR receiver for the LEGO remote): http://www.hackvande...id=547#buildlog

Do you have some sort of Arduino board at your disposal for the development?

Edited by VintageCharlie

Share this post


Link to post
Share on other sites

Grum64, thanks for the links. I have seen their products. They are prbably a good bet, if you just want to add simple light systems. But you end up paying a lot if you want to make something more complicated (each module about 20$) and the programmability/customization of the more complex system is quite limited. Also, rotating beacons would not be possible, neither an extra IR receiver, etc.

No problem. As you say, it's a good system for simple lighting needs but understand it's got limitations that rule it out for your requirements.

I wish you luck with your project. I'll be following your progress with great interest.

And on that note...

... i would not be into making money from this - it would be based on volunteer participation. I hope this would be ok with you.

A statement of great generosity and proof, if ever it were needed, that Eurobricks members really are the friendliest and most helpful people on the 'net.

Share this post


Link to post
Share on other sites

Grum64, thanks for the links. I have seen their products. They are prbably a good bet, if you just want to add simple light systems. But you end up paying a lot if you want to make something more complicated (each module about 20$) and the programmability/customization of the more complex system is quite limited. Also, rotating beacons would not be possible, neither an extra IR receiver, etc.

Bzroom, i started a new thread because the previous one helped me to grasp what might be possible and what might be the most effective platform (mostly thanks to your extensive and valuable input) and it dealt with various alternative ways for a partial set of features. The concept became quite a bit more ambitious than i initially thought and i arrived at a more clear idea about the system. Hence i wanted to begin a new thread that takes off with this basic concept, with Arduino at heart.

Serg, thanks for the note! It would be great if you would be willing to participate in the development of the controller.

I imagine it would be a great open source project - i would not be into making money from this - it would be based on volunteer participation. I hope this would be ok with you.

I'm about to buy a Arduino micro board and am looking into an IR receiver best suited to operate with the lego IR remote control.

Here is some information on the LEGO IR receiver (which to me is mostly alienese):

http://www.philohome...ons_RC_v110.pdf

For now it looks like TSOP4136 would be a good choice (it was used by a builder, who made a custom small form factor IR receiver for the LEGO remote): http://www.hackvande...id=547#buildlog

Do you have some sort of Arduino board at your disposal for the development?

I have same arduino controllers(uno, leonardo, mega) and how yours. I have other part except IR but it's not problem.

I have time +6 UTC so i can't answer fast.

Share this post


Link to post
Share on other sites

I need LEGO remote controller for tests. May be you have old remote controller. I try asc it in ours shops but don't sure. I haven't seen it at the our shops.

I understand "LEGO Power Functions RC" well.

But perhaps I will use other type photodiode. If can't find TSOP4136.

Share this post


Link to post
Share on other sites

I need LEGO remote controller for tests. May be you have old remote controller. I try asc it in ours shops but don't sure. I haven't seen it at the our shops.

I understand "LEGO Power Functions RC" well.

But perhaps I will use other type photodiode. If can't find TSOP4136.

Serg, thank you very much for participating in this project! Unfortunately i don't have a spare controller. Besides, it is not that expensive (the 2 joystick version is about 10$ new) and if i'd ship one, the shipping would be probably more expensive than if you'd bought a new (or used) one from an internet shop in your country. But in case you do not want to invest into a new LEGO IR remote for this project (which i'd understand), please let me know where you're from and i'll see, if i can purchase one online and send it your way for a reasonable shipping price.

I'm sure other photo diodes would work too, but i read in the blog that i linked, where the guy copied a LEGO IR, that the TSOP4136 is one of the few easily available receivers that does 6 cycles (or something along those lines) which supposedly is why it works well with the LEGO IR remote. I understand too little from this, to help with specs and which alternatives would work well. Maybe a more knowledgeable member here might give some advice?

I will order an Arduino Micro as soon as we have an idea which IR receiver will work well with the LEGO remote (want to order these things together, as they are hard to come by in my country and i want to avoid double shipping costs).

Edited by VintageCharlie

Share this post


Link to post
Share on other sites

About controller, I will know exactly tomorrow.

From ebay I must wait about two weeks or more.

But in case you do not want to invest into a new LEGO IR remote for this project (which i'd understand)

Why not. I can invest some money for hobby.

Just I looking for faster and cheapest way.

Share this post


Link to post
Share on other sites

Btw. here is an easy way to get the TSOP 4136 receiver: http://www.ebay.com/itm/VISHAY-TSOP4136-PHOTODIODE-IR-RECEIVER-36KHZ-/390852082600?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item5b00997ba8

It ends up being quite expensive with the shipping for just one part, but on the plus side, it has been confirmed that it works well with the LEGO IR remote, so despite the price, this might be an option.

Share this post


Link to post
Share on other sites

Ordered IR remote from ebay.

Can't find SOMO-14D. Found analog

Bought noname IR reciver. Very same how TSOP4136.

IRP.jpg

If I will have time Today evening. I'm going to try it.

Share this post


Link to post
Share on other sites

Great news, thanks! I think i will go ahead and order the Arduino Micro, a breadboard and a couple of IR receivers - maybe the TSOP4136 and then something that is specwise identical to what you bought. Hence, could you please share the specs of the IR receivers you purchased?

Share this post


Link to post
Share on other sites

I don't have spec for noname part.

I will go to buy original part through internet later. But I must wait them about two weeks. So I buy noname parts for test.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.