I would like to use a 24V power supply to power (1) an arduino that will act as a speed controller and (2) a DC motor by using an NPN transistor. I am wondering how I can use the same battery to split the power between the collector of the transistor and the arduino. I first thought of using a voltage divider for the arduino, but then the excess voltage gets grounded. How can I accomplish this?
1 Answer
How can I accomplish this?
I would buy or build a small buck converter that takes a range of input voltages (say 18 V to 36 V) and delivers your logic supply (5 V or 3V3) for the Arduino. Maybe one of these: -
The NPN transistor would probably have its emitter grounded with the motor wired between collector and 24V - you will need a flyback diode across the motor of course. The base of the NPN will need to be driven through a resistor from the Arduino.
If you want speed control you have to use PWM for the above set-up.