In message <1051567079.20060531185435@mirosat.com> Dumitru Stama wrote: > I have a short question i cannot answer by myself. I want to be able > to measure how much current is drawn from my circuit using PIC's ADC > and some sensor maybe... Do you happen to know a simple way to do > this? What you need to do is put a low-value resistor in series with the load, then measure the voltage drop across it. There's two ways to do this - low-side and high-side. Low-side is where you put the sense resistor in the ground path, high-side is where you put the sense resistor in the +VE path. There's a Maxim appnote somewhere that covers the advantages and disadvantages of each. Now, if you know the voltage across the resistor, and the value of the resistor, you can use Ohm's Law to get the current: I = V / R (current equals voltage divided by resistance) Note that the voltages you'll be dealing with will be on the order of 0.1V (probably a lot less than that, actually), so you'll need to amplify the signal. A single opamp can do it - you want a differential-input amplifier circuit. A gain of about 20 should do it. -- Phil. | Kitsune: Acorn RiscPC SA202 64M+6G VF+UniPod philpem@dsl.pipex.com | Cheetah: Athlon64 3200+ A8VDeluxeV2 1G+180G http://www.philpem.me.uk/ | Tiger: Toshiba SatPro4600 Celeron700 256M+40G -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist