Latest on ESP32

Been working on the ESP32 a lot lately, and the latest prototype is coming together with progress on the firmware. First the visuals. Here is the main board coupled with an extension board that can be used to double the number of inputs:

This prototype used headers to allow the ESP32 DEVKIT-C to be plugged in. The production unit will directly solder the DEVkit to the board. This arrangement allows me to swap in different processors. It can currently run with either a WROOM-32 or WROVER ESP32.

Probably not easily noticed is that the SDcard is now a push-push holder instead of the push-pull used on the ESP8266 IoTaWatt. Thjis allows much easier insertion and removal, and also should solve a problem in manufacturing with the old holder.

This board has a separate 3 Volt power supply running off the 5V input to supply lower noise ADC reference and bias. It also affords the ability to change the ADC reference voltage by simply using a different LDO regulator. I’ll be trying out a 1.5V version with 10 Ohm burden in the near future.

The big improvement is the ability to connect an extension board using Flat Flexible Cable (FFC). This cable is not only physically flexible, but also introduces a lot of flexibility in packaging.

As you can see, with the long cable shown, Each of the boards can be packaged in a standard IoTaWatt enclosure and the cables run out and in through a slot in the base.

Another way to do it is to use a short cable and stack the boards:

With this approach, a riser could be fabricated to accomodate the extension within the existing enclosure. Either way, by including the inexpensive connector on the base unit, it can now be field upgraded. The connector is a ZIF (zero insertion force) design with a simple locking lever.

This extension board is the same PCB as the main board with fewer components and a few jumper SMT “resistors”. It has it’s own ADC reference power supply so it can be run at a different voltage from the main board. This board will be much cheaper to manufacture not only because it uses fewer parts, but because it doesn’t have thru-hole components.

A final version will be a unique PCB and will probably have an I/O expansion chip as well as some circuitry to allow using other sensors. Maybe 10K temperature and/or 4-20mA. There is one MCP3208 ADC port available and one ESP32 ADC port available.

I’ll post another entry to talk about the changes to the firmware and what I hope can be added going forward.

The thing is rock solid. Here’s a preview. Channel 15 is on the extension board.


4 Likes

Wow - look at all the free heap space too !!

Great Progress Bob - wish we could clone you to get it out the door faster !

Craig

I hope it’s enough to support HTTPS for both the web server and the client sessions. More of that memory will be needed for buffers as I port the remaining services. The ESP-WROVER has 4Mb of PSRAM that may be the key to SSL and a better datalog.

:heart_eyes_cat: that looks amazing, such progress!
At this rate, I’ll be able to hook dad up with one next Christmas! The dream lives :stuck_out_tongue:
You’re a gorram wizard, Bob. I wish I had half your smarts!

Is HTTPS that big a deal for how this is used ?

If it is going to give issues (futher down the track with heap again) putting it in there as compared to adding other more useful features (like MQTT for instance ?)

Craig

Commercial users are very interested in HTTPS. There are workarounds with proxies, but having it native will open up things like influDB 2. It remains to be seen how the PSRAM will contribute. If the certs can be stored and processed in PSRAM, the only heap requirement as I understand it is a larger buffer during the handshake.

Like HTTP, MQTT can also use TLS. With TLS you can get assurance that the broker you are connecting to is authentic and you can insure the data is not altered or viewed. While most folks might not care about that, I think the trend will be toward TLS MQTT as it becomes easier to accomplish with more capable IOT devices.

For users that want MQTT, I think it would be easy to translate IoTaWatt query output to MQTT using NodeRed.

Yeah thats what i am doing with NR now and it is working well.

Have you seen the new iteration of the ESP32 that has come out recently ? Same form factor, but processors up to 240mhz and a few other enhancements that may be worth looking at

Craig

1 Like

I’m running the ESP32-WROVER-IE with 8Mb PSRAM at 240MHz. Very fast.

2 Likes

3 posts were split to a new topic: Convert Query output to MQTT using NODEred

Great to see you progress. Just wondering , is 14 extra inputs the maximum, or could one stack 2 or more units together? (by adding 2 ZIF connectors instead of one?)

Short answer is that I don’t think it’s practical.

The issues would be:

  • The cycle sample rate has only increased 50% from 40 to 60 (33.3 to 50 at 50Hz) yet the number of inputs is doubled. So the the frequency of samples is down to about every 500ms/600ms (60Hz/50Hz) where it was about 375ms/450ms with the current ESP8266. Note that a 14 channel ESP32 is 250ms in a 15 inputs system (60Hz).

  • One of the resources that doesn’t scale well is GPIO for ADC chip select. Initially, I designed this with a decoder chip to output the 4 chip selects using three GPIO. Two pins are bank and ADC where the third is the actual chip select. There is only one remaining free output GPIO pin so it would require adding an 8 output decoder and using the additional pin to input a two bit bank designation. With that, the number of ADCs could be 8 subject to these other limitations.

  • I don’t believe there is a FFC connector that can go in and back out. Moreover the 12 conductor that I am using would need to go to 14 or 16 to accommodate more CS lines. That said, there will be plenty of real-estate on the expansion boards to accommodate two connectors.

IMO the better approach would be to use the higher communications bandwidth to have a second unit communicate it’s data to a master with an expanded datalog. I’m pretty confident I will not be doing that, but that would be my approach.

Is there any timeline for the ESP32?
Should I start saving my pennies, or perhaps I should be saving dollars :slight_smile:

I’m working on it pretty much daily, but although the core energy monitoring is done and working great, there is a lot of other functionality that has not been replicated and I need to fully explore the options for HTTP and HTTPS in this new environment.

With tooling and regulatory and safety testing it cost tens of thousands of dollars to bring the ESP8266 version to market and involved a lot of effort that I am frankly becoming less than enthusiastic about. I enjoy doing the hardware and software development and am currently thinking of just pursuing it as a hobby project.

I may make some form available as a kit with no certifications, but realistically a product as packaged and solid as the ESP8266 is unlikely anytime soon. Best case is that an entity comes forward to invest in the technology and handles the regulatory and business end of it.

2 Likes

I would be interested in a ESP32 kit if that’s how it would have to come to market. Even if its a bare PCB and a bag of components that need to be soldered on.

It’s actually a lot easier to have a limited run of PCBs at the fab plant than to source and bag up components. Besides, I have a template and reflow oven and it’s still a PIA to assemble by hand.

Put me down for one in whatever way you make it available.

Just wondering, is there anything we as a community can do that makes any of the tooling, safety or regulatory stuff less of a pain? Thinking if there’s people here who have the sorts of skills in these things that are interested in contributing it would be amazing if there was a way to share the burden around to help bring this to market.
Looking through the community threads there are people left right and centre getting so much out of these both from a energy savings point of view but also learning about their own homes so much, I’m sure there would be some that would be happy to help!

1 Like