BikeVis Support Forums

General Motorcycle => General Lighting Chat => Topic started by: martin999 on December 28, 2009, 12:21:56 AM

Title: LED Rear Light Project
Post by: martin999 on December 28, 2009, 12:21:56 AM
Following on from my unsuccessful Brake Mod installation using a so called 'direct replacement' LED bulb, I have decided to do what I have been thinking about for a while now and make my own!

Hopefully this thread, as it progresses, will give others a little insight into possibilities of replacing a standard bulb with an LED array for use with the BikeVis Brake Mod..... and hopefully I'll get some advice as well!!

Of course, I could go out and buy myself a complete replacement LED tail light, but they are quite expensive and the only ones I have seen so far have a clear lens and I want to keep the red lens of the stock tail light.  Oh, and making my own is much more fun!

There are two major design considerations, 1) number and type of LEDs, and 2) regulation of the array.

1) Number and type of LEDs.

This, without doubt, is the single biggest problem and the reason why this little project has been so on and off since I started to think about it.  I could go down the trial and error route with lots of different LEDs, but this is a one off and I'm the kind of person that wants to get it right first time!  The starting point would be the 12V 5/21W bulb currently used.  The problem is that the light output of incandescent bulbs is measured in lumen, whereas LEDs are measured in candela and there is no direct correlation between the two.  I did find an on-line calculator that did a conversion using the mcd and viewing angle of the LED, but this still doesn't help much because the red lens filters out all but the red light from the bulb and the luminous flux value of the bulb is for the white light across the whole of the spectrum.  Hopefully I have that right, but in any case it means that there is no way of specifying a number and brightness of LEDs to replicate the original bulb!!

I am pretty sure that I have now decided on the following.  The array will be as follows....

         o  o  o  o  o  o  o  o
     o  o  o  o  o  o  o  o  o  o
     o  o  o  o  o  o  o  o  o  o
     o  o  o  o  o  o  o  o  o  o
         o  o  o  o  o  o  o  o 

o will be the tail light which will be on all the time.  They will be 22 Osram LS E67B-S2V1-1-1 Red LEDs
   Typical spec's are 562 mcd / 120o viewing angle / 1.70 lm / Vf = 2.2 V / If = 50 mA

o will only activate when the brake is applied.  They will be 24 Osram LS E6SF-V2BA-1-1 Super-Red LEDs
   Typical spec's are 1572 mcd / 120o viewing angle / 4.65 lm / Vf = 2.15 V / If = 50 mA

The brake LEDs will also be run through a BikeVis Brake Mod that will be modified so that they will remain off until the brake is applied.

I still have no idea if these will be bright enough, (or even too bright!) but they are as close to a best guess that I can make!  The other concerning issue is the red lens.  Hopefully the red lens will let through all the red light from these LEDs, but if the red of the lens is different to the red of the LEDs then I could loose a lot of light through the lens!!

I will also need to incorporate some white LEDs directed down to illuminate the number plate.

2) Regulation of the array.

From my experience with my 'replacement' LED bulb, I have found out that regulation is going to be important if I want the intensity of the array to remain constant with varying loads on the bike.  The two options would be to regulate the current or regulate the supply voltage.  Having looked in to both options, although regulating the current is the preferred method of driving LED arrays, it can be quite complicated to impliment.  So I have decided to go for the easy option and regulate the supply voltage.  I plan to use 2 low drop out linear regulators to regulate the supply to each of the arrays to 10V.  This way I should be getting 10V when the bike supply fluctuates with varying loads and the LEDs should not change in intensity. (That's the theory anyway!).  So, with a 10 volt supply, I will be looking at running parallel strings of 4 series LEDs, and hopefully the regulator will be quick enough for the flashing function of the Brake Mod.

Next stage is to buy the components, so I'll keep you posted as I move forward with it.
Title: Re: LED Rear Light Project
Post by: Fluke on December 28, 2009, 03:33:29 PM
Very interesting read Martin, thanks.

This sounds like a fun project and I agree a constant voltage supply is going to be the easiest as constant current will require some much more complex electronics in comparison. The advantage of a constant current supply though would be the elimination of inefficient resistors used for your LEDs...  (something that is not at all practical in higher power LEDs). I'm guessing you will be ok though with a large array of lower powered units.

Keep us posted how it goes...  your a braver man than me :-)

Regards and have a happy new year
Title: Re: LED Rear Light Project
Post by: RCE on December 29, 2009, 11:16:04 AM
Couple of points, using LEDs inside the standard tail lamp unit will invalidate the E mark.... issue then is if you get rear ended they have a get out of jail free card if the vehicle inspector finds them.


Unit failure, think about splitting both circuits so that if one section fails you still have some rear light.


I have gone the supplemental LED route (based on the bullet), and reckon they look and work well. Unfortunately since building them the snow and ice has meant I haven't tried them on the road. Intention is to get some video shot of them to see how effective they are. For the time being here is some video of them shot outside my garage http://www.youtube.com/watch?v=AkGS2Iff4g0
Title: Re: LED Rear Light Project
Post by: zeuter on December 29, 2009, 02:55:50 PM
Hi Martin,

QuoteSo, with a 10 volt supply, I will be looking at running parallel strings of 4 series LEDs, and hopefully the regulator will be quick enough for the flashing function of the Brake Mod.

Just put the brake modulator after the voltage regulator, it'll run quite happily at 10 volts.  Good luck with the project.

Title: Re: LED Rear Light Project
Post by: martin999 on December 31, 2009, 11:14:11 AM
Quote from: RCE on December 29, 2009, 11:16:04 AMCouple of points, using LEDs inside the standard tail lamp unit will invalidate the E mark.... issue then is if you get rear ended they have a get out of jail free card if the vehicle inspector finds them.

Unit failure, think about splitting both circuits so that if one section fails you still have some rear light.

I have gone the supplemental LED route (based on the bullet), and reckon they look and work well. Unfortunately since building them the snow and ice has meant I haven't tried them on the road. Intention is to get some video shot of them to see how effective they are. For the time being here is some video of them shot outside my garage http://www.youtube.com/watch?v=AkGS2Iff4g0 (http://www.youtube.com/watch?v=AkGS2Iff4g0)

Thanks for the input RCE.  I take your point about the e mark on the rear light, but TBH there are a few insurance 'get outs' on many bikes that have been modified.  I'm no expert, but following your train of thought does it mean that the extra brake lights you have (which look really good BTW!) are illegal as they are not e marked?

Some built in redundancy may be worth doing and I'll consider it as the build progresses.  Keeping in mind though that it is replacing a single dual filament bulb.  The LEDs should be much more reliable anyway and I always check the operation of all the lights before I ride.  I would have thought the chances of bulb failure whilst riding would be higher than failure of the LEDs.

Quote from: zeuter on December 29, 2009, 02:55:50 PM
Hi Martin,

Just put the brake modulator after the voltage regulator, it'll run quite happily at 10 volts.  Good luck with the project.
Thanks John, great advice, I'll certainly do that.  Presumably the input from the brake switch can be left as 12V?
Title: Re: LED Rear Light Project
Post by: zeuter on December 31, 2009, 11:37:12 AM
Yep, no problem Martin, the brake switch input can be at +12VDC.  (MAX +15VDC)
Title: Re: LED Rear Light Project
Post by: RCE on January 01, 2010, 09:13:11 AM
Quote from: martin999 on December 31, 2009, 11:14:11 AM
Thanks for the input RCE.  I take your point about the e mark on the rear light, but TBH there are a few insurance 'get outs' on many bikes that have been modified.  I'm no expert, but following your train of thought does it mean that the extra brake lights you have (which look really good BTW!) are illegal as they are not e marked?

Some built in redundancy may be worth doing and I'll consider it as the build progresses.  Keeping in mind though that it is replacing a single dual filament bulb.  The LEDs should be much more reliable anyway and I always check the operation of all the lights before I ride.  I would have thought the chances of bulb failure whilst riding would be higher than failure of the LEDs.


Supplemental lighting should be OK even if not E marked, as long as you are aware of the possible issues that is the main thing, as the lens is E marked you should pass mot and police inspection without issue as long as they assume it was manufactured with LEDs. The LED bulb replacements are easier to spot by the mot/police so chances are you will be OK.


The bulb is a single point of failure, and is the reason I initially tried various LED tail light bulbs. I had a number of problems with the LED bulbs, including not as much light output, electrical failures of the LED bulbs, and mechanical failures (eg falling apart due to vibration). In the end I found the normal bulb more reliable, and can be replaced easily at the road side as most petrol stations sell replacements.


The above are the reasons I decided to go the supplemental route (glad you like them), if the bulb fails I still have some rear light until I can get to a petrol station. If the LED fails I still have the tail light.


Be very interested in seeing the results of your build.


Oh and why don't bike manufacturers build all bikes with twin rear bulbs for just this reason, would make a lot of sense as far as safety is concerned.


Title: Re: LED Rear Light Project
Post by: martin999 on January 23, 2010, 08:48:22 PM
A little tease for you.... it's almost complete, but I haven't taken any pictures yet!

The build when pretty well really.  In the end I used 24 of the lower intensity LEDs around the outside for the tail, and 24 of the higher intensity LEDs in the centre for the brake light.  There are also 3 white 'side looking' LEDs pointing down for the number plate illumination.

All of the LEDs were SMDs soldered on to the track side of Vero board.  The current limiting resistors were through hole components on the rear of the board.

I worked out the current limiting resistors for each string using R = (Vs - (n*Vf))/If where Vs = supply voltage (10V in my case) n = the number of LEDs in the string, Vf and If from the data sheet for the LEDs.

When initially testing I found that Vf from the data sheets wasn't that accurate and I was over running the brake array and under running the tail and number plate arrays!!

Using a variable PSU and limiting the current to If I could measure Vf accurately and was able to change the current limiting resistors to suit.  Now each string runs at recommended If +/- a couple of mA.

Considering the tail LEDs should be 1.7lm each and the brake LEDs 4.65lm each, there isn't a huge discernible difference between them.  Not that it is much of a problem as there is still a nice big difference when the brake LEDs kick in! (especially when using the brake modulator)

With a bit of rough comparative 'testing by eye' with some work colleagues it looks like my array is a little brighter than the standard 5/21w bulb, but not overly bright, so it looks like I just about got it right with the choice of LEDs  8)

The LDO regulator also works well with no observed change with a constantly varying supply of 11 - 14V.

The modified brake modulator also works a treat holding the brake LEDs off until the brakes are applied.  It also has the option to reinstate the 30% when the brakes aren't applied, so I will have a little play to see what it looks like if I connect both tail and brake arrays to the modulator therefore using a single array at 30% for tail and 100% for brake.

Next stage is to run all arrays constantly for a burn-in test to make sure nothing untoward happens.

Once I am completely happy, I will coat the board with conformal coating and get it on the bike..... with the weather looking up, I NEED to do this ASAP  :D
Title: Re: LED Rear Light Project
Post by: zeuter on January 24, 2010, 10:16:16 AM
OK Martin,  stop teasing, show us the pics!!!


PS,  Glad you're happy with the modified Brake Modulator.


Regards, John
Title: Re: LED Rear Light Project
Post by: Fluke on January 24, 2010, 03:36:08 PM
Sounds great Martin... looking forward to photos also :)
Title: Re: LED Rear Light Project
Post by: martin999 on January 25, 2010, 06:53:27 PM
Here's the update with pics!

Front side of board (sorry about the focus, obviously a bit too close for my camera!)
(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/DSC04783.jpg)

Rear side of board with current limiting resistors
(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/DSC04784.jpg)

Tail lights and number plate illumination running at 10V from PSU
(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/DSC04785.jpg)

As above but with brake light on
(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/DSC04786.jpg)

Mounted in tail light housing.  Run from PSU at 13.5V through regulator that you can see to the left.   Thought I might get away without a heatsink for the reg, but looks like I will have to use one.  You can also see the white illumination for the number plate.
(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/DSC04788.jpg)

As above with brake light on
(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/DSC04787.jpg)

Quick shot of the rear of the unit showing the mounting plate I made that goes where the original bulb holder was
(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/DSC04790.jpg)

Had it running for a couple of hours with the temporary heatsink and all looks good.  Will run it a bit longer before opening it back up and coating the board with conformal coating.
Title: Re: LED Rear Light Project
Post by: zeuter on January 25, 2010, 10:03:09 PM
Wow!  Great job Martin.  8)   I've just had a rear light bulb blow on my Fireblade and no spare!  Now, do I buy a new bulb, or ...............


Where did I put that veroboard, it must be kicking around somewhere :)
Title: Re: LED Rear Light Project
Post by: Fluke on January 26, 2010, 07:22:22 AM
Really fantastic build Martin (you have 100* more patience than me)...  how to you think it compares to stock bulb for brightness ?. Have you tried the Modulator on the brake LEDs ?

Regards
Title: Re: LED Rear Light Project
Post by: martin999 on January 26, 2010, 12:22:57 PM
Quote from: zeuter on January 25, 2010, 10:03:09 PM
Wow!  Great job Martin.  8)   I've just had a rear light bulb blow on my Fireblade and no spare!  Now, do I buy a new bulb, or ...............

Where did I put that veroboard, it must be kicking around somewhere :)

Cheers John!  TBH even if it doesn't work out, it's been a fun little project to do!

Quote from: Fluke on January 26, 2010, 07:22:22 AM
Really fantastic build Martin (you have 100* more patience than me)...  how to you think it compares to stock bulb for brightness ?. Have you tried the Modulator on the brake LEDs ?

Thanks Dan, The brightness is a slightly up from the stock bulb, but not too much.  I always had in mind that some bikes have 2 x 5/21W bulbs in the tail, in theory giving out twice as much light as my single bulb, so I slight increase should be fine.

The brake mod works well.  I had a play using both arrays together through the mod using the 30% 'normal' operation and TBH it probably looks asteticaly a little nicer because all of the LEDs are on all the time, but the brake signal is no where near as noticeable as with the two separate arrays, so I will be sticking with plan A :)
Title: Re: LED Rear Light Project
Post by: martin999 on January 26, 2010, 08:35:00 PM
Couldn't resist taking a little video with the brake modulator in circuit!  :)

(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/th_MOV04794.jpg) (http://s295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/?action=view&current=MOV04794.flv)

The flash rate looks a little uneven, but it must be to do with the frame rate of my camera as it is perfectly even in real life!
Title: Re: LED Rear Light Project
Post by: Fluke on January 27, 2010, 02:34:55 PM
Cant get video to work at the moment, will try later, think photobucket having a funny 5 mins :(
Title: Re: LED Rear Light Project
Post by: Fluke on January 27, 2010, 03:04:51 PM
Looks pretty mean... I think the modulation does weird things with camera though, I had that trouble trying to film them, guess a high frame rate is needed.
Title: Re: LED Rear Light Project
Post by: Versysrider on January 28, 2010, 01:04:05 PM
That is really neat, looks spot on and the Modulation gives a superb effect. I already have rear LED lights on my Versys, but might see if a modulator will work on them. What I really want is a pair of Red Bullets to face backwards on my skidlid, to compliment my white ones. That will stop the tail enders hopefully!

Title: Re: LED Rear Light Project
Post by: Fluke on January 28, 2010, 06:01:58 PM
Quote from: Versysrider on January 28, 2010, 01:04:05 PM
That is really neat, looks spot on and the Modulation gives a superb effect. I already have rear LED lights on my Versys, but might see if a modulator will work on them. What I really want is a pair of Red Bullets to face backwards on my skidlid, to compliment my white ones. That will stop the tail enders hopefully!

Love your lid :)

We do a LED Brake modulator that gives a super fast modulation...  I have one fitted on the ZX10 and as far as I know Kawasaki use a 3 wire system so it will work perfect
Title: Re: LED Rear Light Project
Post by: martin999 on January 30, 2010, 04:47:11 PM
The regulator is finished and I ran it with all LEDs on for about 8 hours fitted in the light housing and all was OK.


I have now coated it in a silicone conformal coating that will protect it from the atmosphere and give it a little extra mechanical strength.  I will let that cure over the weekend and hopefully have it ready to go back on the bike early next week!
Title: Re: LED Rear Light Project
Post by: martin999 on February 01, 2010, 06:57:07 PM
Latest update.... Here it is, now coated in silicone conformal coating

(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/DSC04795.jpg)

(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/DSC04797.jpg)

Here is the finished regulator

(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/DSC04799.jpg)

Now to get it all back together and on the bike!! 8)
Title: Re: LED Rear Light Project
Post by: zeuter on February 01, 2010, 10:42:12 PM
Looking good Martin!  What exactly is that gunk you've coated it in?
Title: Re: LED Rear Light Project
Post by: Fluke on February 01, 2010, 11:08:13 PM
Quote from: zeuter on February 01, 2010, 10:42:12 PM
Looking good Martin!  What exactly is that gunk you've coated it in?

Looks like chocolate  ;D ;)
Title: Re: LED Rear Light Project
Post by: martin999 on February 02, 2010, 12:18:51 PM
Quote from: Fluke on February 01, 2010, 11:08:13 PM
Looks like chocolate  ;D ;)

Nah, wouldn't have made it past my mouth!!

Quote from: zeuter on February 01, 2010, 10:42:12 PM
Looking good Martin!  What exactly is that gunk you've coated it in?

It is....

------------------------------------------------------------------------------------------------------------
Red modified silicone conformal coating specially formulated for the protection of electronic circuitry
to meet defence and aerospace industry requirements

Once cured, it is resistant to a wide range of solvents, lubricants and cooling fluids
Excellent resistance to mould growth UV light and to prolonged tropical exposure/salt spray
Low oxygen permeability
Tropicalised
Provides excellent in-service protection for circuitry and PCB's at a typical coating thickness of 0·025-0·05mm
------------------------------------------------------------------------------------------------------------

It comes in an aerosol, but I didn't want to spend ages masking up all the LEDs so I decanted it into a pot and brushed it on.  It means the coating is a 'bit' thicker  :) but as it is behind the red lens it doesn't really matter.

It will give the same protection as potting compound but is not as robust and is easier to apply.
Title: Re: LED Rear Light Project
Post by: zeuter on February 02, 2010, 03:31:12 PM
Err, sometimes don't you just wish you didn't ask! ???   I think I'll just call it chocolate as well!
Title: Re: LED Rear Light Project
Post by: martin999 on February 02, 2010, 05:49:36 PM
Quote from: zeuter on February 01, 2010, 10:42:12 PMLooking good Martin!  What exactly is that gunk you've coated it in?[/font]
::) ................ ;D
Title: Re: LED Rear Light Project
Post by: Fluke on February 02, 2010, 07:01:51 PM
 ;D ;D
Title: Re: LED Rear Light Project
Post by: zeuter on February 03, 2010, 11:18:49 AM
Ok, I asked for it!! :'(
Title: Re: LED Rear Light Project
Post by: martin999 on February 04, 2010, 09:56:00 PM
OK time for another update!

Spent this evening putting it all back on the bike.  All is working as it should apart from one minor glitch.  Had the battery out for a charge, so when I tested it I had a fully charged battery.  At this point everything was good, even with the hazard lights on.

Now the poor thing hasn't been started for a couple or three weeks, so full choke and pushed the button.  As it was turning over the brake light was modulating away merrily.  OK so this is a little annoying, but not a problem as long as it settled down when the bike was running, which it did... or so I thought!

I shut the choke within a few seconds so it was idling, but quite lumpy.  Standing back admiring my work I realised that the brake light was coming on for a split second at anywhere between 2 and 10 second intervals.  The tail light remained on and constant throughout.

Checked for loose / poor connections and couldn't find anything.  I opened the choke back up and had it idling at around 2k and the problem went away.  Shut the choke again and everything seemed fine!

Didn't have time to do any more testing, so just turned it off and walked away.

Now I'm not going to jump to conclusions and I need to do a bit more testing to see if I can identify what is going on, but I thought I would see if anyone (John in particular!!) had any ideas.

From what I can see, it only happens when turning over or cold idling without choke.  This would point me towards the supply voltage.  At the moment the tail light and modulator are being fed from a 10V regulator which should be good down to 10.5V.  I also have the correct capacitors fitted to stop any oscillation on the output.

So I guess the first question is: If the supply voltage momentarily dropped causing the modulator to reset, would this result is a quick single flash on the output? If so, what would the supply need to drop down to in order to rest the modulator?
Title: Re: LED Rear Light Project
Post by: zeuter on February 05, 2010, 06:02:53 PM
Hi Martin, 



Sounds like the regulator is dropping out with low voltage.  If it is a linear regulator (not a switching type) it will probably need a minimum of 12v on the input to do its job properly, but if the tail light is working ok and fed from the same regulator then I'm a bit baffled with the intermittent flashing and the modulation on start up, but I need to have a look at the firmware as your unit is a special one off.


More info would help when you have the chance to play with it again.


Regards, John


PS, Have you got the 30% output enabled or disabled?
Title: Re: LED Rear Light Project
Post by: martin999 on February 05, 2010, 09:01:36 PM
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.


Title: Re: LED Rear Light Project
Post by: zeuter on February 05, 2010, 10:33:10 PM
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
Title: Re: LED Rear Light Project
Post by: martin999 on February 06, 2010, 10:10:04 AM
Thanks John....... stay tuned for the next thrilling installment!!  :)
Title: Re: LED Rear Light Project
Post by: martin999 on February 20, 2010, 07:24:53 PM
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.

(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/500uS.jpg)

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

(https://i295.photobucket.com/albums/mm144/martin999xyz/LED%20Tail%20Light/20us.jpg)

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.
Title: Re: LED Rear Light Project
Post by: RCE on February 21, 2010, 08:40:30 AM
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.
Title: Re: LED Rear Light Project
Post by: Fluke on February 21, 2010, 06:48:59 PM
This is getting interesting... I agree a tie down resistor may help out, what you think John ?
Title: Re: LED Rear Light Project
Post by: zeuter on February 22, 2010, 02:32:42 AM
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

Title: Re: LED Rear Light Project
Post by: martin999 on February 22, 2010, 04:53:39 PM
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!
Title: Re: LED Rear Light Project
Post by: RCE on February 22, 2010, 06:10:51 PM
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.
Title: Re: LED Rear Light Project
Post by: zeuter on February 22, 2010, 11:36:38 PM
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
Title: Re: LED Rear Light Project
Post by: martin999 on February 25, 2010, 10:22:57 PM
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!
Title: Re: LED Rear Light Project
Post by: Fluke on February 26, 2010, 07:43:24 AM
Result!, good one Martin :)
Title: Re: LED Rear Light Project
Post by: zeuter on February 26, 2010, 04:04:40 PM
Great result Martin.  Future production will have the resistor built in, thanks for all your hard work, John
Title: Re: LED Rear Light Project
Post by: martin999 on February 28, 2010, 07:18:55 PM
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
Title: Re: LED Rear Light Project
Post by: zeuter on February 28, 2010, 10:43:23 PM
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?
Title: Re: LED Rear Light Project
Post by: RCE on February 28, 2010, 11:14:40 PM
Quote from: zeuter on February 28, 2010, 10:43:23 PM
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?


I would be interested to know if it is coming back from the modulator or forward through the brake switches, my gut instinct would be coming back from the modulator. The bike hasn't got ABS or anything has it ?
Title: Re: LED Rear Light Project
Post by: martin999 on March 01, 2010, 12:27:37 PM
Quote from: zeuter on February 28, 2010, 10:43:23 PMAw, come on Martin, I'm sure a 50mH inductor in there somewhere could totally eliminate!  ;)
DON'T TEMPT ME!!  ;D
Quote from: zeuter on February 28, 2010, 10:43:23 PMOn a serious note though,  any clues as to the origin of the spike shown up while you've been testing?
Quote from: RCE on February 28, 2010, 11:14:40 PMI would be interested to know if it is coming back from the modulator or forward through the brake switches, my gut instinct would be coming back from the modulator. The bike hasn't got ABS or anything has it ?
I reckon it is radiated EMI coming from either the ignition system or the generator.  The spikes are random on idle, but when you blip the throttle the scope will always trigger on a fresh spike.  When the engine is not running there are no spikes.
Title: Re: LED Rear Light Project
Post by: zeuter on March 01, 2010, 03:33:48 PM
Martin, is she Fuel Injected?
Title: Re: LED Rear Light Project
Post by: martin999 on March 01, 2010, 05:08:01 PM
Quote from: zeuter on March 01, 2010, 03:33:48 PM
Martin, is she Fuel Injected?

Nope, drip fed into four lovely carbs!

The ignition timing is by way of a signal generator rotor and pickup coil on the end of the crank.  This signal is fed together with the throttle position into a digital ignitor, then out to the coils and on to the plugs.

The generator is pretty standard with a built in IC regulator.
Title: Re: LED Rear Light Project
Post by: zeuter on March 02, 2010, 03:00:56 PM
Could be as the alternator comes on load as you blip the throttle and maybe at tick over it can't quite make up its mind and is going on and off load randomly.  especially when engine is cold and running a bit lumpy.  It'd be nice to know for sure.