NPN transistor affected by everything

caleb7

1 W
Joined
Sep 23, 2020
Messages
55
Location
İstanbul
As a electronics noob, I "designed" a turn signal/horn/headlight system for my ebike. I cannot post a schematic because there isn't one, but my problem may be well known for experienced people in this. I used NPN transistors to activate relays. The problem is why would a NPN transistor gets "on" and "off" by itself, whenever when I push throttle (or for every "fluctuation" in the system)? The turn signal circuit worked ok at home, when not connected to 12V DC-DC converter on my ebike. But on the bike, relays connected to transistors gets "turned on" seemingly like whenever I press throttle, etc. So headlights or flasher activated by itself. Throttle is by no means connected to this 12V system, it goes to controller which works at 52V.

At NPN transistors base, I think I used a 3K resistor, maybe this was too low and they just "activate" from every tiny fluctuation?

I thought there can be some things going on over the "negative" wire, and I tried putting diodes on negative side of DC-DC converter, but it didn't help.
 
Search "How to reduce noise in an electrical circuit". Typically one or more capacitors are used.

You calculate the base resistor according to how much current you wish to drive through the relay to turn it on.

https://www.quora.com/How-much-current-does-the-coil-side-of-a-relay-draw
https://www.petervis.com/Raspberry_...Outputs/Driving_an_LED_Using_Transistors.html

An NPN transistor will amplify signal and noise at the base according to its forwarding characteristics but don't latch their output, like a toggle switch for example, so your problem description is kinda incomplete ... which you already know I guess.
 
caleb7 said:
At NPN transistors base, I think I used a 3K resistor, maybe this was too low and they just "activate" from every tiny fluctuation?

Base needs to be pulled (connected) to ground through say a 50K resistor.
 
Base needs to be pulled (connected) to ground through say a 50K resistor.

Thank you. I believe this would help, I'll do this. I see this problem happens more often with 1K resistor at base than a 10K resistor (in different transistor-relay combination), so definitely the current at the base gets higher in time. I'll also replace existing resistor with a correct one according to mintycrayon's suggestion.

I suppose this problem also happens because the light button (which I bought from AliExpress) leaks a very tiny amount of current at signal wires when off, maybe because of it's LEDs. I see LEDs light faintly when relays get activated ghostly.

It's about 5 celcius degrees outside and I'll wait a warmer weather to remove this circuit from bike. I'll post the result.

Out of curiosity, why would a ~50K resistor at base to ground help? Is it common to some "voltage buildup" there? :)
 
caleb7 said:
Out of curiosity, why would a ~50K resistor at base to ground help? Is it common to some "voltage buildup" there? :)

Because when your physical switch (that's connected to base) is off, what is the base connected to then? That's right. Nothing. It's just flapping in the wind in a sense. :mrgreen:
 
Back
Top