gkasprow / Sensor-Box

Multichannel standarized enviorement for home automation and other MQTT applications
18 stars 11 forks source link

CPU selection #1

Open gkasprow opened 6 years ago

gkasprow commented 6 years ago

I was looking for several CPU options that Cayenne supports and that has all features I need. And it seems that ESP32 is quite good choice due to its low price and plenty of features. It lacks IOs, but this can be mitigated easily using low cost extenders. I built simple test platform to see how already available Ethernet code works. 20171202_161139 And after some tweaking it really works. The oscillator needed capacitor circuit to fix an issue reported here.

gkasprow commented 6 years ago

Udate - I made running original ESP8266 code on ESP32. Just a few changes in header file names - rename Wifi.h to ESP32_Wifi.h and comment lines 43..46 in the file CayenneMQTTWiFiClient.h.

> //            if (WiFi.status() == WL_NO_SHIELD) {
> //                            CAYENNE_LOG("WiFi shield not present");
> //                            while (true);
> //            }
gkasprow commented 6 years ago

Update - Cayenne now supports ESP32 as well, but only Wifi connectivity

gkasprow commented 6 years ago

In many cases Ethernet connectivity will be needed. ESP32 is fine, but has limited IO resources, i.e. number of UARTS. I checked the SAM9D21 CPU, popular in Arduino community, priced about 2.5$/pc CPU. It works with CayenneMQTT library very well. Cayenne offers several approaches - Arduino and RPi libraries which are configured using top - bottom approach where certain IO or channel is activated from web interface. There is another library called CayenneMQTT which offer bottom-top approach where data channel is defined by MQTT message type, in the source code. And this is what we need. So I connected SAM9D21 board from RobotDyn with Wiznet W5500 board, compiled Cayenne MQTT example design and it works. So I will prepare 2 main boards - one with ESP8266 + optional Ethernet PHY board and another with SAMD21 with W5500 so developers have choice which way to go.

gkasprow commented 6 years ago

I want to use Node Red as a main controller. It is very flexible solution and enables ability to integrate literally everything with everything. To make it possible, I designed board with Orange Pi module. But after first experiments I discovered that it takes really a lot of power (more than 5W) and gets very hot after a few minutes. I found a tiny board that is very cheap (~10$), takes 0.6W, has WiFi and Ethernet and enough computing power to do the job. So I redesigned the hub module to support both Orange Pi zero and Onion Omega 2+