The testbed has been switched from the bench supply to a 5.4V wall wart that that delivers 7,5V with this load of about 33mA.
A 1K/100R voltage divider has been added to the system. (not shown) This allows me to crudely monitor the line voltage. The ratio should be enough to protect the ADC from positive spikes. To protect it from negative voltages a diode has been inserted between the divider and the ADC. The standard thing to do would have been to use an optoisolator.
At 33mA a 750mAh battery should last 22 hours. I suspect that is expecting too much of the surplus battery.
The final bit left on the battery backup is to cause the system to go to its lowest power mode when the battery is at 3V. A bit of tweaking of the MiWI code allowed me to put the radio to sleep and wake it up. The remaining part is to put the processor to sleep and figure out how to wake it when line power returns. And activate the WDT.
The plan is to switch from the PIC18LF4620 to the PIC18LF47J13. I bread boarded a PIC18LF27J13 but the PICKIT3 does not ID it and the PK2 with a patched .DAT file can not be used with MPLAB. I have been able to program it with the PK2 using PICKIT2.exe but can not get the chip to execute. Could be a config problem.
The new PIC has a built in RTC and a band gap voltage reference that will allow me to properly monitor battery voltage with a falling VDD. The unit uses a VDDCORE of 2.5V but can use a separate VDD of up to 3.3V for IO. This is needed to work with the dallas 1 wire sensors.
0 comments:
Post a Comment