How To Wire a 12V Brake Light and Turn Signals

Mission accomplished - I need to tidy the mounting as I have the relay in a GT power meter box with the power meter removed.... lots of cable ties and cables too... but it works!!! Thanks for making this possible for me :)

I used the opto-coupler in this post

https://endless-sphere.com/forums/viewtopic.php?f=2&t=75171&start=25#p1167956

I do have a NG unit too though was too late to cancel the first.
 
I have weird one ... I had a crash and one of the brake levers and the brake sensor was a casualty.
I have only one sensor now as a result until a replacement turns up. I've disconnected the remnants of the bust sensor - so just one connected.
However, now when I turn on the controller the brake light turns on and when I pull the brake the brake light turns off!! What could have happened?
I have 5v between the centre jumper pin and the IN and 12v between the DC - and DC + and 12v between DC - and COM - I have the brake light + connected to the NO
Is it possible something could have been knocked on the relay and it is now stuffed?
If I connect the brake light + to NC then it works - but then as soon as I connect the battery - before the controller is turned on the brake light comes on - I guess this is workable but not ideal.
 
phild said:
I have weird one ...
...when I turn on the controller the brake light turns on and when I pull the brake the brake light turns off!!
I have
  1. 5v between the centre jumper pin and the IN and
  2. 12v between the DC - and DC + and
  3. 12v between DC - and COM
  4. I have the brake light + connected to the NO
Ya - a little strange, but on first blush the opto board appears to be working - just inverted.
Measurements (2), (3), (4), and (5) look correct, but (1) looks wrong.

  • Measured relative to Gnd, (IN) should always be about 5V.
  • With the brakes released, the center pin should be at about 5V relative to Gnd. This should go to Gnd when you pull the brakes.
So if you measure across the center pin and (IN), you should normally see about 0V, which should go up to about 5V when braking (this is what powers the LED in the opto-isolator). So - according to (1), it seems you have exactly the opposite condition.

Please verify both (A) and (B) above. My knee jerk guess is that you have (IN) tied to Gnd instead of 5V.

If this is not the case and if it's convenient, you might disconnect the controller wiring from the board and measure (A) and (B) again from the controller so they're unaffected by any mishap on the board.
 
and the other give away was when I got on it to ride it the motor doesn't go until I brake :)

I have obviously connected something incorrectly when reassembling after my crash!!
 
I can't see how I can connect any of the wires incorrectly as each plug has a locator to ensure it is the correct way around.

However, I am wondering with only one brake sensor connected perhaps this causes this anomaly. With one of the sensor plugs disconnected completely and the other connected (but brake lever not pulled) - perhaps this makes the BBSHD controller think we have a brakes applied condition - hence why they are showing as on when connected to the NO terminal and the motor won't go. I will wait for the replacement brake sensor to turn up before pulling anything else apart!

Problem solved ... the brake was being reported as ON as the alignment of the sensor/magnet was off DOH!!!!
 
This thread has been immensely helpful. I'm doing a full 'motorcycle' type lighting kit and the eBrake was an open mystery. I've obtained an 5v/12v optical relay (http://www.ebay.com/itm/231429959524?_trksid=p2057872.m2749.l2649&ssPageName=STRK:MEBIDX:IT
which I've also had to put a 12v to 5v voltage regulator on the ACC (I don't have 5v on my bicycle anywhere but here).

I measure 12V at the voltage regulator in. 5V at the voltage regulator out, per the Ground contact on the board, which is also tied to battery negative and the 12V DC DC converter ground. So all grounds go to battery negative. I do not have an isolated DC DC converter.

The 5V low signal goes to in.

The jumpers on the board are set to 'low' position.

When the brake is 'squeezed' (on), the 'on' led on the board lights. I would think at this point the NO on the relay would close and the brake light LED would light. Nope.

There is weirdness on the relay side. I have 12V into the C, Brake LED + on the NO, Brake LED - to ground. I've tried to switch the 12V and LED + (NO and C), but it doesn't change anything. Either way, with brake open/closed, the NO pins are not contacted (like the relay isn't closing). The diode checker on my multimeter reads 'open' (both in 'open' and 'closed'). I'm a bit thrown that the V between NO and C isn't 0, but it reads 7v (both in 'open' and 'closed'). The NC side of the relay is always closed. It never opens. The diode checker reads 'shrt'.

There is an additional jumper on the board that is really hard to read, it might say IQVCC. I have tried with this jumpered and open, no change anywhere.

Is it just a blown relay? Or is there a ground problem that is preventing the board from switching? I have a 12V/12V board on order because it was only $2, but it's on the slow boat from China, so I have no easy way to test if it's a bad board or bad relay.

I doubt it is 'too little' current on ACC to switch the relay, the voltage regulator is rated to 2A, and is running off a 10A DC DC converter.

Thanks for any help.
 
Grinchy said:
I've also had to put a 12v to 5v voltage regulator on the ACC (I don't have 5v on my bicycle anywhere but here).
The converter is fine, but did you not have 5V on your throttle connector?

Grinchy said:
I measure 12V at the voltage regulator in. 5V at the voltage regulator out, per the Ground contact on the board, which is also tied to battery negative and the 12V DC DC converter ground. So all grounds go to battery negative. I do not have an isolated DC DC converter.

The 5V low signal goes to in.

The jumpers on the board are set to 'low' position.

When the brake is 'squeezed' (on), the 'on' led on the board lights. I would think at this point the NO on the relay would close and the brake light LED would light.
Nope.
Your setup all sounds good - if you have a 5V relay. Unfortunately, it looks from the eBay item title that this is a 12V relay. So - you need to look at the relay itself and examine the part number.
  • 12V relay: SRD-12VDC-SL-C
  • 5V relay: SRD-5VDC-SL-C
Which do you have?

It seems the relay is never pulling in which pretty much explains all the symptoms and measurements you see. That little sucker has big contacts and makes an audible click when activated. So - I'm thinking you have a 12V relay as the eBay title suggests...

  • I'm puzzled if your relay is 5V - hoping this isn't the case...
  • However, if it's a 12V relay, you can either order up the proper 5V board or make the hack below. Basically, that extra jumper hooks the relay ("IDVCC") up to be driven by the voltage you supply on the input terminal screw #3 ("Vcc"). The hack here is to omit the jumper, then hook up pin 1 ("IDVCC") to 12V to drive the relay with the expected voltage. If you are in doubt, remove the jumper and measure the voltage from each of the two pins to GND. One will show 5V the other 0V. You want to jump the 12V to the "0V" pin (Should be the one labeled "IDVCC").

    • (Be very careful about jury-rigging anything since accidentally touching the 5V pin with the live 12V will make your DC/DC converter go away.)
    schematic_12V_hack.png

  • FWIW: The odd 7V you are seeing across the COMMON and NO relay connections is because you are looking across the switch that has the 12V + brake light + Gnd hooked up. I'd expect this to read more like 12V, but there seems to be something funky happening with your meter there. In any case we don't expect those open contacts to read 0V.
 
Not that it matters, but just as a technical note:

FWIW, with the MC LED tail/brake lights I've used, I've found that I get about 7v or so across the open circuit of the ebrake lever (not using a relay), which is wired from the brakelight's active-low input to system ground, when the lever is not engaged. Reads 0V when it is engaged.

I don't know why it reads that though (doesn't matter which meter I use, even the Fluke 77-III or a cheap HF / centech thing).
 
Thanks for the quick answer. I can sure pull the jumper and input IDVCC at 12v. The relay is labeled 12V. I think on rereading the ad that this is probably a 12v/12v board. Never mind that they have a diagram of 5V going from Arduino into the ACC. I am crazy to think it is ridiculous to build a product that will NEVER work unless you pull a jumper and supply external 12V?

My bike has 'manufactured' connections to the controller and I didn't want to cut into the throttle wire. I pulled the controller and added the sources to the board pins (controller on, ebrake on). I thought about sourcing the 5V throttle, but at the time I didn't need 5V because my whole system is 12v. It was easier just to put in the regulator than disassemble the controller again.

**Edit to reword paragraph 1**
 
Ok. I just pulled the voltage regulator and put ACC to 12V. The relay NO is now contacting (audibly even) with brake leverl actuation. This was the only change necessary, I didn't leave the board at 5V and use the IDVCC jumper solution to separately supply 12V to the relay.

Really appreciate the help!
 
Ok - gotcha on the sealed wiring. A quite reasonable choice.

Grinchy said:
Ok. I just pulled the voltage regulator and put VCC to 12V. The relay NO is now contacting (audibly even) with brake lever actuation. This was the only change necessary, I didn't leave the board at 5V and use the IDVCC jumper solution to separately supply 12V to the relay.
Glad you got it working. :)

The only difficulty with your solution is that the controller or CA ebrake input is tied in parallel with the signal input to the opto-board. By tying the board Vcc to 12V, there is a small trickle of current into the 5V supply from the 12V supply and the ebrake input will see more than the 5V for which it was designed. In truth, there is negligible current, but it's a sub-optimal situation. I might suggest either proceeding as described above with 5V Vcc and 12V on the IDVCC pin, or splitting out one of the ebrake pairs and dedicating it to the present 12V opto-board. (That said - in spite of any unsettling engineering aspects to your hookup, it does seem to be working, so...)

  • FWIW: I use the 'dedicated lever' approach on my bike since I like to be able to apply power on hills before releasing the brake. This has nothing to do with the brake light circuit per se. With both levers wired to the controller ebrake input, the controller is dead until you release both brakes, so there is some advantage to only having one functioning ebrake allowing you to slip the brake on steep getaways. Since the other ebrake is just sitting there (left - the non-throttle side) - I used it for the brake lights....
 
After untold years, eBay shut down their search.ebay.com search url which was used in this thread (and sadly many other posts).
The search links in the OP have been revised so that the eBay parts searches work again...
 
Fascinating. Didn't consider there would be back current going uphill from the board to the 5v/0v line off the eBrake. I'm already a bit sad I didn't source an isolated power supply, so this is one more dirty deed on this build.

I can easily hook it up using the IDVCC pin if that is strictly better; looks like the random board I got off ebay has a lot of useful options too it. . .
 
Yep - I've looked at quite a few of these - some are easier to press into service than others - this one is not a bad little board. The size and price point on these is so low that they chose not to put an extra screw terminal for the 12V, but at least they made it possible to achieve isolation with that mysterious little IDVCC header. Once you determine it works in an ad hoc setup, you might just snip off the unwanted Vcc pin, solder a 12V lead to the IDVCC pin, and slip a bit of heatshrink over it. Done.
 
Thanks everyone ... great thread. You inspired me to add lights to my ebike (and a horn and GPS tracking too ... why not!) Attached is my wiring diagram which may help others.

ebike lights wiring.PNG

I got a harness extension cable for the BBSHD and spliced into the red and white wires for the brake signal. I just have a standard brake light (not flashing). I used a 3-position switch on the output of the running light strobe so I can set the running lights to ON, OFF, or STROBE.

I found some "switchback dual color" LED strips that I mounted on my handlebar brake reservoirs. When the turn signals are activated, the white LEDs automatically turn off so you can see the amber LED turn signals more clearly. (See pic). When the turn signals are deactivated, the white LED running lights turn back on.

I housed everything in a large controller box and ran all the wiring to it using 22ga 5-conductor wires. All the wires were wrapped in split braided sleeve to make it not so ugly.

Not shown in the wiring diagram are some amber LEDs that I mounted to the controller box for some side marker lights. I just wired them to the running light circuit.

For the GPS tracking, it's just an old cell phone with a prepaid plan for about $10 every 3 months. Using one of a few different car alarm apps, it can text another phone the GPS location upon request.
 

Attachments

  • IMG_20170722_211147326.jpg
    IMG_20170722_211147326.jpg
    273.9 KB · Views: 3,439
  • IMG_20170722_211341132.jpg
    IMG_20170722_211341132.jpg
    59 KB · Views: 3,437
  • IMG_20170722_141639484.jpg
    IMG_20170722_141639484.jpg
    110.3 KB · Views: 3,439
mrgeary said:
Thanks everyone ... great thread. You inspired me to add lights to my ebike (and a horn and GPS tracking too ... why not!) Attached is my wiring diagram which may help others.

View attachment 4

I got a harness extension cable for the BBSHD and spliced into the red and white wires for the brake signal. I just have a standard brake light (not flashing). I used a 3-position switch on the output of the running light strobe so I can set the running lights to ON, OFF, or STROBE.

I found some "switchback dual color" LED strips that I mounted on my handlebar brake reservoirs. When the turn signals are activated, the white LEDs automatically turn off so you can see the amber LED turn signals more clearly. (See pic). When the turn signals are deactivated, the white LED running lights turn back on.

I housed everything in a large controller box and ran all the wiring to it using 22ga 5-conductor wires. All the wires were wrapped in split braided sleeve to make it not so ugly.

Not shown in the wiring diagram are some amber LEDs that I mounted to the controller box for some side marker lights. I just wired them to the running light circuit.

For the GPS tracking, it's just an old cell phone with a prepaid plan for about $10 every 3 months. Using one of a few different car alarm apps, it can text another phone the GPS location upon request.

GREAT first post! Welcome to ES! :D
 
What he said ^^^^^^ :D

--and I'm sure that there are many folks who will appreciate your detailed wiring diagram. Your approach was exactly the intent - to pick and choose from the circuit snippets to create a custom installation for your particular needs. Nice job.
 
teklektik said:
I have one that uses the exact same board but has a 10K resistor for R2, which makes it inapplicable for our use - but this version instead has a 2.2K resistor which is exactly what we need (I needed to blow up the image and compare part labeling).

The circuit for my older sample PCB is as shown below -- the new image seems to indicate exactly the same traces, part layout, etc

Hi!

I don't know if I am supposed to write to a thread this old but I run into some troubles while trying to run wires for my first e-bike...

Ordered some relay boards before reaching the referred post and of course they have 10K resistors :(
Is there a difference in the other components too or is just the one resistor that is altered? Could I just replace it with 2.2K one?

I could also use one relay with a high trigger. Is there similar fashioned weird controller sparing 5V trigger wiring for it? Sorry, my plans are far greater than my actual knowledge in electronics.

Thank for this awesome thread.
 
I must be missing something here.
Why wouldn't the following eBrake wiring diagram work?
It is vastly simpler than what is being described in this thread.
(just trying to keep things as simple as possible)

Happy to be proven wrong.

Michael
 
Well, one of the wires on most controller's ebrake connectors is ground. The ohter is usually a signal input line. So you wouldn't be able to wire up that part of the diagram the way you have it.

Instead, you'd hook up the ebrake connector's ground to the system ground, and the signal input ot the most negative side of the brake light..

Some require 5v (or 12v or higher) on that line to activate the ebrake.

But most of the ones I've seen are designed to ground that line, rather than actually input a voltage to it, as there's usually an internal pullup resistor.

You'll have to check your controller's design for which signal it needs.

However, isolation of the lighting system from the traction system can be important in the event of wiring faults or other issues (especially in a crash that damages things), and that's one reason why it can be more complicated than that.
 
amberwolf said:
Some require 5v (or 12v or higher) on that line to activate the ebrake.

Thanks for setting me straight.

I'm now considering a separate 5v brake-only subsystem.
Would just need a 72V-5V converter and a separate circuit from the brake switches to the controller as well as to the rear brake light.

Or not...

M
 
MJSfoto1956 said:
I'm now considering a separate 5v brake-only subsystem.
Is that what your controller requires to activate it's ebrake?

(as I said, most of them just ground that input to activate it)

FWIW, if yours does use a 5v signal, then you don't need a DC-DC to create 5v, as the controller already outputs it for use on that brake line, and would probably have a third wire just for that on the ebrake connector.
 
amberwolf said:
FWIW, if yours does use a 5v signal, then you don't need a DC-DC to create 5v, as the controller already outputs it for use on that brake line, and would probably have a third wire just for that on the ebrake connector.

After reading your voluminous historical posts on this subject (thanks!) I'm leaning towards just wiring a simple SPST relay off the rear brake light. That will close the EBS- circuit nicely.

Michael
 
It's probably safer that way than directly connected to the lighting system. :)

(just in case...cuz Mr. Case can be pretty nasty when he's not invited and something goes wrong :p )



FWIW, I still use a separate lever for the lights vs the ebrakes, partly so I can engage the lights without engaging any braking (though a button on the lever would do that too, or a lever with multiple engagement points, etc) for certain situations in traffic where I just need to let someone behind me know I'm about to do something other than continue just like I had been, but a turn signal is not appropriate, or if they are approaching me too quickly from behind, the brake lights usually get their attention and they slow down a bit, or change lanes, rather than getting so close they'd have no reaction time if I did have to actually brake.

Mostly it was just simpler to build that way, though slightly more complicated to learn to use (it's second nature now).

If I were to redo things, I'd power a DPDT relay coil (indirectly) from the single switch on the brake handle, and use one set of contacts for controller brake lines, and the other set for brake light lines. (which IIRC is what I did on DayGlo Avenger, because the Fusin controller I had at the time used a hall sensor in the brake handle, so it used a 5v signal; none of the other controlllers I've had do that).

But I'd probably actually use a waterproofed 12v+ hall sensor and a magnet on the brake lever for the detection. If the hall couldn't sink enough current to directly drive the relay, I'd add an open-collector transistor to translate it's output to drive the relay. The reason for doing this complicated switch is primarily for weatherproofing, but also because I can put a magnet and a hall on any brake lever, or somewhere else on the brake line or brake arm, so if I am not using a lever with a built in switch it won't matter. Reed switches are often fragile, and I've broken them even within encapsulations (including inside speedo sensors), so solid-state switches would be better for my application.

And because if I can overcomplicate something, I'm likely to do that. :p
 
amberwolf said:
And because if I can overcomplicate something, I'm likely to do that. :p

I'm trying to do the opposite -- keep it as simple as possible! FWIW, there are 12V relays that use very little power, for example the Panasonic CR Series uses just 1.4W. Anyway, this is what I'm thinking. Notice that that this solution doesn't care *how* the brake light is powered on.

M
 
Back
Top