3
\$\begingroup\$

I have an IoT project in which I want to leverage existing bicycle LED lights, which have their own battery power. So, rather than using the current from the microprocessor to power the lights, I just need a way to wire my logic board to the bike light and control the on/off of the light.

I don't have an electronics background, so this might be a very elementary question. Is there an inexpensive electronics component that I can somehow wire or solder onto the bike light that can be controlled by another low-voltage circuit?

The ideal component would be able to switch rapidly on and off, preferably without sound / mechanical parts. I'm envisioning wanting to strobe the lights quite rapidly, again, controlled by the logic board.

If there are more than one kind of component, which might be the best for a small, DIY wearables project? IE: low-cost, easy to hook up, easy to source.

\$\endgroup\$
4
  • 3
    \$\begingroup\$ A relay, or a transistor (FET or BJT) \$\endgroup\$
    – Icy
    Commented Dec 17, 2015 at 15:30
  • \$\begingroup\$ Awesome @Icy, thanks for that. Can you elaborate, in an answer, and perhaps explain the differences between them and suggest which might be best in a beginner's DIY IoT wearable project? \$\endgroup\$
    – Tom Auger
    Commented Dec 17, 2015 at 15:33
  • 1
    \$\begingroup\$ @TomAuger you may be expecting too much asking what the differences between them are and for the other request about wearable IoT stuff because it has nothing to do with your question and is soliciting stuff that is an opinion (i.e. not good as an answer). \$\endgroup\$
    – Andy aka
    Commented Dec 17, 2015 at 15:42
  • \$\begingroup\$ @Andyaka I don't think asking about the differences is too far off base, and the answers have been quite forthcoming. But point taken about the wearables issue. I may need to spawn off another question. \$\endgroup\$
    – Tom Auger
    Commented Dec 18, 2015 at 12:47

2 Answers 2

9
\$\begingroup\$

Relay:

schematic

simulate this circuit – Schematic created using CircuitLab

Advantages: simple, very well isolated, very little loss of power in load

Disadvantages: relatively slow (perhaps 10s of Hz), needs a fair amount of control current (typically more than logic circuits can supply)

Transistor (BJT shown):

schematic

simulate this circuit

Advantages: fast (easily up to Mhz), very small control current (typically < 1/50th of load current) required.

Disadvantages: No isolation, voltage loss across transistor switch, may be harder to wire up. Can't control AC circuits. Relatively low controlled output voltage - depends on transistor, can get >100, but typically less than 30V

\$\endgroup\$
3
  • \$\begingroup\$ The OP should also check the maximum current that will have to flow through the transistor: a 3904 might be living a perilous life if the currents (in mA) have three digits (max Ic=200 mA). In the jellybean zone, a 2n2222 might allow for a bit more leeway (max Ic=800 mA). \$\endgroup\$ Commented Dec 17, 2015 at 16:05
  • \$\begingroup\$ Awesome answer. In terms of control current, we're dealing with 40 mA per I/O pin (is this the right spec? I'm such a newbie) of the logic board (as far as I'm aware), so how does that spec up to the Relay? \$\endgroup\$
    – Tom Auger
    Commented Dec 17, 2015 at 20:27
  • 1
    \$\begingroup\$ @TomAuger - you may struggle to find a relay that will directly work off your 3.7V logic circuit, they tend to have coils rated at 5V, 12V, 24V DC or 110V or 220V AC, Have a look at the specs of 5V ones like: digikey.com/product-detail/en/9007-05-01/306-1063-ND/301697 this has a must operate voltage of 3.75V but does only need 10mA \$\endgroup\$
    – Icy
    Commented Dec 18, 2015 at 8:27
2
\$\begingroup\$

Relay: easy to operate and understand, robust, commonly used in cars, available in a range of sizes of which the smallest is "reed relay" (~1cm). Has a rated maximum number of on/off cycles. Not "polarised", so you don't need to care about circuit polarity. Good for large currents and voltages, and AC. Not so cheap.

Transistor (bipolar): somewhat robust provided you don't wire it up the wrong way round or give it too much current, both of which will kill it rapidly. Cheap. Fast. Available down to microscopic sizes. Some of the switched power will be lost in the transistor, causing it to heat up.

Transistor (FET): more efficient than bipolar, but also more fragile. Especially vulnerable to electrostatic discharge. Otherwise fairly similar, although voltage-operated rather than current-operated (so better for handling large currents).

Solid state relay: actually some transistors in a box. Supposedly the convenience and isolation of a relay with the speed and cycle lifetime of a transistor. Pricey.

\$\endgroup\$
5
  • \$\begingroup\$ careful with solid state relays, many will only switch AC! \$\endgroup\$
    – Icy
    Commented Dec 17, 2015 at 16:09
  • \$\begingroup\$ This is for a wearable (ie: fabric/textile) based project, so heat might be a very important consideration indeed - would hate for the thing to go up in flames! How much heating are we talking about with the bipolar Transistor? My current is 3.7V / and looks like 40mA per I/O pin (I can possibly combine pins if I need more? I don't know) - does this change anything in your answer as far as recommendations? \$\endgroup\$
    – Tom Auger
    Commented Dec 17, 2015 at 20:30
  • \$\begingroup\$ That's for the microcontroller, what's the max current of the motor? \$\endgroup\$
    – pjc50
    Commented Dec 17, 2015 at 20:42
  • \$\begingroup\$ @pjc50 The only current I'm aware of is the one that is coming from the 3.7V battery that powers the microcontroller and all of the sensors. The other current is, of course, the one on the bike light and that is just 3 AAA batteries. \$\endgroup\$
    – Tom Auger
    Commented Dec 18, 2015 at 12:46
  • 1
    \$\begingroup\$ Don't know where I got "motor" from, probably crossed wires with another question ... so you need to know what the current of the light is, which can be found by setting your multimeter to "current" and putting it in series with the light while driven from the batteries. \$\endgroup\$
    – pjc50
    Commented Dec 18, 2015 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.