background image

User

 

Manual

  

 

 

 

V

ersion 1.21                                               December, 2018 

copyright 2018 EVTV LLC 

 

EVTV

 

Battery Monitor Display

 

 
 
 
 

 
 
 
 
 
 
 
 
 
 
 

for the

 

ESP32 Tesla Battery Module Controller

 

 

Содержание Battery Monitor Display

Страница 1: ...User Manual Version 1 21 December 2018 1 copyright 2018 EVTV LLC EVTV Battery Monitor Display for the ESP32 Tesla Battery Module Controller ...

Страница 2: ...mbridge Computer Laboratory led to the formation of a team headed by Eban Upton including Rob Mullins Jack Lang and Alan Myscroft Beginning in 2006 they envisioned a very small and very affordable computer students could use as an introduction to computer science In 2011 they introduced the Raspberry Pi It was originally designed to display on a television and use any USB keyboard for input And it...

Страница 3: ...uetooth BLE radio 32GB MicroSD card memory This single board computer provides us a full Linux Raspian environment with the GNU GCC and G compilers The Raspberry Pi Foundation has also provided a very attractive 7 inch touch screen display We have combined that with a sturdy enclosure containing both the Raspberry Pi computer and the touchscreen and a very small wireless keyboard necessary to set ...

Страница 4: ...icate with the ESP32 Battery Module Controller using the broadcast IP address And so if they are both connected to the same TCP IP Access Point your home wireless router the EVTV Battery Display will present data from you Battery Module Controller In this way you can put the display anywhere in your home to monitor your solar energy storage system with no wired connection at all Additionally the d...

Страница 5: ... the unit are three ports A standard audio output port an HDMI video port And a microUSB port The microUSB provides a handy place to connect the 5v USB power adapter HDMI and audio ports are not normally used for this application One end of the device provides access to the communication ports The Ethernet port allows direct wired connection to your Access Point if desired One USB port hosts the k...

Страница 6: ... of a WiFi Access Point from the Raspbian Desktop The keyboard is battery powered It comes with its own USB cable but this is not necessary to connect to the display It is provided only to recharge the keyboard battery The keyboard also comes with a WiFi dongle This must be installed in one of the display USB ports Configuration of the display for the keyboard is automatic ...

Страница 7: ... display to call up the configuration screens Screen 3 has an EXIT button that will allow you to escape to the Raspian Desktop In the upper right hand corner on the tool bar select the WIFI symbol This will call up a menu of available WiFi Access Points You may have to wait for a minute or two for this list to fully populate Select your AP from the list and enter your password This should then ind...

Страница 8: ... to a wealth of information about battery operation as well as access to other subfunctions of the device The right half of the screen features a large display dial fashioned after the Tesla Model S Speedometer The left side of this dial displays the current average cell voltage for the entire pack A lower white tick indicates your LOVOLT cutoff setting and a similar tick on the upper part shows t...

Страница 9: ...ust above the dial is a digital indication of current amperes with positive values indicating charging and negative values indicating discharge Immediately to the left of the dial is a small battery depiction providing the total voltage of your battery pack as configured and a temperature indication representing the HIGHEST temperature of ALL terminal temperatures monitored Beneath the small batte...

Страница 10: ...ease or decrease the scale of time displayed The right arrow decreases log time to a minimum value of 1 second per vertical bar This corresponds to a log of the last 11 7 minutes The left arrow increases the span in time in a series of doubling increments to a maximum value of 512 seconds In this display each vertical bar represents a sample SOC taken each 512 seconds and spanning the past four da...

Страница 11: ...ion of the Main Display calls up a more detailed cell status display This display graphs the voltage of each of the cells in your pack up to a maximum of 40 cells These vertical bars are arranged in modules of six cells and each value is updated every second or so with data from the ESP32 Battery Module Controller It also provides the voltage of the highest cell the lowest cell and the cell averag...

Страница 12: ...ntroller POWER LOG Pressing the Power Log display in the upper left corner of the main panel calls up the Power Log Display This is an expanded and enlarged version of the POWER LOG panel This is useful in that it depicts the power level and allows you to observe variations in power input and output caused by passing cloads and increasing loads as various appliances come on and turn off ...

Страница 13: ...very plain ASCII text display and a somewhat complicated series of input string labels and values entered from the keyboard The controller sends this configuration data along with the usual operation data via User Datagram Protocol packets In this way neither the display or controller needs to know the IP address of the other This first screen provides information on your current configuration But...

Страница 14: ... IP number of the controller from the UDP packets It then uses that IP number to connect via the Transmission Control Protocol which provides a greater level of error checking and security than UDP Configuration data is then transmitted to the controller via TCP The X icon allows you to escape back to the main display screen Left and right arrow icons allow you to access the other config screens ...

Страница 15: ...nitor power IN to the system from photovoltaic arrays and power OUT of the system through your inverter Ultimately the battery was ALWAYS destined to be the heart of a home power system and the Battery Display makes this all too evident By monitoring the SOC LOG over several days you can easily see how high your battery charges during the day and low it goes while providing power at night This is ...

Страница 16: ... makes it easy to import days weeks or months of data into a Microsft Excel Spreadsheet for example This seems a bit wasteful of storage space and CPU time but it is actually quite important The EVTV Battery Monitor features an unusually large 32GB SD card for this reason alone 08 27 2018 19 19 41 11 5 41 1 34 1397 1415 70 036 08 27 2018 19 19 43 11 5 41 1 34 1397 1415 70 036 08 27 2018 19 19 45 1...

Страница 17: ...wer in watts 5 AH used 6 Temperature of highest terminal measured And so you can see this comma separated format could be easily imported into a more advanced database or spreadsheet program for more detailed analysis But the data is held on the 32GB microSD card inside the enclosure housing the Raspberry Pi We caution you NOT to remove and reinstall this card as it is actually quite fragile and h...

Страница 18: ...s the current PowerSafe100 log file to be COPIED to a USB thumb drive There is one proviso The thumb drive can be any size large enough to hold the file but it MUST BE NAMED BATTERY and best if formatted for MS DOS FAT You can easily change the name of a thumb drive on any PC But we have also included a 16GB drive with your display and appropriately named BATTERY UPDATE SOFTWARE button The EVTV Ba...

Страница 19: ... of the program from Amazon s AWS cloud service installs it and restarts the device This may take a few seconds but when it restarts it will run the new revised and extended comment version With no connection to the Internet this button will simply reboot the device but no new version will be installed ...

Страница 20: ...he Controller Area Network CAN protocol 2 0A with 11 bit message identifiers We originally configured it to use a third party CAN hat for the Raspberry Pi to receive CAN frames through the usual twisted pair CAN wired interface and indeed it can still be configured to do just that and it will work identically in all respects The development of the UDP WiFi interface was driven by a desire to separ...

Страница 21: ...basic EVTV CAN data structure is 24 bytes BYTE 0 7 The 8 data bytes BYTE 8 11 uint32_t Message ID 29 bit if IDEextended set 11 bit otherwise BYTE 12 15 uint32_t family ID used internally to library BYTE 16 19 uint32_t timestamp recording when mailbox message was received BYTE 20 uint8_t RTR Remote Transmission Request 1 RTR 0 data frame BYTE 21 uint8_t priority only important for TX frames and not...

Страница 22: ...55 CAN MESSAGE IDS Whether transmitted by actual CAN differential wire pair or by UDP packet the CAN message definitions are identical You will note some odd usage here and unexplained gaps in the bytes used We used a display interface from Andromeda Interfaces termed the EVIC We developed software to use this with our Tesla Model S Drive units When we started employing salvaged Tesla Battery Modu...

Страница 23: ...AGE ID 0x150 Length 8 bytes Byte 0 1 Pack Current LSB MSB 16 bit signed integer containing pack current Positive values are read as charging and negative values are read as battery discharge currents Byte 2 3 Pack Voltage LSB MSB 16 bit unsigned integer representing total pack voltage x 10 Multiply your reading by 10 to preserve on digit of decimal accuracy Example 48 76 volts sent as 487 Byte 4 5...

Страница 24: ...ned integer representing the highest individual cell voltage in the pack 1000 Example highest cell 3 274v x 1000 3274 Byte 4 5 Average Cell Voltage LSB MSB 16 bit unsigned integer representing the average if all cell voltages in the pack 1000 Example average cell 3 262v x 1000 3262 MESSAGE ID 0x652 Length 8 bytes Byte 4 5 High Voltage Cutoff LSB MSB 16 bit unsigned integer representing the highest...

Страница 25: ...crement with each message until all cell voltages are sent and then begin again at 0 Byte 1 Total Modules 8 bit unsigned integer indicating the total number of 6 cell messages in sequence Derives from Tesla Model S modules which each have six cells Byte 2 7 Cell voltage 8 bit integer Each byte contains the voltage of one cell 2 00v The result should be multiplied by 100 to retain two digits of dec...

Страница 26: ...nd with that the Message Queuing Telemetry Transport protocol This data protocol relied on the Transport Control Protocol TCP which of course in turn relied on the Internet Protocol IP It proved useful and a dozen years later was released as an open protocol anyone can use Message Queuing always was a bit of a misnomer It never precisely QUEUED anything in the normally accepted technical sense Ama...

Страница 27: ... topics or both So the BROKER acts as a kind of anonymous post office server where anyone can subscribe to and receive data of interest and anyone can publish data of interest and they don t have to know anything about each other The only connection is the TOPIC data objects And with that 10 million clients can all subscribe to the same topic as easily as one More of a cranial assault is the idea ...

Страница 28: ...our solar energy storage data as we provide the necessary Amazon IoT core broker for this to work And no the security credential certificate issues are too impossibly icky for us to make it where you can set up your own broker In theory well perhaps in the future Let s go back to our configuration screen Note the Use MQTT check box If you enable this the system uses MQTT INSTEAD of UDP If you unch...

Страница 29: ...ttery controller They each connect to the BROKER And IF they both happen to be up and running the data is passed and used We should note that the display is NOT as smooth and crisp as it is in UDP operation It s a bit jerky and erratic But surprisingly it takes about 3 minutes to get used to that and the nature of solar energy storage is that you don t really need smoothly instantaneous data You r...

Страница 30: ...you can do away with the display entirely and view most of the important data using a web browser Obviously this lends itself to easy development of an iPhone or Android or iPad application And off to the races in the future You may one day simply ask Alexa what your current state of charge and power level is Or what it is in your home in Costa Rica The possibilities quickly overwhelm ...

Страница 31: ... more secure with us out of the loop 1 We no longer publish via MQTT from the ESP32 BMS Controller It communicates with EVTV Battery Display s only through the local wireless hub using UDP and TCP IP 2 Any display can receive and send through the local wireless hub to an ESP32 BMS Controller 3 By electing MQTT SENDER a display will echo the data received from the ESP32 BMS Controller to your Amazo...

Страница 32: ... aws_url aws_cert pem crt aws_privkey pem key The thumb drive MUST be titled BATTERY Then power cycle your display and the new files will be copied onto the display Amazon uses public key cryptography to encrypt and decrypt login information Public key cryptography uses a public key to encrypt a piece of data such as a password then the recipient uses the private key to decrypt the data The public...

Страница 33: ...GgAwIBAgIUVOLk r1tEbx1scwcXdzN3M1ar owDQYJKoZIhvcNAQEL BQAwTTFLMEkGA1UECwxCQW1hem9uIFdlYiBTZXJ2aWNlcyBPQUGtYXpvbi5jb20g SW5jLiBMPVNlYXR0bGUgU1Q9V2FzaGluZ3RvbiBDPVVTMB4XDTE4MDkxODAwMDQw M1oXDTQ5MTIzMTIzNTk1OVowHjEcMBoGB1UEAwwTQVdTIElvVCBDZXJ0aWZpY2F0 ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKcw5TjKhHYFmvc9b6Z2 aqTpogS73MfB4Wn7 kZGjKnIDylgD6YXFAtvtlQx68uwe5wONS9wXGjf2qEnijhc cxky18L 94Nawy1MKSQW...

Страница 34: ...iEklPoNt7SR6ce09B PKaq3X4vA5cazUSLTIqym75qIX cPFycYnFgY3UInq7zhZ fKsrKuvOIGzveqDYEBwIk9HxOyEw1UVTJ1 iDw3aagsP wZXOYReCLtDANsmnhsD 2aCExUECgYEA0PyO1L4s58MQQLozQT83gVhZU8d5 ZZ D2U5K9vsQvQmqyJbazIp yEejXuylnuyOU8fCk3WQVDAG5uLRPsg7iaeuUgFdW8QAP51XxpOuVh 1oEv7deVO 4sTYfaBxhcNqhxEVVRi4Gw59vpnS43JnNo13sWEVM5XSBcrcGl xlukCgYEAzM4Z nh64kp8yO1 cj sbQvBpUtzsGA4kV2NPwJhmFS6HDWigMKnDErknjPQH1eeFbIl7 NJmGJB1TKV...

Страница 35: ...ides free sandbox type of accounts with a small data allowance of 250 000 messages per month You can later upgrade this to a paid account if your usage exceeds the basic allowance In this way you can achieve global MQTT communications using multiple display devices have your MQTT data secured by encryption and have it on an account YOU own and control This is the new configuration screen for the M...

Страница 36: ...a sender MUST be on the same wireless hub as the ESP32 BMS Controller in order to receive the original data And that hub must be connected to the Internet to publish relay the data to the Amazon service You must have a local sender for any remote displays to work as a receiver The topic published will be individually identified using the contents of the BMS ID field In this way you can have more t...

Страница 37: ...1 per million messages so about 11 per month The Battery Display sends an MQTT update message every 500 ms or twice per second TO CREATE AN AMAZON AWS IOT CORE ACCOUNT 1 Log into Amazon AWS You may need to create an account with AWS 2 Select SERVICES at the top of screen 3 Select AWS IoT Core 4 On the left menu Get Started Only necessary if you ve never used IoT before 5 At the bottom left select ...

Страница 38: ... Create a certificate 18 Under One click certificate creation select Create Certificate 19 Select Activate The server will create three files that look something like this but file names vary with each THING ce8f02be46 cert pem The certificate for authority ce8f02be46 public key Your public key You don t need this Amazon uses it ce8f02be46 private key Your private key You use this to validate 20 C...

Страница 39: ...ERY with the three files on it Insert the thumb drive into any Battery Display USB port and power up the display Once the Battery Display is up and running YOU MAY REMOVE THE BATTERY THUMB DRIVE The files are copied into a local directory if they are found on powerup On the configuration screen make sure the UDP Port matches the port set on the ESP32 BMS Controller and that the device is displayin...

Страница 40: ... the Battery Display Unit will be EVTV YourBMSID CompleteStatus Enter that in its entirety You can also enter the number of messages to receive and for this enter 1 Then select SUBSCRIBE TO TOPIC The center section of the topic subscribed is shown here as YourBMSID This should of course correspond to the BMS ID entered on the Battery Display configuration screen Once you have subscribed to the top...

Страница 41: ...ching UDP port from the ESP32 BMS Controller and publishing MQTT messages as an MQTT SENDER with your BMS ID you can then set ANY number of additional Battery Displays up as MQTT RECEIVER But note that that display will need to load the same three files from the BATTERY thumb drive at least once on powerup and have the same BMS ID entered on its configuration screen It will then display the same B...

Страница 42: ...tery display or perhaps you want to connect to the included web server on the Pi and desire a permanent static IP number for your device 1 Click EXIT on the Battery Display configuration screen to drop to the Raspian desktop 2 Touch the square black TERMINAL icon on the tools bar at the top of the screen to drop to the command line 3 Enter sudo nano etc dhcpcd conf on the command line 4 Make addit...

Страница 43: ... your domain name service server address In this case Google s servers are listed as 8 8 8 8 To make sure your current wireless hub is the default sudo nano etc wpa_supplicant wpa_supplicant conf 1 Modify the file as below 2 Again CTRL O to write and CTRL X to exist nano ctrl_interface DIR var run wpa_supplicant GROUP netdev update_config 1 country US network ssid riverhouse psk usatoday key_mgmt ...

Страница 44: ...atabase to create user definable historical graphs We have designed a series of these graphs just for the battery display And the Raspberry Pi has the ability to serve as an Internet World Wide Web server at the same time it is displaying your normal battery data To connect to it http 192 168 1 72 3000 from your browser This assumes the IP number of your Display is 192 168 1 72 of course By connec...

Страница 45: ...aph set On each graph if you SHIFT click on the bar at the top of the graph and then click VIEW you will put that graph to a full screen view The Grafana interface is awkward but powerful It is quite normal to have to wait 10 12 seconds for an update But it has a great ability to allow you to examine the operation of your solar storage system over time in great detail It is worth exploring this in...

Страница 46: ...graphical screen updates back in the other direction over a network VNC is platform independent there are clients and servers for many GUI based operating systems Multiple clients may connect to a VNC server at the same time Popular uses for this technology include remote technical support and accessing files on your work computer from your home computer or vice versa VNC was originally developed ...

Страница 47: ...at the framebuffer level RFB is applicable to all windowing systems and applications This document describes the protocol used to communicate between an RFB client and RFB server RFB is the protocol used in VNC So to access your Battery Display from your laptop or desktop computer simply download and install the free VNC Viewer program for your particular operating system https www realvnc com en ...

Отзывы: