LED Dimmer query

OOooh, that Google resistor hart is a bit too complex for me :thinking::thinking::thinking:
 
Gizzy said:
Colour bands = Gold - then brown, purple, yellow
I make that resistor to be 470 ohms, which seems rather low, from the colour bands, yellow, purple, brown. You could check it if you have a multimeter.

470 ohms or 560 ohms resistors would be about right for a 12 volt supply and a typical LED taking 20-30 milliamps. Obviously the higher value reduces the current and brightness a bit.
 
this is a great LED resistor calculator:
http://www.bennyinternational.com/lib/ledcalculator.html
I used 3mm warm white leds and they need around 3.2 volts but I limit the current to 15 mA ( to each led) this means that they are not burning the retinas like halogen globes. Remember what you are trying to achieve would be an imitation 50/80 watt or thereabouts incandecsent "glow".... Interior lights? tail tights?
 
ge_rik said:
Neil Robinson said:
A separate circuit is probably the best way to go. Rather than a second switch I be tempted to use one four pole On Off On switch.
http://www.rapidonline.com/Electronic-Components/4PDT-On-off-on-Min-Toggle-Switch-75-0094 < Link To http://www.rapidonline.co...-Toggle-Switch-75-0094

Good idea, thanks Neil. Fits my philosophy - Keep it Simple

I agree, and want to try this on a battery model as well. The problem is that it doesn't appear to be a stock item at Rapid - Minimum Order Quantity is 1000 - so if anyone has another source, please post.
 
Thanks,Phil.
It looks like there is one switch on the list which is definitely 4 pole double throw centre off.
 
Neil Robinson said:
Rik's circuit shows an on/off switch on the output from the battery so the centre off function isn't really needed on the output to the motor or lighting circuit.

Yes - quite so, I've ordered one from Maplin. I suppose not having the centre-off function is why they're a bit cheaper.

Rik
 
BTW - got this really detailed response on the 16mm NGM forum. Not only has this helped me understand what seemed counter-intuitive, it's made me feel it might be worthwhile brushing up my knowledge of electronic theory.

I hope you find it interesting. (PS - I have the originator's permission to re-post here)

Now, this is going to be a bit of a guess, as I can?t know exactly how the LED dimmer works without looking at one and testing it. However, it?s a pretty fair guess, so I?ll try to describe what I think is happening, but first I need to describe how I think the LED dimmer is working.

I suspect that the LED dimmer will be a PWM current controlled unit. If you see my earlier mail on LEDs you?ll see that I was extolling the virtues of current control with LEDs, as opposed to voltage control. This way the controller will compensate for any variation in forward drop of the LEDs across batches (not something we need to worry about with when assembling one-offs, but if you?re designing something for which there may be 100,000+ built (as I do at work) then it is a serious consideration. So, I suspect that the LED dimmer works by sending out a constant current rather than constant voltage. This means that its voltage will depend on the load.

The easiest way to create a dimming function for LEDs is to use PWM (pulse width modulation). This means that it will send bursts of constant current out. By ?constant? I mean that the current will be either on or off, but when its on always be the same value, it won?t be variable. It will probably work at a set frequency (probably from 40k to 400kHz) , and the ratio between the ON and OFF pulses will be what sets the brightness, or in your case of the motor, its speed.

So, that said, let?s analyse what?s probably going on with your circuit (this only holds if my assumptions above are correct):

Because the LED dimmer is a current controlled unit, set pulses of current go through your motor. The voltage across the motor will therefore be related to the load on the motor. If the motor is free-running (not hauling a train) then there will be very little load, so the voltage developed across the terminals will be low. If this is below 3V (assuming you?re using white LEDs) then they may either not light at all, or very, very dimly. Essentially the motor has usurped the LED for current demand so the LED aren?t lit.
BUT
Between the periods of pulses of current from the controller, when the controller is not supplying any current, the motor is still rotating under its flywheel effect. During this period it is acting like a generator, because the motor contains coils and they cannot change current flow immediately ? it has to continue flowing. So, the motor acts like a generator and pushes current through the LEDs. The forward voltage of the LED is now achieved as the LED restricts current flow until its Vf has been achieved, so the ?generator? essentially winds up the voltage until the necessary current flows in the LED to maintain the equilibrium. I think this is what is dimly illuminating your LEDs ? not the controller, but the flyback effect from the motor operating as a generator in the gaps.
SO
Why does the LED dim at higher speeds? Well, if the above holds, then as you increase the dimmer, what is doing is changing the PWM duty cycle closer to 100% (the ON-OFF time of the pulses, becomes mostly ON and very little OFF). By now you?ll have realised that if this is the case, and there is little or no OFF time then there is no point where the motor is acting as a generator, so the LEDs are not lit.

OK, so a couple of interesting points. If the load on the motor is increased, then the voltage developed across the motor will be increased and at some point the LEDs may illuminate. Start the motor off and set it to about 50%. Now grab the shaft or wheels and really give it something to drive. Do the LEDs illuminate?

Right, so what can you do with your circuit? To be honest, not really a lot. I just don?t think there?s any reasonable way you can drive the LEDs from the dimmer that is also controlling the motor because of the interaction between the two. I think what I would do is either fit a 4 pole changover switch, and use two poles for the motor and the other two poles to switch whichever is the forward LED on, and drive the LED(s) simply using a ballast resistor and the 12V supply. If you want to illuminate 2 LEDs at each end for headlights you can just put the LEDs in series and then use a slightly smaller ballast resistor (don?t half it! See below). IF you can?t find a 4 pole switch then you could use a single pole switch to drive a 4 pole changeover relay to do the job. At least your lights will be a set brightness whatever the speed.

Lastly, LED ballast resistors. Assume the white LEDs are 3V. If you?re driving this from 12V the resistor will drop 9V. If you decide on 10mA in the LED (a good place to start for a typical 3-5mm LED) then the resistor is 900R. If you run two LEDs in series with one ballast resistor, then you can add the Vfs together, so the total dropped across the two LEDs is 6V, so there is 6V across the resistor, so to keep 10mA you need 600R (so not half).

Remember Ohms law ?> V = IR

Hope this has been of some interest, if not sadly being able to fix the problem.
Lyndon
 
I?ve been loathe to put my 2 cents worth into this discussion, simply because I cannot see how the circuit you provide will do what you describe. So obviously I don?t understand something. Nevertheless, sometimes it?s worth correcting some wrong misconceptions, even if you don?t know what?s correct.

First off, do you realise you don?t need a 4 pole switch for the ?second? solution for the lights? A 3 pole one will work. See this sketch.
a2c902584c0e444695d32a49d18aee5c.jpg




But back to the original problem. First off Rik, can I ask a couple of questions to try to clarify?
1. do both leds actually light at the same time? I mean once you?ve selected one direction, do the leds at the front and back both light? Does the ?rear? one light at low voltage and then it goes out and the ?front? one comes on at higher voltages?
2. Are you sure you?ve wired it as per your diagram in your 1st post. I can see how you would get your described effect if one of those leads from the motor to leds, actually connected to negative.
3. have you actually measured the voltage you get across the motor at max output?

But concerning your other correspondent?s (Lyndon) long post. I really can?t see how the dimmer can be a ?constant current? output. If it is, what constant current does it put out? The unit says it?s rated at 8 amps, but it can?t be putting that out to your motor.
I had thought of the possibility of the back emf actually driving the leds too, and that lead me to question 1 above. Because while the pulse is ON to the motor, one of the leds will light and when the pulse turns off, the back emf MAY drive current though the OTHER led.
 
gregh said:
First off, do you realise you don?t need a 4 pole switch for the ?second? solution for the lights? A 3 pole one will work.


Hi Greg

I had wondered if a 3 pole switch would do the job - I've already ordered a 4 pole one so could have a pole spare for something else.

gregh said:
1. do both leds actually light at the same time? I mean once you?ve selected one direction, do the leds at the front and back both light? Does the ?rear? one light at low voltage and then it goes out and the ?front? one comes on at higher voltages?

Not yet tried it with both sets of lights. I only wired one set and then tested and got the result I described, so didn't bother wiring in the other set.

gregh said:
2. Are you sure you?ve wired it as per your diagram in your 1st post. I can see how you would get your described effect if one of those leads from the motor to leds, actually connected to negative.

Yes - I'm almost certain it was as shown. The first thing I did was to check if I'd shorted something out. Wiring the switch was tricky as it was inside the body in the base and so I was soldering remotely from above - I still have burnt fingers to show for it. There was a likelihood that the stray strand from a wire had attached itself somewhere it shouldn't. However, I double-checked just in case - but I may have missed something.


gregh said:
3. have you actually measured the voltage you get across the motor at max output?

When I first wired up the unit to the motor and got a slightly erratic performance, I put a multimeter across the output and it gave a smooth rise in (apparent) voltage. I'm assuming Lyndon's response is something to do with the PWM. This is where my theoretical knowledge gets a bit shaky. With PWM, would the peak voltage remain constant but at lower settings the gaps between the peaks be more spread out - then the gaps close as the settings increase? That was my interpretation (but then as I say my knowledge is a bit thin here).

gregh said:
But concerning your other correspondent?s (Lyndon) long post. I really can?t see how the dimmer can be a ?constant current? output. If it is, what constant current does it put out? The unit says it?s rated at 8 amps, but it can?t be putting that out to your motor.
I had thought of the possibility of the back emf actually driving the leds too, and that lead me to question 1 above. Because while the pulse is ON to the motor, one of the leds will light and when the pulse turns off, the back emf MAY drive current though the OTHER led.

I'd interpreted this as above - ie that the peak voltage is constant. I took 'current' as a sort of loose term rather than a specific one - but as you say, current in this context, has a very specific meaning.

For the moment, I've wired the lights directly to the batteries via a single pole switch and so they are non-directional. When the 4 pole switch arrives I will rewire (ie burn fingers again) and so will have a go at seeing what happens when I revert to the original wiring but with both sets of lights wired up and with the motor under load. I can also check that I can replicate the problem or whether it was down to a short-out in my soldering.

Thanks for your input. I really am interested in trying to figure out the root of the problem - I'm not keen on unsolved mysteries........

Rik
EDIT (Sorry - edited this a couple of times when I read it through - now I think I've got the gist of what I'm trying to say)

PS -Can I just check with you - would the resistance be doubled if I used one ballast resistor when the LEDs are wired in parallel v in series. I've already soldered individual resistors in parallel as per the last diagram - but would like to know for future reference.

ie
|-----------|>|-------------|
-------////------| |-----------------
940R |-----------|>|-------------|


-------////-------|>|-----|>|--------------------------------
600R
v
470R
|------////------|>|-------------|
---------------------| |-----------------
|-----////-------|>|-------------|
470R


Hope than makes sense.
 
OK. Latest update on this. The 4pole switch arrived today and so I've done some rewiring.

Before wiring in the new switch, I restored the wiring to its former state - but this time added in the other pair of LEDs. As Greg predicted, one set got brighter as the other set got dimmer. When I reversed the switch, the same again, only the other way around. Furthermore, the dimmer unit struggles to reach full power - it does so very slowly - much more slowly than when no LEDs are connected. I tried putting more load on the motor, as Lyndon suggested, but this made no difference.

Finally, I took the motor out of the circuit completely and just used the unit to power the LEDs. This time they worked as expected - ie reversing switch set forward and only the front lights come on (low at first and then more brightly) - reverse the switch and only the rear lights come on. So, it is something to do with the motor - and maybe something to do with back-emf - which is what Greg hypothesised and I think underpins Lyndon's explanation.

So, I've gone for the easy option. I'm using two of the 4 poles of the switch for the motor and one pole for the lights - as per Greg's suggestion.

Thanks one and all for your thoughts and suggestions. If anyone comes up with another theory I'd be interested. In the meantime I've ordered a book on electronic theory to brush up on my background knowledge.

Rik
 
ge_rik said:
When I first wired up the unit to the motor and got a slightly erratic performance, I put a multimeter across the output and it gave a smooth rise in (apparent) voltage. I'm assuming Lyndon's response is something to do with the PWM. This is where my theoretical knowledge gets a bit shaky. With PWM, would the peak voltage remain constant but at lower settings the gaps between the peaks be more spread out - then the gaps close as the settings increase? That was my interpretation (but then as I say my knowledge is a bit thin here).
That's a good enough way to explain it. Just remember your multimeter cannot respond to these pulses - it just measures the average voltage. That's why you see a gradual increase as you increase the output.

ge_rik said:
PS -Can I just check with you - would the resistance be doubled if I used one ballast resistor when the LEDs are wired in parallel v in series. I've already soldered individual resistors in parallel as per the last diagram - but would like to know for future reference.

ie
|-----------|>|-------------|
-------////------| |-----------------
940R |-----------|>|-------------|


-------////-------|>|-----|>|--------------------------------
600R
v
470R
|------////------|>|-------------|
---------------------| |-----------------
|-----////-------|>|-------------|
470R
NEVER use the 1st circuit with 2 leds directly in parallel.
Both the 2nd and 3rd circuits are OK. But if you've got a high enough volts supply to put the 2 in series, you might as well use the 2nd cct as the current drain on the battery is half of the 3rd cct.
 
ge_rik said:
OK. Latest update on this. The 4pole switch arrived today and so I've done some rewiring.

Before wiring in the new switch, I restored the wiring to its former state - but this time added in the other pair of LEDs. As Greg predicted, one set got brighter as the other set got dimmer. When I reversed the switch, the same again, only the other way around. Furthermore, the dimmer unit struggles to reach full power - it does so very slowly - much more slowly than when no LEDs are connected. I tried putting more load on the motor, as Lyndon suggested, but this made no difference.

OK, so maybe I do understand something at least. When I get a chance to sketch some circuits out today, I'll try to explain what's happening with the leds...


ge_rik said:
Finally, I took the motor out of the circuit completely and just used the unit to power the LEDs. This time they worked as expected - ie reversing switch set forward and only the front lights come on (low at first and then more brightly) - reverse the switch and only the rear lights come on. So, it is something to do with the motor - and maybe something to do with back-emf - which is what Greg hypothesised and I think underpins Lyndon's explanation.
I still don't know what the underlying problem with the dimmer is. I guess it just wasn't designed to operate motors. One guess is that the frequency is too high for the motor inductance.
ge_rik said:
So, I've gone for the easy option. I'm using two of the 4 poles of the switch for the motor and one pole for the lights - as per Greg's suggestion.
Thanks one and all for your thoughts and suggestions. If anyone comes up with another theory I'd be interested. In the meantime I've ordered a book on electronic theory to brush up on my background knowledge.
Rik
Good luck. Ask if you've got any more questions.
 
gregh said:
OK, so maybe I do understand something at least. When I get a chance to sketch some circuits out today, I'll try to explain what's happening with the leds...

Good luck. Ask if you've got any more questions.

Thanks Greg

Any info to fill the gaps in my knowledge will be gratefully received. In the meantime - I think I've reached a solution which does the job so I'm a happy tho slightly puzzled bunny.

Rik
 
ge_rik said:
gregh said:
OK, so maybe I do understand something at least. When I get a chance to sketch some circuits out today, I'll try to explain what's happening with the leds...
Good luck. Ask if you've got any more questions.
Thanks Greg
Any info to fill the gaps in my knowledge will be gratefully received. In the meantime - I think I've reached a solution which does the job so I'm a happy tho slightly puzzled bunny.

Rik

Just a little clarification of my previous post.

I imagine the output of the Dimmer is probably a FET (field effect transistor). Imagine it?s just an on/off switch that opens and closes many thousands of times a second. Normally it would connect to a load of LEDs as shown.
e893028870aa45fe883f77eb57a26a58.jpg


Now in Rik?s case with a motor load and LEDs in inverse connection, when it?s closed the current flows as shown here.. Through the motor and LED1.
9e2e412f45fa404da6a3100b65f00d0e.jpg


Now the motor has a property called inductance which just means that some of the energy (current) flowing into the motor gets stored in its magnetic field (while most of the energy goes out the shaft to turn the wheels).

When the switch opens, the current in the magnetic field wants to keep flowing and so it ?diverts? through LED2 as shown here. There is no current coming from the battery at this stage and the current quickly diminishes to zero as the magnetic energy is dissipated into the resistor in series with LED2.
d12c5d85fc84425cbe4ed8027d8a9ad2.jpg


So at low speed when the switch is on for a shorter period and off for longer, LED1 lights for a short time and looks ?dim?. LED2 probably looks ?dim? too as there is not a lot of energy in the magnetic field. As the speed (voltage) is increased, LED1 will get brighter and brighter while LED2 will probably stay much the same brightness, just diminishing slightly.
For full speed, the switch is closed all the time, so no current can flow in LED2.

As you say, you have a solution with the switch, but it's nice to try to figure out why the problem occurred. I'm still puzzled as to why you can't get full volts, but I guess I'll never know unless I buy one of the units. But I don't think I can use one, so won't be bothering soon.
 
Thanks Greg
That makes a lot of sense.

Like you, I feel uncomfortable if I can't understand why something happens - which probably explains why, as a kid, I used to dismantle things, much to the irritation of my parents - particularly when I couldn't always re-assemble them.

I shared a lift with a former physics teacher last night who provided me with a key piece of the jig-saw in helping to understand electronic circuits - ie the 'dissipation' of volts by components from the top-rail to 0v on the bottom rail of a diagram. This fundamental building block has helped me a lot in understanding what's happening above and in the LED circuits in your new thread. I'm now more determined than ever to get my head round what has for me previously been a dark art and wizardry.

Thanks for your help - the mists are clearing.

Rik
 
Back
Top