I have an interesting problem in building something with robotics. I am using a PIC16F877A micro-controller to control the robot. The motors of the robot require 6 volts and the PIC requires 5 volts. I was wondering if there was an easy way to get both of these required voltages from a common voltage source. The motors suggest running on 4 AA batteries, and I was going to just use a 7805 voltage regulator to than reduce the voltage to 5 volts, but the regulator requires at least 7 volts to function correctly. I also thought that I could use a voltage divider network, but none seemed to be convenient.
Asked
Active
Viewed 908 times
1

JYelton
- 32,302
- 33
- 134
- 249

Markovian8261
- 469
- 2
- 8
- 29
-
1Replace the 7805 for a low drop regulator 'LDO'. *Some* of these require a remarkably low drop out voltage. Check the datasheet. – jippie Jan 27 '14 at 20:46
-
1Keep in mind that if the supply voltage drops below 5V, even momentarily due to motor starting current, it could cause problems with your LDO-powered PIC. – Spehro Pefhany Jan 27 '14 at 20:49
-
This is the motor im using DG01D-A130GEARMOTOR on the actual datasheet of the motor it says it can run on 5 volts so i will probably just use a 9 volt battery and 7805 regulator – Markovian8261 Jan 27 '14 at 21:00
-
11. A regular 9V block battery doesn't supply a lot of current, so either the motor will not run for long or not at all. 2. About half the energy stored in the 9V battery is wasted as heat in the regulator if you run both motor and controller from the regulator. 3. You have a larger chance of the motor influencing the microcontroller when it accelerates/decelerates. The motor can make the controller reset spontanuously. The regulator with proper decoupling caps may provide this. I'd advise to stick with 6V batteries, rather than switching to 9V and a single regulator. – jippie Jan 27 '14 at 21:06
-
1You may also want to consider if your processor is rated to run at your desired clock rate from 3.3v. If doing so would not have other I/O complications, the chance of a 3.3v low-dropout regulator going into dropout from the motor-loaded 6v pack are substantially less than those of a 5v version of the same part doing so. Especially when you remember that AA's are only 1.5V early in their life, your nominal voltage even when the motors are off can easily fall below 5v. If someone uses rechargeable cells, your nominal will be only 4.8v, decreasing to 4.4v at full usable discharge. – Chris Stratton Jan 27 '14 at 22:57
1 Answers
0
Chris Stratton's solution is the best, I think.
Get a 3.3V LDO. The PIC16F877A (datasheet) will run happily from 3.3V, as will most of the usual transistorised H-bridges that you might use for motor drive. You can then run the whole thing from 4 AA cells, either alkaline or NiMH rechargeables. This avoids problems when the battery terminal voltage drops under load (which it will once you turn on the motors).
It is not a good idea to run the motors and the PIC from the same power supply with no intermediate filtering or regulation, as the noise may cause the PIC to reset.

pjc50
- 46,540
- 4
- 64
- 126