[chbot] I2C & ESP8266 tip.

Peter Harris petes.username at gmail.com
Thu May 21 00:45:50 BST 2020


>* I’ll put that away in the memory bank to pull out just after I spend three
*>* days rediscovering the same thing.
*>>* Doing anything interesting?
*>>
* Andy
*

You may remember the 3-phase power monitor I built using 4 Arduino
Nanos. It had 1 Nano monitoring V&I on each phase and a 4th collecting
the data via I2C & presenting it to my home network using an Ethernet
over mains adaptor.
Well Ethernet over mains is patchy at best in my home, I suspect the
power line comms used by the solar is clashing.
I recently started playing with ESP8266s in the form of the Wemos D1
mini & Wemos D1 R1 (* see note below). I am a fan. These provide more
resources & an easier/more stable network connection so out goes the
network Nano.

Long story short: There is now just one Nano doing all the
measurements. When the data changes it pulls an ESP pin low (** more
notes below), the ESP then performs an I2C master read.

* Tips on Wemos D1 R1 IO
Some Adruino header pins marked with a * below are paralleled and
driven by one device pin.
The state of some IO pins can prevent the ESP8266 booting.
// D1R1 pin  ESP8266 Pin  Notes
//  D0        GPIO3 RX    High on boot
//  D1        GPIO1 TX    High on boot, fails if low
//  D2        GPIO16      High on boot
//  D3 *      GPIO5 SCL
//  D4 *      GPIO4 SCA
//  D5 *      GPIO14
//  D6 *      GPIO12
//  D7 *      GPIO13
//  D8        GPIO0       Pulled high. boot fails if low
//  D9        GPIO2       Pulled high. boot fails if low
//  D10       GPIO15      Pulled low.  boot fails if high
//  D11 *     GPIO13
//  D12 *     GPIO12
//  D13 *     GPIO14
//  D14 *     GPIO4 SCA
//  D15 *     GPIO5 SCL

** Needs a 5V/3V level shifter
https://www.aliexpress.com/item/32780195206.html?spm=a2g0s.9042311.0.0.27424c4dbvVVOl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/chchrobotics/attachments/20200521/c0c36372/attachment.html>


More information about the Chchrobotics mailing list