what is the best way to attach a dc motor to the bbb without a cape or motor controler???
thanks so much,
JonnyZ
Be sure to click 'more' and select 'suggest as answer'!
If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!
what is the best way to attach a dc motor to the bbb without a cape or motor controler???
thanks so much,
JonnyZ
what i meant was possibly through a transistor and then have a resistor isolating the beaglebone from the other power supply
i just wasn't too sure as to what would damage the board or not, and how to handle the spikes when the dc motor turns on or off
i just wasn't too sure as to what would damage the board or not, and how to handle the spikes when the dc motor turns on or off
Hi Jonny,
If you're talking about a smallish motor (say a few hundred mA and maybe no higher than 12V) then a single BJT/resistor is fine (resistor of maybe 1k in series with the base of the transistor). Note that you may need a darlington type arrangement because the gain of the transistor may likely not be sufficient. Yes definitely place some diode across the motor it will fail without it - a small 1N4148 should be fine for a small motor. And a capacitor, maybe 100nF across the supply rails. (Also, you may need to power this from a separate supply, rather than from the BBB header, unless it really is a low power motor. Some motors don't need a lot of current at all, but some do :-(
Jonny Z wrote:
i just wasn't too sure as to what would damage the board or not, and how to handle the spikes when the dc motor turns on or off
The standard way to prevent spikes form motors or other inductive loads is a Flyback Diode. If you drive a motor directly through a transistor, everything is fine until the transistor turns off. The current still needs to flow through the motor until the magnetic field collapses, and since this current can't go anywhere the voltage builds until it finds something to zap, such as the transistor. The flyback diode provides a safe way for the collapsing current to flow back through the motor.
You might find this Raspberry Pi thread useful: Raspberry Pi • View topic - Relay not switching.... The OP was having trouble getting enough current through a relay using a single NPN transistor, but a Darlington pair "did the trick".