Bluepill working with ESP8266 and Serial

Post here first, or if you can't find a relevant section!
Post Reply
staticmem
Posts: 16
Joined: Mon Oct 16, 2017 1:13 am

Bluepill working with ESP8266 and Serial

Post by staticmem » Sun Oct 22, 2017 7:26 am

I'm drawing up a schematic for an energy monitor project that will incorporate a Blue Pill (BP), ESP8266-12 (ESP) running EmonESP, SD card and some power supply support, etc. I have some questions concerning how the BP and ESP8266 could be programmed and interact. Obviously they can just be removed from the circuit and programmed but I'd like to do the following:

Flash the ESP via the BP by using a couple of outputs pin on the ESP GPIO0 and GPIO2 to place the ESP into program mode then use the BP Serial port 1 to relay serial to the ESP HW Serial port. Has something like that already be done or is there a better way?

Have it so the ESP can Flash my BP firmware via EmonESP. I see EmonESP has a Firmware upload button but it does not seem to do anything and I can't find any information about how it should be used. I assume that is for flashing the EmonESP firmware though? How can I flash the BP firmware OTA?

I'd also like to add some extra functionality to the EmonESP firmware so that it can accept serial commands using some sort of Escape sequence to accept commands to do other things like returning calibration parameters, NTP time from a server and what ever else I need for the BP. I could also just use a SW Serial port on the ESP and use one of the other free BP Serial ports dedicated for this purpose.

I have used Telnet protocol server in an ESP so that it can access the serial port which worked fine for debugging and output of log data in real-time but was a bit flaky when I tried to send it a command from a Telnet terminal client (depends on client software). Ideally I'd like to do most of what is required over HTPP server in the ESP that can co-exist with EmonESP so that I don't have to connect directly using a serial port to set parameters or update firmwares.

Can anyone guide me on what is already around that addresses what I'm trying to do or other ideas?

stevestrong
Posts: 2061
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: Bluepill working with ESP8266 and Serial

Post by stevestrong » Sun Dec 24, 2017 10:51 am

@staticmem,
I think you realized by now that not much activity has been done in this direction by the forum members.

However, we would be happy if you could share with us any progress of your work.

staticmem
Posts: 16
Joined: Mon Oct 16, 2017 1:13 am

Re: Bluepill working with ESP8266 and Serial

Post by staticmem » Sun Dec 24, 2017 11:14 am

I'm now up to a my third revision schematic and PCB design thanks to the cheap ALLPCB pricing. I've coded it to test the low level side and really just needs me to complete the main application firmware now. I will post in the projects section when I have my CHDK operated camera and lighting set up better to take some pictures and more details generally about the design.

So far the ESP8266 module I can program via the BP by running some code that places the ESP8266 into program mode (I can reset it and set Flash pin)

My 3rd revision I by-pass the BP 3v3 regulator and provide a 3v3 supply from another regulator IC on the main board to avoid issues in PS feeding the BP.

I will be making it an open source project.

ChrisMicro
Posts: 318
Joined: Fri Mar 24, 2017 4:51 pm
Location: Germany

Re: Bluepill working with ESP8266 and Serial

Post by ChrisMicro » Sun Dec 24, 2017 12:05 pm


staticmem
Posts: 16
Joined: Mon Oct 16, 2017 1:13 am

Re: Bluepill working with ESP8266 and Serial

Post by staticmem » Sun Dec 24, 2017 12:17 pm

No I have not but I will look into it at some stage in more detail. My design is set in place for now but will see if I need to make changes for communications side of things.

staticmem
Posts: 16
Joined: Mon Oct 16, 2017 1:13 am

Re: Bluepill working with ESP8266 and Serial

Post by staticmem » Tue Dec 26, 2017 6:45 am

stevestrong wrote: @staticmem,
I think you realized by now that not much activity has been done in this direction by the forum members.

However, we would be happy if you could share with us any progress of your work.
I've posted a new topic under the Projects forum:
viewtopic.php?f=19&t=3022#p39132

Post Reply