I want to power my pic32 micrcontroller using a lead acid battery. I'm not the greatest with circuits (especially when it comes to power systems), but trying to learn. I have a 12v lead acid 10AH battery. I figured I could drop the voltage using a 7805 voltage regulator and plug that into my pic board. The thing that I am worried about is the output current of the battery. Would the battery only supply the current that is needed for my uC to operate or would I have to put some kind of current limiting circuit before my pic.
No current limiting required; the circuit will draw only the current that it needs.
You will be wasting a lot of power in the 7805. Say your PIC board draws 100mA which means it requires 5*0.1=0.5W. The voltage drop across the 7805 will be 12-5 = 7V. The same 100mA flows through it, so it will be dissipating 7*0.1 = 0.7W, which means it requires heatsinking, making the overall efficiency 0.5/(0.5+0.7), or 41%.
It would be better to start with a 6V battery, and use a low-dropout regulator (not a 7805). Another way to up the efficiency is to use a switching regulator like a 34063, which would up the overall efficiency to ~90%, meaning that you would only be drawing ~46mA from the battery (instead of 100mA).
Thanks. I wanted a higher voltage cause I would like to control some actuator. I have another question, I would also like to monitor the battery's condition. I figured that I would just measure the voltage across the terminals with the PIC but how could I get an accurate measurement while the battery is being charged. I found online a 12v 0.5A lead acid AC battery charger to prototype with (Plan to go solar later). Would like to monitor the battery so that I can determine if there is enough power to operate the subsystems
Since no pin on the PIC can be connected to a voltage > 0.5V higher than its own Vcc pin (5.5V if Vcc=5V), including the ADC input, then you can make a high-impedance resistive voltage divider to reduce the 14.8V (12V SLA during charge) to 5V. It may require a voltage follower opamp to buffer it. Then you can monitor the battery voltage using software.
The resting voltage of a fully-charged, idle 12V SLA is 12.65V
Under charge, it is not supposed to go over 14.8V.
It should not be discharged below ~11.5V
If you use a 3:1 voltage divider, this brings all these voltages within the 5V full-scale range of a PIC ADC. You will have to multiply the ADC reading by three (or not). Multiplying by three is as simple as adding the value to itself three times
Maybe I worded it wrong. You interrupted as I would like to check if the battery is being charged, discharged, or resting. I would like to measure how full the battery is while it is being charged if that is possible.
Charging Lead-Acid batteries under the control of a PIC done right is a Master's Degree Thesis project. Go to PowerStream Power Supplies and Chargers for OEMs in a Hurry. Click on "Technical Resources". Then on "How to Charge Sealed Lead Acid Batteries". Read.
PIC 32 chips are 3.3v logic, NOT 5v. The lead acid battery will work ok, the 3.3v regulator will limit the current & votage. The drop from 12v to 3.3v is very inefficient but who cares. The microcontroller uses little power. You will have to heat sink your voltage regulator. If the board has a built-in regulator make sure the board handles 12V input.
Maybe I worded it wrong. You interrupted as I would like to check if the battery is being charged, discharged, or resting. I would like to measure how full the battery is while it is being charged if that is possible.
Surely you could monitor whether the voltage is increasing, decreasing or remaining constant. Current flow can be measured using a differential amplfier.
The voltage can be divided by 4.5 (using a 56k and 16k potential divider) for a 0 to 3.3V signal.
I am not trying to charge a a battery using a pic, i just want the pic to monitor the battery to determine if there is enough power left to operate all the subsystems I would attach to it.
Hero999, wouldn't the battery's terminals register what ever the charger is putting out if i were to measure the terminals during charging. Or could I create a lookup table since I know the characteristics of charging a SLA? i.e. Charger has this voltage with this current when the battery is at this percentage.
Charging batteries and keeping them healthy is a lot of work. So one of the projects I'm working on is a Solar battery array monitor system using a pic18f8722 controller module from et-base. Here are a few older diagrams (not updated to current system) and some testing (missing some functions) software. This is for my small home system of about 200W of solar input and can store a few kWhrs in the batteries.
Here is a data plot of Solar voltage, charging current(tenths of an amp) and C40 led feedback. The spike is a solid LED on the C40 causing my controller to switch to the next battery for charging. Levels of about 100 counts are 1 blink for bulk mode, above 200 is 4 or more blinks for absorption mode charging. The chart show the primary battery voltage but it's charging the backup AGM cells.
when you connect the charger to the battery it will not make the batgery the voltage of the charger, the voltage in the battery will rise steadily as it charges, if you really want to see how much is in the battery you will have to periodically disconnect it rom charging, wait a few seconds and then take your voltage measurement
when you connect the charger to the battery it will not make the batgery the voltage of the charger, the voltage in the battery will rise steadily as it charges, if you really want to see how much is in the battery you will have to periodically disconnect it rom charging, wait a few seconds and then take your voltage measurement
With a real battery monitor you measure voltage and current in/out and the rate of discharge. Knowing the battery efficiency factor (age related) for storing charge will give you a good idea at what stage of charge it's in. For discharge from a full charge knowing the Peukert exponent of the battery will give the "state of charge" as power if drawn from it.