Author Options:

Analog to Digital Conversion on PIC18f4520 Answered

Hello there!

I am building a custom digital weighing scale. My issue is not about how to do A2D, but on how to use the least amount of power doing so.  So imagine you just placed an object on the scale, i want the microcontroller to notice a change in weight and perform a2d on the load cell voltage. Now i only want to perform this a2d once(or a few times to make sure it works), saving the value in the register, and then i want the microcontroller to go back to sleep. The microcontroller will keep sleeping unless the object is removed or the weight changed, where the A2D works again for a couple of times, notes the value, and then sleeps again. So my question is, does the A2D have to keep working to notice a change in the weight? or can that happen some other way?  

I basically want to make my battery last a long time, and i want to do that by using the A2D only when needed. On another note, does a2d even use up alot of power? If i keep it running would it consume alot of my battery?

If things are unclear please ask. I'm afraid i didn't articulate well. Thanks! 


1 Replies

steveastrouk (author)2012-12-04

Put the A/D so that it uses the internal RC oscillator, then it can stay awake when the processor is asleep.

Set the CPU volts as low as possible, set the main clock speed as low as possible too.

The datasheet has many complex graphs which show you the specific power consumption at various Vcc and internal control levels.

Another way to do this would be to use the comparators to sense a weight on the scale

Select as Best AnswerUndo Best Answer