Jump to content

Recommended Posts

Posted (edited)

Hi folks,

i'm working on a monster truck model that in it's first version most likely will go on top of a 9398 chassis. It has all lights that a real car has and i would like it to have automatic turn and reverse signals. Here's the model in it's current development state:

69CRAWLERDEFNEWWIDEBRWRENDERblackfenderscropped.png

But as space will become pretty tight fast, i would like to do this without an extra motor and the switching system that can be done with LEGO parts alone. Instead i'd be interested in building a compact custom pcb that controls the lights.

I have very little understanding of electronics and have built only basic stuff - like some guitar pedals, nothing to program, etc. So i can follow schematics/instructions, but i don't have any of the interfaces/advanced instruments for stuff that includes coding, etc. (though i could ask a friend, who is a pro, to program it for me once it is made, providing someone has written some code for this already).

This model here seems to have all the functions in regard to the lights that i'd be after:

Unfortunately i could not find more info about this project.

I'd need the lights to work in sync with the driving/steering functions of the model. Has anyone done something similar in a compact form factor, are there any links or info you could share?

Thanks a bunch in advance!

Edited by VintageCharlie
Posted

small arduino would be a good option!

I'm totally new to this. I have seen the name Arduino come up in the context of LEGO, but i have no knowledge of it, apart that it is a hardware/software package that is widely customizable. Would what you refer to as a small arduino board be something like this?: http://www.microduino.cc/Modules/Microdoino%20Core%20Modules

which is the smallest board available that would allow me to do such a simple task as turn/reverse light control (probably in conjunction with an extra IR receiver or maybe the signals from the LEGO IR receiver)? What would i need as minimum in order to program it/connect it to a pc to set it up, etc.? (if possible a low-budget solution would be good for this, as the price of the model will add up quite fast).

Thank you very much for the tip!

Kind regards,

VIntageCharlie

Posted

that would work indeed I guess! making your own PCB is quite a challenge if you are totally new to microcontrollers etc. so I would definitely start with an Arduino (actually an Arduino UNO, it is large, but helps you to understand the Arduino and then use an Arduino clone like this (or a Teensy, they are also very nice). Alternatives are Attiny based arduino like boards.

Posted (edited)

that would work indeed I guess! making your own PCB is quite a challenge if you are totally new to microcontrollers etc. so I would definitely start with an Arduino (actually an Arduino UNO, it is large, but helps you to understand the Arduino and then use an Arduino clone like this (or a Teensy, they are also very nice). Alternatives are Attiny based arduino like boards.

Teensy looks great to me as it already has the integrated usb connection - makes it a bit bigger, but i don't need any extra addons or gear to program it. If i understand it correctly, this would allow me to attempt to run something like these police light beacons (http://catmacey.word...sing-pic12f683/) from the same board along with the turn and reverse signals? Apart from the leds and resistors that i'd need to connect, is there anything else i would need hardware-wise? Or would everything else be a question of programming?

Edited by VintageCharlie
Posted

in fact you don't need resistors (officially you do, but the microcontroller can not deliver too much power to burn out the LED), I have a library for an IR receiver etc.

Posted

You could use a microprocessor, or you could do it old school. You'll want some extra power functions wires you can cut up, that way you can piggy back off the receiver outputs. Then you'll be looking at two voltage lines, one for drive, one for steering, you'll use 3 triggers, Left (-steer), Right(+steer), and Reverse (-drive). Put a 555 blinker circuit on the common leg of the turn signals. That should do it!

Posted

Check Sariel's webpage, he has a LEGO solution for this and has implemented it in number of his MOCs (last Hummer, for example).

Posted

Check Sariel's webpage, he has a LEGO solution for this and has implemented it in number of his MOCs (last Hummer, for example).

Sariel's solutions use PF motors but the OP is looking for something that uses much less space.

Posted

Guys, thank you very much for the various tips and info! Alasdair Ryan, this was my first idea, as it involves the least technical expertise, but fitting the bulb into pins, which i should ideally be able to, is an issue - it would work well with a 3mm LED though, hence i dropped that idea. Also it adds bulk to places that will probably end up quite crowded. Blakbird, thanks, but, yes, that would be too big for what i can pull off in this model and i am not really concerned with it being 100% pure lego model in regard to the electronics. JopieK, thanks the arduino route seems promising and it is the route which offers most flexibility and optiosn for future - like police beacon control, etc.

You could use a microprocessor, or you could do it old school. You'll want some extra power functions wires you can cut up, that way you can piggy back off the receiver outputs. Then you'll be looking at two voltage lines, one for drive, one for steering, you'll use 3 triggers, Left (-steer), Right(+steer), and Reverse (-drive). Put a 555 blinker circuit on the common leg of the turn signals. That should do it!

Bzroom, your advice would fit my abilities (or lack thereof) the best. Sounds simple and straight forward and after looking at the 555 circuit this is something that i comprehend. The programming stuff of a processor would be a whole new universe for me and i would rely heavily on the help of more knowledgeable guys to pull it off. I might try the arduino pcb at some point - probably for police light beacons or similar stuff, but if what you propose for the blinkers and the reverse light is really as straight forward as you described it, that would be my best bet for these things.

So i would basically get 1 PF cable, connect it to the same spot as the servo motor for steering is attach the 555 blinker circuit to it, then run the left/right trigger cables to the corresponding side of the turn signals. And the other PF cable would be connected to the same spot as the L-Motors for drive and from that i would couple the reverse trigger to the corresponding reverse LEDs and that is basically it, right? The triggers also send out the same 9v voltage? That would be fantastic, as there's nothing fancy nor expensive needed, very simple and tidy.

grum64, thanks - i struggled quite a bit with something as simple as the color scheme, but i think i can settle for the current version. The model is a present for my 5 year old son, so getting some color in there and livening it up was essential.

Again, thanks for the responsiveness and all the great tips, guys! Really appreciated. I will definitely post the results once i've reached the phase where i can show more than just an LDD drawing.

Posted (edited)

Yes. It should be about that simple. I left out some details about transistors.

I've attached a high level schematic.

Major components:

  • 555 timer circuit (there are some auxiliary components it needs)
  • Schmidt trigger: Turns an analog source into a hard step, needs to be biased for input and output range.
  • Inverse Schmidt trigger: same as Schmidt trigger but step output is reversed.
  • LED driver transistors: Some small signal transitions capable of switching the LEDs

You'll likely want to find some multi-channel ICs for your triggers and transistors. There may also be some "system on a chip" blinker circuits to make the 555 building easier.

edit: At second glance it looks like I may have massively over complicated things. At least for the reverse light, you could simply connect the LED across c1-c2, it will only light up one direction. For the turn signals, it might be possible to wire c1 and c2 into the top transistors safely without triggers.

post-39941-0-39596700-1403648732_thumb.jpg

Edited by Bzroom
Posted

Yes. It should be about that simple. I left out some details about transistors.

I've attached a high level schematic.

edit: At second glance it looks like I may have massively over complicated things. At least for the reverse light, you could simply connect the LED across c1-c2, it will only light up one direction. For the turn signals, it might be possible to wire c1 and c2 into the top transistors safely without triggers.

Bzroom, thank you very much for the help and for even drawing up a schematic! I've been looking into alternatives over the past few days and although, i have very very very little understanding, it seems like the micro arduino might be a good solution to handle all the lights and maybe some other functions (sounds, etc.).

At some point i would like to build a police version of the car and after i saw these rotating led beacons (

) i can't help myself - that would look fantastic for a police car, as it looks so realistic and cool (even to a 30-year old, imagine how stoked a 5 years old lad would be :) ). I'm not sure how Zmei makes his beacon, i think to remember seeing him disassembling a led beacon made for model cars and fitting it into the round lego brick, but might be that he does all this by hand. I also found something very similar here with quite a few instructions and explanations: http://catmacey.wordpress.com/projects/miniature-led-beacon-for-lego/ The maker has some very clever ideas - for example how to run 8 leds on only 4 pins, a method called charlieplexing, (hence reducing number of needed wires and allowing a very compact package). He uses PWM outputs (what ever that means) in order to get a more gradual transient from one led to the next (i suppose this is what Zmei does too). And i read that Arduino Micro boards have 7 PWM outputs, which would be enough for the method used by Catmacey.

So i guess a micro Arduino might control these in addition to the reverse signal and turn signal flashing. From what i understand, by using PWM outputs, one could also make the turn signals flash more naturally and not as abruptly as a simple on/off operation. So now i am wondering if the micro arduino might manage to do all this AND if it can be connected to a small ir or rc receiver from the Arduino line in order to make the police beacons, head- and back lights remote controllable (this is not needed for reverse and turn signals, as these should be automated anyway). Also, could the arduino board be connected to a tiny speaker and some sort of device that can store and play back small sound bites (which could also be triggered by the additional rc/ir control) - like police sirens, a revving engine sound, police warnings, etc.?

I know that the LEGO technic remote has 4 channels - if the extra receiver connected to Arduino would be set to a different channel frequency than the frequency used for PF steering/driving of the model, then one could use the same remote to control all (or at least some) extra functions. Then one would switch back to the channel for driving. Not optimal, but keeps the remote simple and gives a relatively easy access to most of the functions, apart the ones which would work best with the ability to be turned on instanteniously (like the horn signal or rotating beacon lights).

Sorry for the many questions - i'm just wondering if all of this is halfway possible with the Arduino stuff.

Posted

Its entirely possible with an arduino. If you're going to go the microprocessor route then i definitely recommend the arduino platform.

It will greatly simplify your wiring of complex components. You'll wire the Leds up to a transistor (look into darlington-array for a compact form), the transistors will be driven by the microprocessor, one per channel of control.

PWM is pulse width modulation. It basically means if you blink an light source at a varying rate you can vary the perceived intensity. A higher pulse width and the light source will be brighter. This allows a digital processor, which only has on-off, to control a variable light source.

You'll also be able to pick up an IR receiver, connect it to a digital input on the microprocessor, and through code you will be able to read LEGO IR signals from the air. You wouldn't need to hack u any power functions wires to tap into any extra receivers. The processor can be the receiver and the driver.

vshwl4.jpg

Posted (edited)

Its entirely possible with an arduino. If you're going to go the microprocessor route then i definitely recommend the arduino platform.

Wow, that does sound very promissing. I am currently rendering a police car version of the initial design (i left it on the crawler chassis for now, as it was supposed to be a quick test) and after seeing the almost completely rendered model, i can't wait to begin the build. A really fancy lights controller and maybe even sounds would be icing on the cake.

The ideal (day dreaming) scenario of all electronic goodness that i could imagine for this model is the following:

LIGHTS (if possible, all lights would go on and off with a short and smooth gradient):

- automatic left/right turn signals

- automatic reverse signal

- rc on/off switchable rear front day lights

- rc on/off switchable main headlights*

- rc on/off switchable emergency lights

- rc on/off switchable rotating beacon lights

- rc switchable flashing patterns for beacon lights

* in regard to the headlights - i am toying with a couple of ideas how to make each of the 4 headlights into a dual light element with a dimmer ring around the brighter middle, both of which could be independently turned on and off and without the need for more than 1 LED for each element. For both elements i would attempt to achieve an evenly spread out lighting, unlike how LEDs usually appear in lego applications - as hot-spots. I would try to attempt a more realistic appearance. Once i have figured out something that might really work well, i'll post the ideas. Basically it's about using either fiber-optics or an acrylic plastic insert for the outer ring and an acrylic disc insert for the inner part. I'd have to figure out how to integrate this into the round lego bricks and how to make good light isolation with as little bleed through as possible from one element into the other. Basically, i'm going after something like this for the outer ring:

08-09-10-dodge-challenger-ccfl-halo-projector-headlights-11.jpg

SOUNDS:

- rc switchable police sirens (constant operation until turned off)

- rc switchable police warning (played back once after triggering corresponding button)

- rc switchable horn signal (is played back as lung the corresponding button is held down)

- rc switchable revving engine sounds (played back once after triggering corresponding button)

I know there are the lego sound bricks, which i still find impressive, as AFAIK these tiny bits were made in the late 80's/early 90's, but, if possible, i would like attempt going a few steps further than that.

Is something on this wish-list entirely delusional and/or very costly to carry out in real life? What would i need from the Arduino modules to make this happen? And what will be needed on the remote side of things. I guess much could be programmed to work with the simple lego remote, but most functions would not be available instantly - just by changing channels, triggering stuff, then changing back.

Edited by VintageCharlie
Posted

Separate your needs.

Inputs:

IR:

Steering: ch1 blue

Drive: ch1 red

Daylight control: ch2 blue (momentarily in + direction to toggle on/off)

Headlight control: ch2 blue (momentarily in - direction to toggle on/off)

etc etc. You only have so many channels for IR.

Outputs:

Digital:

0: Running lights

1: Head lights

2: Reverse lights

3: Left turn signal

4: Right turn signal

etc.

Serial:

0: Audio board bus

- The Audio board has prerecorded sounds that are triggerable via a one-wire command from the arduino such as "play: honk.wav"

The hardware will run you $50 off the shelf if you're efficient.

Posted (edited)

Bzroom, thanks for all the valuable input! But it is possible to load your own prerecorder wav files? I will look more into what Arduino is all about and try to wrap my head around it. I found a clip on you tube where a guy plays a chip-tune generated by the Arduino (

). So i guess sirens, horns, etc. should be doable with the quality it can provide.

Btw. the small lego remote controls are not too expensive - i could get another one and use it for the functions that would ideally need instant access. Now i'm looking for the IR receiver options for Adruino.

Edited by VintageCharlie
Posted (edited)

Thanks! Looks like in order to realize all this the most important bits i'd need are the headerless Arduino micro board, ir receiver module (like this http://www.dx.com/p/...64#.U6tWlrFaeLQ or a TSOP1738 maybe) and for audio a small audio module with sd card compatability (like the somo 14D), a simple (maybe this thing: https://www.sparkfun.com/products/11044 or something LM386 based?) amplifier and a small speaker. If anyone has some advice or experience with some of these parts, please let me know if these would be good choices and what might be better alternatives.

Edited by VintageCharlie

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...