intellibat

Intellibat is a project based on Arduino and ESP8266 hardware. It was intended to be used on ebikes or other electric appliances and allows to monitor battery stats and power usage on a webpage through wireless standard.

This project has a CC-by-nc-sa license; should be compatible with the arduino one.

Things you need:

hardware used in this project..

Instructions: (wip)

First of all the right firmware has to be installed inside ESSP8266. They usually come with very old AT firmware and any other version is not suitable, or works very bad and with partial support for arduino code. Use a serial programmer (3,3V one). When you're there you can even program the ESP work mode (set to 3, STA+AP) and AP credentials + STA credentials (maybe your tether wireless password, so that it will connect to it from the start). This need serial monitor like Realterm to work. Otherwise this initial programmation is possible editing the sketch (Initial command cluster); remember that Wifi settings are stored permanently in rom, so you don't have to flash those parameters anytime you boot your system. It can even destroy your ESP after some (long) time, as NAND flash has limited writes life.

Second, program the sketch in Arduino; there are two versions, the "nano" one is for those atmel arduinos without a Hardware serial port. There are some libraries that you have to import inside your IDE to make it work, like AltSoftSerial, TextFinder and those related to DHT and ACS sensors. I sugest you to do all on a breadboard, it's much simplier and it can be 99% tested before prototyping a bad not working product.

Third, I have used to achieve stepdown from my 60V battery an old usb switching 5V brick from a Sagem phone. Almost all this powersupplies can output 5V if connected to a DC relatively high voltage (some could not work under 50V volts, you have to find your ideal solution to power the board once it is inside your high voltage battery).

Some extra infos: ESP8266 comes in many form factors and pinouts. Usually to power it up you only need CH_PD pulled up with 10k resistor ad a stable enough 3,3V stabilized voltage.. you take it from arduino 3,3V board regulator if you have a good ams1117 chip (original one) on your board. If that chip is counterfeit probably won't be good to power the ESP8266, that needs around 200mA to work; and don't forget good caps for good stabilization. Don't mess up with ESP voltages, the soc is only 5V tollerant on the RX serial pin, it will fry on any other pin for more than 3,6V given. Pay attention to sketch pinouts; eg. Arduino AltSoftserial is hard coded and it's very difficult to understand where the fault is if mistakes are made. The project AS IS, was made for 30A sensor and maximum 100V readings.. the zener should protect arduino input from spikes on the voltage reading pin.

USE AT YOUR OWN RISK, I'M NOT LIABLE FOR ANY SITUATION THAT COULD DERIVE FROM THE USE OF THIS OPEN PROJECT. ALSO PAY ATTENTION TO HIGH CURRENTS E VOLTAGES THAT COULD BE PRESENT ALONGSIDE THIS CREATION. HAPPY HACKING.

( Donation == kindness )

Some images:

fritzing

basic arduino, esp and sensors wiring

web view

browser view

prototype

messy prototype (with stepdown connected for battery voltage -> 5V rail)