Creating MOSFET switch to run lights Raleigh Trail XC

NeilP

1 GW
Joined
Nov 27, 2010
Messages
5,012
Location
49.17303, -2.05354 Jersey, Europe
Hi guys

I just picked up for free a generic Rayleigh Velo trail e-bike...low powers from geared hub 36 volt PAS only bike

It has a little 3 button handle bar control unit

As in pics below

Power
Assist level
lights on/off

Now even the manual says that the lighting part is not connected on this bike..but it does 'work. Pressing it does light up a red led in the control box.

I have been told there is an SMD MOSFET on the board and it should be outputting battery voltage on to one of un used headers on the PCB...yet to test it, Picture of the unit with the top off does not show it..but there isa row of holes on the PCB, unmarked, for wire attachment

But this wires..not going to take much current to run decent lights.

So assuming go can find the switched output on the PCB in the control unit, I'd hope to run a wire to it to run an external relay/MOSFET/transistor "switch"




Assuming I have switched (36-42) battery voltage out of this control unit run from the light 'button' ..how would i drive a MOSFET from it ?


Raleigh Velo XC - power display.jpg


Untitled.jpg
 
I would expect the state of the light switch in a handlebar controller to be encoded in the signaling protocol to the e-bike controller, so there wouldn't be a switched light signal. But you could probe the harness and test for one. Also probe un-used outputs on the handlebar unit.

The other possibility is to pull a signal off the LED that lights up when you press the headlight display. Use that to drive your mosfet.
 
I had been told on the Pedelec forum that there was in fact an actual switch output of battery voltage on the board, and not via a switched encoded signal to the the controller to switch the light. The opinion was that some of the bikes with OEM lights did take power direct from the handle bar unit. But I'd much rather drive an external relay/switch from the control unit to allow brighter lights..

So yes probe the board, yes that was the plan.

What I was getting at, wanting was HOW do i drive the MOSFET from that switched battery voltage out put...or as you suggest from the LED .


I would have guessed that I can not just use a MOSFET by itself. I can't just fire 36volts direct to the gate and battery at source and lamp on the drain. I'd surely need some passive components... So that is what I was asking how would I wire the MOSFET up to switch the battery voltage to drive a cheap e-bay constant current board ..to drive the LED's


So how do i do it was my question really I am no electronic designer. I can etch a board if needed, use overboard, build it up from a schematic , but I hope some one could knock me up a quick drawing of what other components to switch the gate of the MOSFET..either from 36 volts or what ever voltage is present on one sid elf th eLED.
 
NeilP said:
I would have guessed that I can not just use a MOSFET by itself. I can't just fire 36volts direct to the gate and battery at source and lamp on the drain. I'd surely need some passive components... So that is what I was asking how would I wire the MOSFET up to switch the battery voltage to drive a cheap e-bay constant current board ..to drive the LED's
It's possible that the CC driver board for the LEDs would have a simple "enable" line, that could be switched via the output from the bike's light output line. If so, a simple resistive voltage divider could reduce the voltage output from the bike's output to prevent damage to the CC driver board. This is just two resistors in series from the bike's light output line to ground. The first resistor would be the largest value, and the second the smaller. The enable line from the LED driver board would go to the connection between the two resistors.

The resistors themselves would have values that are the ratio of the voltage you need for the enable line vs the voltage you have on the bike output. So if you had 36v on the output and only needed 3.3v to activate the enable line of the LED driver board, you'd have a ratio of around 10:1, so you could use a 10kohm resistor on the otuput of the bike, then a 1kohm resistor between that resistor and ground. you'[d get 90% of the voltage on the 10k resistor and 10% on the 1k.

You could use a 10kohm potentiometer for this too--one end goes to ground, the other end to the bike output. Then the wiper would go to the enable line. You'd want to preset it to the right voltage before actually connecting the enable line, though.



Alternatively, though more complex, something similar could be done to drive just a single FET as a current-source for the LED; there's a few circuits out there in google image searches, some more complex than others. I'm not much of a circuit designer, but there's lots of them already out there that can be copied (or modified). I'm not sure I could tell you which one would be best for your situation, but there's others on here that could.

In case it's helpful, this one is just a search for mosfet switches for LED lights:
https://www.google.com/search?q=mosfet+switch+for+led&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwjSmpzB7ZTVAhWrrVQKHcANBp8QsAQIMA&biw=1085&bih=918

This one is for using the switch itself as a current source for the LED, negating the need for the ebay board.
https://www.google.com/search?q=mosfet+switch+as+current+source+for+led&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwjSmpzB7ZTVAhWrrVQKHcANBp8QsAQIMA&biw=1085&bih=918#tbm=isch&q=mosfet+switch+as+current+source+for+ledq=mosfet+switch+as+current+source+for+led
 
I probed the various outputs on the board and nothing changed with activation of th e'light switch'.. but now the lady after riding th bike for a few days ..after coming form the bike she had for a few years..a Twist and Go style..has decide that this PAS style bike is really a gutless piece of shit and has gone back to the other bike..the E-Bike Kit.com front wheel drive bike with thumb throttle.
So project now shelved.

thanks for taking the time though.
 
Conventional displays can be analogue or digital. Assuming analogue, there's a wire that supplies it with battery voltage along with a ground, then there's the switched power wire that goes to the controller and a fourth wire that gives an analogue voltage signal to the controller for the power level. When they have the lights switch on them, there's a 5th wire that goes live with battery voltage when the switch is on. basically, there's two small mosfets on the pcb, that connect the controller's power wire and the lights power wire to the wire that comes from the battery.

The digital ones,have the mosfet that switches the controller's power, but everything else is done by data communication to the controller's CPU, in which case the lights mosfet would be on the controller's pcb.

In both cases the mosfets have a low power rating, so not suitable for the high power LED lights. In that case I'd use a simple voltage divider, like a pair of resistors or a 10k pot to divide the battery voltage in the lights wire down to a mosfets gate voltage ( probably 12v) and use a higher rated mosfet to switch the lights. The components you'd need would be two resistors and one mosfet, and maybe add a reverse diode to the mosfet to protect against any inductive effects from the LED driver.

There's nothing to say that that Raleigh panel is conventional, but it looks like it should be.
 
This has three wires.
grad
12 volt
Data line.


The bike is 36 volt and there is no battery voltage at the display/ control unit. Only 12 vol tin and the data out.



So it does seem that originally any light switching was done at the controller, but this controller does not appear to have that facility....at least not connected...

The controller does actually have two spare connectors..a 2 wires that I assumed was brake line and another 5 pin plug.

I'll try to probe those connectors and see if there is a switched voltage output when the lighting switch is activated.
 
Back
Top