How To Wire a 12V Brake Light and Turn Signals

teklektik

100 MW
Joined
Mar 26, 2011
Messages
4,019
Location
CT, USA
Long story short - I originally built my bike with 12V motorcycle-style headlight/taillight/turn signals and last summer added a brake light controlled by the normal 5V ebrake signal to the controller. This last addition was to become a post my build thread, but it seemed that a new thread about wiring a complete generic lighting installation might be more useful. So here we go... :D

  • In any case - this thread is NOT a discussion of whether or not ebike lighting is A Good Idea from a safety or any other standpoint.
    It's expressly about how to get the lighting working for those who want it...

    00_rearRackMountLight Assy.png
Overview

Some builders don't feel comfortable assembling custom stuff (soldering PCBs, etc) so the idea here is to use cheap available off-the-shelf parts and point-to-point wiring to get lighting features that will work on pretty much any ebike regardless of the controller, ebrake sensors, or light type (LED or incandescent). Total parts cost for all the electronic gadgets used here should be about $15-$20 or about $5 if you just want a basic 12V brake light.

Three different lighting issues are addressed and separate demo circuits show how to implement each:
  • ebrake-activated brake light,
  • turn signals with an optional indicator or beeper, and
  • a strobe circuit.
The circuit snippets are separate so use only those that fit your needs. There are also a couple of examples of how to combine them into more complete solutions.

  • Note: 'Annoying details' are called out and indented - skip them if you just want to get the big picture...
The strategy is to use readily available 12V automotive and motorcycle lighting. Light selection and mounting is a matter of personal taste - here we're just looking at lighting them up - the particular lights are up to you. The 12V supply is not addressed here either - there are lots of threads about that with units available from eBay as well as familiar vendors like Grin, EM3EV, or Lyen.

  • Details: Automotive '12V' stuff is not really 12V at all - that's really an industry term for '13.8V-16V' - not an actual operating voltage. So - at the outset we are expecting to find a '12V' source to drive this lighting that may be a '12V' DC/DC converter (usually 13.8V) or perhaps a 120VAC wall-wart supply (e.g. like a Toshiba ADP-60RH laptop supply). Use of switching supplies is not the topic here and is mentioned only in passing to note that lighting will appear noticeably dimmer if actually operated from 12V, whereas a nice 15V or 16V converter will add some visual punch - it's actually 'in spec' for the lighting components.

The Brake Light Problem

Brake lights are not supported by common ebike controllers and present a common obstacle that is often addressed using extra switches (e.g. magnetic reed or chopper brake switches). We are instead interested in using the generic ebrake signal delivered to the controller of any ebike - regardless of how it is generated. Needless to say, if you have no ebrakes, then this approach isn't for you...

  • Details: The illustration below shows the two ends of the problem: a generic controller or CA V3 ebrake connection and two conventional taillight assemblies - one incandescent and one LED. The ebrake system works by having a pull-up resistor internal to the controller that holds the Ebk signal high. When the ebrakes are applied, the Ebk signal is brought to Gnd signalling braking with a 'low-true' signal. The currents through the ebrake switches are tiny (a few ma) and the switching may be provided by mechanical or magnetic switches or electronically via hall sensors (e.g. HWBS - hidden wire brake sensor). The lighting assemblies illustrate what must be driven - these are commonly two lamp brake/taillight units with a common ground that must be driven by switching 12V to either the brake/tail light sections. Common currents per bulb for incandescent systems are around 2A and about 1/4A or less for LED units - your mileage may vary...

    01_InAndOutInterfaceRqmts3.png
So - we need to take a low-true 5V signal of a few ma and use it to supply a couple of Amps of 12V high-true power to the lights.


An Ebrake Solution

Our approach uses an opto-isolated relay to isolate the low-current 5V side of things from the 12V big-current side. The basic idea might be drawn like this:

02_BasicOptoisolatedEbrakeCkt.png
  • Details: An opto-isolator is basically an LED and photo-diode sealed in a light-tight chip. Turn on the little LED, the photo-diode sees the light and makes a signal that can be amplified to turn on a relay. The relay contacts are hefty, electrically neutral, and can be hooked to whatever we wish.

    Here we see two interesting things.
    • The hookup of the opto-relay front end can be done in a manner that looks very much like the ebrake/controller circuit (better for sharing signals).
    • The 12V lighting is switched in a nice isolated way with the exception of the shared ground.
    • More Details: The 12V accessory ground and the traction battery ground don't need to be shared, but most common 12V converters use a shared IN-OUT ground, so it's drawn that way here to minimize confusion. Sharing ground isn't an issue until the battery voltage gets really high and complete 12V accessory isolation is a matter of safety. That said, isolation can be a solution to unavoidable 12V frame grounds due to old-style lighting (see below).
To flesh out the circuit, we need only hook up the opto-relay as shown below. The incandescent light assembly is used only to make the illustration smaller - all works fine with the LED variety. A simple switch is shown for the taillight as a means to feed it 12V - just an example.

03_12VEbrakeLight5.png
  • Details: This works by paralleling the controller low-true 5V input with the opto-relay 5V low-true input so that closing the ebrake switch drags both inputs to ground. So - when the ebrake signal goes low (to ground) the controller cuts the motor power and the opto-relay delivers 12V to the brake light. Easy-peasy.

    We are borrowing 5V from the throttle connector - wire this up any way that's convenient - it's typically the red throttle wire. If you are using a CA V2.3 or V3, you can pull the 5V from the CA throttle or AuxPot connectors or if a V3 just plug into the unused controller throttle connector. Ebrake connectors typically have a black (GND) and yellow or other color for the Ebk input - the polarity is important to get the opto-relay to operate properly. If the wire coloring is not revealing, test across the two ebrake pins of controller or CA connector with a DMM. If the meter shows about +5V the red meter lead is on the Ebk pin, if it shows -5V the black meter lead is on the Ebk pin.

The opto-relay is the critical and seemingly uncommon ebike part, but it's actually a very common microcomputer part! Such things are available as '12V Opto-Coupled Relay Control Boards' and can be had for $3-$4 on eBay. The only slightly tricky part is ensuring that the board has both low-true input and isolated 5V supply pins. Shopping for a combined 'Hi/Lo true' input (or trigger) pretty much ensures that both connections to the resistor and opto-isolator are routed to input pins distinct from the 12V driver back end, although many (most) of the plain 'low-true' types seem to have the proper design as well. I found some suppliers will forward a schematic which answers any questions immediately.

I can recommend this opto-driver board on eBay. It has nice construction, easy connections with clear markings, and a schematic. I used a 4s JST battery balance lead from eBay for the input connections, but soldering is always an option.

  • Details: I have sampled several different boards, some with screw terminals for both input and output and all worked satisfactorily on the bench. This unit just happens to be the one that fit my cramped mounting situation and has lots of miles on it. So - very high tested confidence, but not particularly 'special'. If the LED/resistor front end on a schematic is isolated from the 12V (similar to the one above), you should be good to go. Also, 'combined Hi/Lo trigger' boards often have a little selector jumper you must set properly (to Lo). Some boards may mention 'Arduino', but it's just a particular kind of microprocessor - not important - the 5V interface we need is the same.

Turn Signals

Common automotive flasher relays make turn signals easy to wire. The only matter to keep in mind is that some flashers expect a heavy current draw to work and don't work with LED lighting. The possible benefits of LED vs incandescent turn signals is another discussion, but there is no real difference in wiring, so just get a LED-compatible flasher (they can drive either type) and be done with it. A CF13 JL-02 LED-compatible flasher relay is a good choice for about $5 on eBay. These are often sold with a socket, but standard 1/4in FastOn connectors work fine and may help in tight installations.

06__CF13_JL-02.png

Here's the basic turn circuit for simple 3-terminal automotive flashers:

07_flasherRelayBasic_v1.png

This scheme mates up directly with common motorcycle turn signal switches as well as the familiar controller '3-speed' switches (SPDT center-off). Again, although shown with incandescent bulbs, LED parts work the same.

  • Details: Unfortunately, motorcycle turn signal switches are non-self-canceling which leads to forgetting to them turn off. One strategy is to add an indicator or beeper to the circuit. This is often done with a 4-terminal flasher, but adding a couple of diodes does the job and allows use of readily available LED 3-terminal units. This is shown below with both alert types in place - just omit either if it doesn't appeal to you.

    08_flasherRelay_v2.png
    • More Details: The D1, D2 isolation diodes above can be wired in-line, but for physical robustness and ease of replacement, a 3-pin JST connector (or similar) provides a handy mount. Add a heatshrink sleeve and you have a nice pluggable 2-diode isolator.

      08a_2-diodeIsolator.png

Brake Lighting and Strobe

Standard 12V lighting can be strobed using a LSC-100B strobe module available from SuperBrightLeds for about $5. As the picture shows, this is a tiny thing and easy to hide. Wiring is equally easy.

09__LSC-100B.png
10_BasicStrobeModule.png

This strobe module can be combined with the ebrake circuit above to normally strobe the brake light and turn it on continuously when brakes are applied - just hook up the sample strobe circuit above to the normally closed relay contact. This addition might look like this:

View attachment 13

EDIT - For folks not too comfortable with the wiring instructions above, here's a pictorial wiring diagram from a subsequent post in the thread that shows the bare minimum ebrake/strobe hookup without switches, etc. For only a basic brake light w/o strobe, just leave out the black LSC-100B strobe module and its three connections.
(Be sure to check pin labeling in case the board layout differs from as shown...)

View attachment 1

  • Details:
    There are a number of options for switching with module locations and number of wire runs being factors. The circuit above shows a way to control the strobe and tail light separately and leave the ebrake function always active. The circuit below shows a variation that allows the ebrake and strobe to be switched OFF for stealthier bike path use and ON for road use. Neither the strobe nor the opto-relay draw appreciable power so they can be wired unswitched to the main power and just the output (light) connections switched if that works out easier in the overall wire harness.

    13_12VEbrakeLightWithStrobeSwitched5.png

    If the headlight system is 12V then that can be tied in to minimize the number of switches. The circuit below is from my build and shows how a couple of diodes can piggy-back the taillight power onto the hi/lo beam switching, eliminating the extra switch. Here you would use the 1A diodes for LED brakes lights and the 3A parts for incandescent. The circuit also shows another variation on switching the ebrake and strobe power.

    The bike in this example has a motorcycle light with both an H4 halogen bulb and a small daytime running light in the reflector. Although not shown in the circuit, the running light has been replaced with a socket-compatible LED light and hooked to the strobe output. This gives a front strobe in the headlight unit. The same idea can be used for any secondary light to get a front strobe almost for free (within the strobe power/current rating).

    14_SampleH4HeadlightBrakeStrobe2.png
Putting it all Together

The wiring for this is simple point-to-point stuff and there are no special considerations for length of wire runs, etc - you can position the parts up front, midway with the controller, or wherever it's convenient. Any lighting can share the same ground wires wherever that simplifies wiring. The strobe and flasher relays are automotive parts and pretty physically robust, but the opto-relay board is a computer part and deserves a little attention to avoid shorts to the connectors and traces. I removed the nylon mounting pins, put a square of plastic on the underside (like from a deli container lid), sleeved it with heatshrink, and tucked it away in the headlight housing. The parts would all fit easily in a small project box, an electrical junction box, a short length of 2inch PVC pipe with endcaps, etc. Below you can see the components in my build just loosely wired up. They just get stuffed into the bobber headlight and are completely hidden.

15_AssembledComponents2.jpg

So - that's pretty much it circuit-wise. Just pick and choose the parts or features that seem interesting to your build.

A Special Note About Lighting Grounds

Most if not all contemporary automotive lighting assemblies have a neutral mount and bring out a separate ground wire. However, many of the motorcycle choices instead use a live frame ground for the sake of compatibility. Hooking up a live frame ground to the traction battery is generally considered A Very Bad Plan on an EV and so you may need to either find alternate lighting, run the 12V DC/DC converter isolated (i.e. do not share the 12V ground with the traction battery ground as shown earlier), or simply modify the lighting assemblies.

The illustration below shows an example of isolating a lamp socket from the frame and adding a ground wire. In this case the turn signal is plated plastic and the plating carries the frame ground connection. A solution is to use a Dremel tool with a small round burr bit to remove the plating around the socket mounting bosses - thus isolating them, then attach a new ground wire to the lamp socket itself. Lacking a Dremel, you might use a sharp knife to scrape the plating off the sharp edge of the boss face to isolate the round mounting face from the cylindrical boss body. Other lights may use different mounting schemes, but the conversion strategy will be similar.

16_TurnSignalGndMod2.jpg

Anyhow - sort of a long post, but I hope a workable recipe for cooking up motorcycle-style lighting.
A few bucks worth of parts and a bit of wiring should get your lights working in no time. :D

  • 17_sampleLightAssyMounted2.jpg
 
Just what I have been looking for. Thanks Tele.
otherDoc
 
I bought four of those strobe thingies and none of them worked. It would flash rapidly then slow down and then go into solid.
 
Well, that pretty much sucks...

My experience is quite different. I have several and they all have worked splendidly. One has 11000mi on it at 13.5V and has never failed. I have driven a Grin Tech CycleLuminator at 19V for a front strobe with no issue. Since SuperBrightLeds has been selling them for years, it seems that if they were severely flawed, they'd pull them considering the low item cost doesn't warrant the Support headache.

These are limited to 24V and a max of 1.25A (presumably at the lower voltage spec of 12V) -- not sure if that entered into your issue.

Perhaps SuperBrightLeds got a bad batch from the supplier - I'm sure they'd like to know and maybe they can help you out.
Anyhow, a good heads-up - it will be interesting to hear how it plays out.

  • EDIT: Hmmm I assumed what you described was a one-time burn-out kind of behavior. But - if they do that every time they're powered up then that sounds exactly like the LSC-100A, not the LSC-100B.

    [color=#0000BF said:
    LSC-100A[/color] Brake Light Strobe Description"]Brake light strobe module works with LED brake or reverse lights.
    Strobe module rapidly flashes bulbs 4 times for 0.4 seconds,
    slowly 4 times for 2.6 seconds, and then
    lights remain on bright until brake pedal is released. 12V DC
    [color=#0000BF said:
    LSC-100B[/color] Brake Light Strobe Description"]
    This pulsing strobe module produces a continuous flash that is perfect for vehicle LED warning lights or hazard lights.
 
Thank you very much!!
 
Great post Teklektik, I plan on adding motorcycle signal and brake lights to my ebike this winter.

The use of the opto-relay to trigger the brakes is really elegant; I was going to use a leaf switch but I’ll use your opto-driver board solution.

I have a question regarding grounding of the lights. My light housings are all metal and an led festoon bulb is pressed against the housing as a ground therefore modification to achieve ground isolation would be difficult. I would prefer not to use alternate lighting if possible.

You also suggest another solution is to run the 12V DC/DC converter isolated (i.e. do not share the 12V ground with the traction battery ground). How can I isolate and ground the converter and the accessories using the 12v output?

Thanks for sharing your expertise,

knurn
 
Thanks for the kind words - and the thanks from the other posters as well - good to see the interest :D

I'm afraid that isolating the 12V and traction battery requires getting an isolated converter - which can be a problem since most converters are non-isolated. Although many appear isolated because they have four leads, it often turns out that the IN(-) and OUT(-) are indeed common. I know that such converters from Lyen and EM3EV are non-isolated. You are just going to have to look and possibly contact vendors about the isolation thing.

If your battery voltage is high enough (typically about 45V), you can use a small 120VAC switching supply: either a plain PCB or a wall-wart. Because these power supplies are meant for the mains, they are 100% isolated and in my experience, generate little electrical noise and do not cause a big current draw (spark) on connection (similar to switching on the controller). The fact that these supplies are AC is not an issue - they generally have a rectifier bridge on the front end to convert the AC to DC anyway and the DC from your battery just shoots straight through.

Although these are rated for mains power they will generally run at much lower voltages - the startup voltage is really the problem. There are threads on this, I mentioned one above Cheap DC-DC converters for over 60v input. The wall-warts are nice because they are pretty much weatherproof from the git-go. Which supplies work well (or at all) is crap shoot since these voltages are way outside their design spec. I have tried many and typically find the netbook/laptop supplies to be more likely to perform than the cheapie 12V 1-2A warts from eBay (although some of those work remarkably well). That thread has test data on the Toshiba ADP-60RH laptop supply I mentioned above - I have a genuine non-cloned version and it works nicely. It's about 4x2x1 inch and 15V @ 4A - plenty to run LED lights and charge a phone via a standard 12V phone charger. Smaller netbook supplies can be found on eBay with reduced current capacity.

That's really all I've got on this converter stuff...

  • Anyhow, if you are happy with your final converter selection, you might post back for others. I was also thinking that maybe folks who hook up lights might post up a quick shot of their lights or installations. This wasn't in my mind originally, but it might give some ideas and occasionally bump the thread back into visibility... :D
 
Thanks for sharing the detail Teklektick. One thing that can simplify brake lighting further is the "ebrake high" available on quite a few of the Chinese controllers. While the "ebrake low" standard is short to ground to activation the ebrake cutoff of the controller (including regen if turned on), the ebrake high activates with a positive voltage that can be anything from about +8v up to pack voltage. That means if you have brake lights you can simply connect that controller wire to your brake light circuit, which is exactly what the Chinese do on their scooters and ebikes with full lighting.
 
I have placed orders in for a few waterproof led strip and a few superbrightled.com strobe controller to make a braking light system bar to attach behind my child bicycle trailer. So far with my limited understanding of how this stuff works I know how to wire the turn signal which should be pretty straight forward with the left and right switch on my handlebar. Now the part I am getting confused with is the ebrake lever which when not compressed the switch is ON? I took a voltmeter and read 4.98v when the lever is left alone, when I compress the lever the voltage is cut off. How do I get a signal to the strobe controller when there is no voltage going thru the wire when the lever is compressed?

Thanks Simon
 
Simonvtr said:
Now the part I am getting confused with is the ebrake lever which when not compressed the switch is ON?
No - the other way - switch is 'open' or OFF when brakes are not applied. Unplug your ebrake wiring and set your meter to 'resistance' or 'continuity' and put the probes across the ebrake connector pins. You will see the resistance go to zero or get a beep when you pull a lever. This is the switch closing.

Simonvtr said:
I took a voltmeter and read 4.98v when the lever is left alone, when I compress the lever the voltage is cut off.
Yep. Working exactly right.

Simonvtr said:
How do I get a signal to the strobe controller when there is no voltage going thru the wire when the lever is compressed?
That's not the way the sample circuits above work. They turn on the brake light when the levers are depressed. The strobe is an add-on. One of the circuits shows the strobe wired up to blink the brake light continuously but change to full ON when the levers are pulled. This gives standard 'bike blinky' rear safety light all the time and a standard brake light effect when you do so.

It sounds like you want something entirely different - a strobing brake light without the otherwise continuous strobe? This can be easily achieved, but you will still need the opto-relay as the go-between.

So - what behavior are you looking for? Clarify please.
 
Thank you Teklektik you were right and I was wrong.
My voltmeter made a beep only when the brake lever was compressed.

I order both the LSC-100B strobe module & LSC-100A strobe module
The 100B I was going to use it for the turn signal and the 100A for the brake light because if I understand right it flash faster and faster then stay on solid?

My idea was to have 4-5 rows of red led strip
top and bottom row will be always on while the middle rows will be off until I grab the brake lever and make it flash till it turn soild.
Does that sound right?
 
Ok - You would probably wire it up something like this. Here the opto-relay detects the ebrake ON condition and just turns on the LSC-100A brake strobe module that is otherwise wired conventionally.

12VStrobedEbrake1.png

You can certainly press the LSC-100B into service as a turn signal flasher, but it has a non-standard sort of pattern
<fastblink><fastblink><pause>...<fastblink><fastblink><pause>...

[youtube]_QxdDXC5P4E[/youtube]
[youtube]co9gm7lZxag[/youtube]

Personally, I prefer to adhere to familiar standards for brake and turn signals since these are maneuvering lights and I don't want to lose precious seconds while a driver has to figure out what a novel flashing pattern means. This is a little different than lights for general rider visibility like the familiar 'bike blinky' where reaction times are not in play. I don't want to discourage you or make too big a thing of it - but if you turn on both videos above - as might occur braking before a turn - you can get some notion of the light show the driver will need to interpret.

I might recommend the more conventional turn signal, then use your 100B as part of your rear light assembly. The arrangement below would let you hook all the LED rows together and switch from normally blinking to full ON when braking. The diodes are likely unnecessary, but I'm not sure what the modules are using for a driver so they're there to be safe. Alternatively, you could omit the diodes and instead run the top and bottom LED rows from the 100B and the middle LED rows from the 100A. The issue with this approach is that there is no clear break between the blinking 'bike blinky' behavior and the initial blinking of the brake light from the 100A.... so maybe not such a good plan after all...


Anyhow - just a thought.... :D
 
Thank you Tek and I think you are right about being standard with brake lights.
4 rows blinking then turns solid when braking.

I am bad at reading electronic schematics "never went to school for it" but I think I have a 60% understanding of the drawing you posted.
Once everything comes in I will start working on understanding more how everything comes together. I am the type that has to see it to understand it.
I have order 2 of everything just in case I blow things up during the learning process.
 
Excellent info, and timely as well. I have just ordered, headlights, brake lights, turn signals, horn, lighter, usb outlets,a stereo, and all the flashers, converters etc. This stuff is so cheap, there is no reason not to have them. i,m done with carrying batteries, cords etc, and having my lights stolen. I have a huge battery compartment, so everything will be inside and bolted up. I wouldn,t get so elaborate on a regular bicycle, but decent lights, is a must. My owm bike is 300lbs fully loaded, and is over 9 feet long, so I have lot,s of space and a couple extra pounds means little. I,m building a new battery compartment that can hold it all, and a tail box for my little dog, tools,gear etc. 2 mac motors, 3000w total. one is a mid drive, the other in the rear wheel with a moped rim, spokes, and tire. I can climb straight up at 12 mph or zip along at 27mph (gearing dependent). All while listening to my tunes, smoking a cigarette, talking on the phone, and watching a movie on my tablet. lol Sorry for wandering off, cabin fever. Here,s a photo of last years model, getting home, after 1300 mile trip. Never took out a wrench! This thing needs lights.
 
You forgot to post the photo :roll:
And you should switch to vaping :wink:

I got my Led strip in and the 100b & 100a flasher.
Waiting on the OPTO Relay which atm is stuck in NY and with the storm that is hitting the east coast I'm not sure it will be delivered this week.
But I did test out the led and they are bright even @ 2s lipo.
3s a little bit brighter but you can not tell during the daytime maybe at night you can tell the difference between 2s and 3s.
 
All the parts showed up today and after taking a look at the relay I thought my understanding was 60/40 but I its more like 10/90.
This is what I understand so far.

uc


Can you use the this bottom empty picture to connect the dots for me.

uc


Thank you
Simon
 
Back
Top