Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kscholty authored Feb 2, 2023
1 parent 06d263a commit 457ff00
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The smart shunt has three main interfaces.

## Building the code yourself
The Software has been created using platformio and the Arduino environment. In order to build it you als need some libraries.
* the INA226lib https://github.com/peterus/INA226Lib The latest version should work with this code.
* the [INA226lib](https://github.com/peterus/INA226Lib) The latest version should work with this code.
* emelianov/modbus-esp8266
* locoduino/RingBuffer
* prampec/IotWebConf
Expand All @@ -20,10 +20,9 @@ The latter three will be automatically downloaded when using platformio.

## Required hardware

For measuring the current you need an INA226 breakout board as you can acquire from Amazon, Ebay or AliExpress.
[Amazon](https://www.amazon.de/ALAMSCN-Bi-Directional-Voltage-Current-Monitoring/dp/B09Z66QSPB/ref=sr_1_4?keywords=ina226&qid=1674921078&sr=8-4)
[Ebay](https://www.ebay.de/itm/403798012528?mkcid=16&mkevt=1&mkrid=707-127634-2357-0&ssspo=3VTGCNeFTJm&sssrc=2047675&ssuid=0YZwUxrsQgu&widget_ver=artemis&media=COPY)
[AliExpress](https://de.aliexpress.com/item/1005001593541480.html?spm=a2g0o.productlist.main.3.56f351729HIcrL&algo_pvid=355d9f06-c6bf-45e7-922c-611aa36108cf&algo_exp_id=355d9f06-c6bf-45e7-922c-611aa36108cf-1&pdp_ext_f=%7B%22sku_id%22%3A%2212000016714954183%22%7D&pdp_npi=2%40dis%21EUR%213.22%212.06%21%21%21%21%21%402145294416749211574187658d06b7%2112000016714954183%21sea&curPageLogUid=PnWeLZQyi9Cc)
For measuring the current you need an INA226 breakout board as you can acquire from
[Amazon](https://www.amazon.de/ALAMSCN-Bi-Directional-Voltage-Current-Monitoring/dp/B09Z66QSPB/ref=sr_1_4?keywords=ina226&qid=1674921078&sr=8-4),
[Ebay](https://www.ebay.de/itm/403798012528?mkcid=16&mkevt=1&mkrid=707-127634-2357-0&ssspo=3VTGCNeFTJm&sssrc=2047675&ssuid=0YZwUxrsQgu&widget_ver=artemis&media=COPY) or [AliExpress](https://de.aliexpress.com/item/1005001593541480.html?spm=a2g0o.productlist.main.3.56f351729HIcrL&algo_pvid=355d9f06-c6bf-45e7-922c-611aa36108cf&algo_exp_id=355d9f06-c6bf-45e7-922c-611aa36108cf-1&pdp_ext_f=%7B%22sku_id%22%3A%2212000016714954183%22%7D&pdp_npi=2%40dis%21EUR%213.22%212.06%21%21%21%21%21%402145294416749211574187658d06b7%2112000016714954183%21sea&curPageLogUid=PnWeLZQyi9Cc)

I noticed that some of the boards have a different pinout. The SDA and SDL pins are swapped in comparison to others. So please check this if you can't get a connection to the sensor.

Expand All @@ -33,20 +32,20 @@ I recommend using a Buck converter to create 5V for feeding the MCU and the sens
Make sure Battery - is connected to your GND potential. Otherwise the Volatge measurements will be invalid, since the INA226 has only one GND.
Furthermore, you should use an isolated USB module to connect the D1 to the target. You can destroy your computer or Victron GSX if you connect it directly to the USB of the MCU. [I use this one](https://www.ebay.de/itm/164934927888?mkcid=16&mkevt=1&mkrid=707-127634-2357-0&ssspo=k80Mu6A-TbK&sssrc=2047675&ssuid=0YZwUxrsQgu&widget_ver=artemis&media=COPY)

**Before you can use the sensor board you have to remove the shunt resistor soldered to that board and instead use a bigger shunt, e.g. a 100A/75mV. **
__Before you can use the sensor board you have to remove the shunt resistor soldered to that board and instead use a bigger shunt, e.g. a 100A/75mV.__
Make sure that the shunt supports the current your system produces. You can set the parameters of the shunt in the web interface.
A wide variety of shunts can be found on EBay or other platforms.

If you have a 48V System, be aware of the fact that the INA226 does only support voltages up to 36V (40V max). You need a voltage divider to make shure your sensor is not destroyed.
The code assumes that you use a 470KOhm and a 1MOhm resistor, measuring across the 1MOhm towards GND. `( + --470K-- --1M -- GND )` This should work for a 16S LifePO4 battery. The smaller you choose the small resistor in comparison to the bigger one, the more accurate the measurement will be.

The constant 'static const float VoltageFactor' can be used to calibrate your sensor. Set it to 1 and then simply divide the real battery voltage by the value the sensor shows. Currently this cannot be configured using the web interface.
The constant `static const float VoltageFactor` can be used to calibrate your sensor. Set it to `1` and then simply divide the real battery voltage by the value the sensor shows. Currently this cannot be configured using the web interface.

The following image shows how to connect the parts.
![Breadboard](https://github.com/kscholty/SmartShuntINA226/blob/master/Schema/SmartShunt_Steckplatine.png)


Interfaces:
## Interfaces:

1) Web Interface.
The web interface is quite self explanatory. It contains values to configure the shunt you are using.
Expand Down Expand Up @@ -78,16 +77,17 @@ Interfaces:

Shunt values for modbus, assumed is a voltage of 75mV at nominal current.
The values are those used by PZEM-017.


```
Register Value | nominal current | Resulting resistance mR
0 | 100A | 0.750
1 | 50A | 1.500
2 | 200A | 0.375
3 | 300A | 0.250

```

When you start the sensor for the first time it will open an access point you can connect to in order to set wifi credentials and the other parameters.
After connecting to that access point, direct your browser to http://192.168.4.1. This will open the configuration page.
After connecting to that access point, direct your browser to `http://192.168.4.1`. This will open the configuration page.
The sensor will always create that access point after startup. For how long can be configured.


Expand Down

0 comments on commit 457ff00

Please sign in to comment.