News:

14/04/2022 - Summer is almost here!

Main Menu

LED Rear Light Project

Started by martin999, December 28, 2009, 12:21:56 AM

Previous topic - Next topic

martin999

Thanks John! :)

The 30% is disabled.

The regulator is a 10V linear low drop out device.  At the current I am putting through it, according to the data sheet Vdo = Vout + 0.3, so anything above 10.3 should be good.  I also have the correct capacitors on the input and output as described in the data sheet.

I'm out of the country for a few days from Sunday, so I may not get any time on it this weekend, but I will do some more investigation as soon as I can.

Im thinking along the lines of....

1) Disconnect the input from the brake switches (original brake light feed) to see if it is a spurious signal from here telling it to light up.   

2) Put a scope on the output and trigger on the signal.  Look at the supply and the brake switch input and see if I can capture what is going on at the inputs when the brake light flashes.

3) Simulate the supply dropping out and see if it flashes when restored.

I'll post my findings, but if you think of anything in the mean time, please let me know!

Cheers - Martin.



zeuter

Martin, just looked through the firmware and there is nothing there to create the flash on reset.  It is possible that the output mosfet is being triggered in a brown-out situation though and I think this is almost certainly what is happening. It'll be interesting to see what you find on the supply and input lines.  Keep me posted.


John

martin999

Thanks John....... stay tuned for the next thrilling installment!!  :)

martin999

Hi Guys,

Here's the latest!

I started the bike today and didn't see any problem with the intermittent flash of the brake light.

Then I noticed that the T10 LED sidelight had failed.  Was thinking this had to be coincidence, but it did get me wondering.  Took the T10 Led out and checked the connections, all fine. The spare one I had was in the office, so decided to use it as an excuse to take the bike out! :D   40 miles later and back with the second T10 I fitted it, checked it, all good, but the spurious brake flash was back!

Still couldn't believe the sidelight was the cause of the problems, so took it out again and the spurious brake flash was still there *PHEW* wasn't the sidelight so time to get my scope!

The output from my regulator (input to the modulator) was rock solid, even while cranking the engine when the 12V was all over the place, so then I turned my attention to the signal from the brake switches...... and there I found the culprit!

The bottom trace is the output from the modulator, set to trigger when the output goes high.  The top trace is the signal from the brake switches.  Y axis is 5v per div and x axis is 500uS per div.



This is the same as above, but x axis is 20uS per div.



It's pretty obvious that the spike is firing the modulator :(  so now I need to figure out how to suppress it!

@John - is the input on the modulator tied down at all? If so, what with?  It looks like the input is floating at around 1v, so I was thinking of tying it down to ground with a 10k resistor to see if it helps.  Any other thoughts?

As a slight aside, I soldered a small piece of braid to the contacts on the spare T10 LED so that it would make a better contact in the holder as I believe this has been known to kill them in the past.

Cheers - Martin.

RCE

I would tie the brake switch feed to earth with something like a 2k resistor, or even lower. I would be inclined to go to about 500ohm to try and increase the life of the brake switch, it which would also tie down the modulator input.

Fluke

This is getting interesting... I agree a tie down resistor may help out, what you think John ?

zeuter

Hi Guys,  that's a  nasty spike!!   The 12v brake signal goes to a 33k/10k resistor voltage divider and then onto an input pin on the microcontroller which is pulled to Ground via the 10k resistor, so in theory, the input isn't floating and should read 0v when open circuit, so the 1v reported  is a bit of a mystery.


A 500 ohm (or there abouts) resistor on the brake switch feed to Ground as RCE suggests should do the job and a 0.1uF capacitor in parallel with it won't do any harm either and may help suck up some of the spike.  Fitting to the Feed side may prove awkward, so you could try it on the modulator input first where it's easy to get at.


I'm fairly confident it'll do the trick, but if not, there are a few other things we can try.


Regards, John


martin999

Thanks for the replies guys.

I'm a little confused as to the need for anything on the supply side of the brake switches.  The spikes are there with both switches open circuit, so I don't understand how this would help?

I have looked at the wiring diagram and the feed to the brake light goes only to the two brake switches.  This means that I effectively have an aerial from the back of the bike to the switches.

I am going to try terminating both brake switches on the switched side to see if I can cut down the aerial effect!

RCE

I meant and I think everyone else did the output of the brake switch/the input of the modulator (mounting the resistor near the modulator).


Brake switches tend to get damp, and the contacts can fur up if they aren't drawing enough current to self clean.


500ohm (or even lower resistance) will help to alleviate the spike + problems in the future with the brake switches.

zeuter

Hi Guys,


Sorry for any confusion, it was 4.30am my time when I wrote that.  RCE is correct and he also has a point about not drawing enough current through the brake switches, so a lower value resistor would be even better.  Just be aware of the wattage rating required the lower you go.


Regards, John

martin999

Sorted! (maybe  ;D  ) thanks for your suggestions guys!

I used a 390R 0.6w resistor (at 14v power through it will be 0.5w) between the brake light signal and ground up by the modulator.  The spikes have gone from 7v 20uS to 2v <1uS, most importantly they now do not appear to fire the modulator in to life.

I tried adding more resistors up by the switches, but they didn't make any noticeable difference, so I think I will stick with just the one at the modulator end.

I could go further and try to completely remove the spikes, but as it seems to be working, I think I'll leave it as is!

Fluke


zeuter

Great result Martin.  Future production will have the resistor built in, thanks for all your hard work, John

martin999

Well I did say maybe!!  ;D

Although the single resistor worked, I couldn't resist trying to remove the spike a bit more!

I ditched the single resistor and used an RC filter.  This comprised a 1k resistor in series and a 0.1uF 50v cap down to ground.  This reduced the 7v 20uS spike to ~500mV and <100nS.  Playing around with different values made no real difference to the spike, so I reckon it about as good as it will get with an RC filter.

I put the 390R back in circuit so that the switches get a bit of current through them as has previously been suggested, so finally (and I really do mean it this time!) it looks like this...

    Swithced +12 -------------R2-------------- Modulator I/P
                               |                   |
                              R1                 C
                               |                   |
            Ground  ------------------------------ Modulator ground

R1 = 390R 0.6W
R2 = 1k 0.5w
C = 0.1uF 50v ceramic bead

zeuter

Aw, come on Martin, I'm sure a 50mH inductor in there somewhere could totally eliminate!  ;)


On a serious note though,  any clues as to the origin of the spike shown up while you've been testing?