![]() However, there looks to have been a bug in the original Arduino version regarding two’s complements and the code on Github needs a slight patch to properly measure negative voltages. The few software libraries for the INA219 and i2c assume use with an Arduino, but some dude over on Github did a nice Python port of the INA219/i2c library. For the most part it was painless and simple, enable the i2c kernel module and the three INA modules just showed up when I ran “i2cdetect -y 1”. Adafruit has a generous tutorial on how to connect and verify i2c is working. ![]() Also to power the INA modules themselves, another set of continuous jumpers connect Vcc and GND back to the 5v and GND pins of the Raspberry Pi. Two have solder junctions to set the i2c address, resulting in the three being accessible on the bus at 0x40, 0x41, and 0x44. Adafruit has some excellent tutorials on wiring up and working with the INA219, which is where I got the majority of my information.Įach of the INA219 modules speak i2c to the RPi and the SDA/SCL pins daisy-chained with continuous jumpers back to the respective i2c pins on the RPi (P3 and P5) to form an i2c bus. Working with the rest was relatively quick work. I personally insist on everything I have use Power Pole connectors so if one were less inclined they could avoid a lot of work. The bulk of my time was spent making a wiring harness for this setup to plug into my existing solar setup and soldering on all the connectors. They’re about 1″ square, have a terminal on the board for wiring in-line in electrical circuits to measure, and have a small shunt and chip that measures the voltage and current. Allegedly this setup should handle about 3 amps, although if somebody wants to do the arithmetic and make an appropriate shunt they should be able to measure much higher currents.Īt the heart of the setup are three INA219 (“high side DC current sensor”) modules from Adafruit which do the measuring, one each for the solar input, the battery, and load. The hardware and other bits, excluding the Pi, ran me around $50-$60. Here, the measurement modules are attached to a Raspberry Pi via i2c and a simple python script collects the data and sends it wirelessly to OpenTSDB for storage and charting. This new setup adds data recording+logging into the mix, something I’ve always wanted. At the time I settled on a Morningstar charge controller with LCD voltage meters to tell me. ![]() Ever since I started using solar power at Burning Man I wanted to get a good measure of how much I was consuming and how much was left. I’d appreciate any input to help a bit of a noob.Over a recent couple of weekends I built a thing to measure the current and voltage of the components of a 12V solar/PV power system. If it was the other way around I think I need an amplifier but I have no idea what it’s called the other way around. I just can’t quite work out how to do that. It’s a 12v battery that I need to check on so I think at most I need 0 - 20v. I’m struggling a bit with the voltage reading though. I will then use a couple of Spark Fun Current sensor breakouts(1568-1882-ND) to do the current reading. My plan (so far) is to connect an Ada Fruit 12bit ADC (1528-1014-ND) to my Pi, which looks fairly straightforward. I think I want to use a Raspberry Pi to do the logging (I have one and there seem to be several good tutorials online) and I think I want to get the data to the Pi via i2c. I’m looking for some advice (as the subject line suggests) on logging the current usage of two bits of kit and the voltage of a battery (and maybe some other things later on).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |