The shunt (of 0.1R) looks a bit flimsy to me, but it all depends on the application. Make sure it can handle the Watts it burns or evaporates (unsolders itself). Do you know the maximum Wattage - Volts x Amps - you want consume? ...and what is the Voltage - 12 or 24 or ...?
If you want to measure the Voltage you have to put the shunt on the high side. To exclude 'side effects' - unexplainable / wrong readings, ensure good individual connections to the 'source' - both rails - for all consumers - loads and probe(s).
If you want to measure the real energy (Wh), you may need to use a different device: a coulomb counter (see comment at https://e2e.ti.com/support/amplifiers/f/14/t/778625 about 'using' the INA226 for such purpose).
Any IC manufacturer has some ICs for that.
Regarding voltage divider and making sure the input voltage never goes below or above what PixleJS can handle, use a zener diode across the input or better a transient voltage suppressor ( https://www.allaboutcircuits.com/technical-articles/transient-voltage-suppressors-tvs-an-introduction/ ). Btw, the max that an input of a device can handle is (almost) always dependent on the supply voltage of the device. Since PixleJS can run lower as 3.3V (as the Raytac module does, which PixlJS base), you may consider this the max voltage for input in order to be on the safe side.
At the moment I don't know the maximum watts I will have and to an extent that's the object of the exercise. It's 12v so I guess I may have quite high current at some points.
I can start small and build....
Some of the terms are new so I'll catch on eventually... eg high = positive.
© Espruino, powered by microcosm.
Report a problem