STM32F103C8T6 Solar Power System Monitoring

If you read my last post on Solar Power System  Monitoring with an Arduino you might be wondering if that circuit could be enhanced a bit. Say, change the LCD to an OLED and add wireless (WEB server) capability?

I was not happy to have to go out and look at the device when I wanted to see the info. So I did enhance it a bit. I changed the LCD to an OLED for more info in case I did happen to be where the device is and I added a wireless module (an ESP8266). The wireless module has a WEB server so I can just connect wireless via a browser and see the info.

Since the ESP8266 needs 3 Volts, I also changed the ‘arduino’ I was using. I switched to an STM32F103C8T6 (BluePill) since it can take 5 Volts and output 3 Volts.  This new circuit still uses the LM7805 voltage regulator to take the 14 Volt input and then output 5 Volts. It also keeps the SN75176BP for the RS485 protocol conversion.  If you have not read the previous post, you can find more details there on those components.

Here is what the circuit wiring looks like:

STM32F103C8T6 Solar Power System Monitoring



You can get the Fritzing code for this circuit here.




Here is what the circuit looks like (top and front side view):

STM32F103C8T6 Solar Power System MonitoringSTM32F103C8T6 Solar Power System Monitoring







The left side has the STM32F103C8T6 and the RJ11 connector. The right side has the ESP8266, the OLED, the SN75176BP and the LM7805. The LM7805 has a heat sink on it since it gets a bit hot. The STM32F103C8T6, ESP8266, OLED and  SN75176BP are all in sockets for easy (re)placement. This circuit has all the ‘messy’ wiring and soldering on the bottom (hidden from view).  In my previous post I still had all the components on a breadboard.

Here is the code to load into the STM32F103C8T6 (using the Arduino IDE):

I am using the Adafruit GFX and SSD1306  libraries to control the OLED. The ESP8266 is just connected via a serial connection and sent commands to set it up as an access point and WEB server.

The wireless access point name is just set to ESP8266. You can change it to anything you want. The IP address is, so just go to that IP address in a browser after connecting wirelessly. The WEB page will refresh every 5 seconds.

My next step is to enhance the code to display more info as it still only outputs the codes like the LCD version does. Here is a picture (photography is not my forte) of the device on top of one of my Lithium Batteries (from Deeds Solar Solutions).





Leave a Reply

Your email address will not be published.