Double-Decker Stacked ESPs for Fault Tolerance?
Posted: Wed Oct 26, 2016 8:07 am
It's great to hear how far (thousands of miles) Livetv has taken Esp_Basic out into the real world... http://www.esp8266.com/viewtopic.php?f=40&t=12258
And it's obvious from comments that reliability and fault tolerance are becoming more important, if problematic.
So I thought I'd mention a ghost of a hardware idea that might offer a potentially useful alternative direction which may be of interest to someone.
I keep 'feeling' that there could be some value in stacking a couple of ESP-12F's above each another - using roughly half-inch straight-through connecting wires for power and some common control pins, but criss-crossing TX & RX, and connecting a gpio from each to the others reset.
A sort of 'double-decker ESP brick'.
It would offer a more powerful dual processor node with extra IO if needed.
But it could also offer independent Quality-Of-Service monitoring - of each other and/or the network - with one hopefully always surviving to take corrective action for the other when needed.
They would both have the same common default.bas script plus the same primary.bas and secondary.bas scripts.
The common 'Default' script could check at bootup for something like a serial response (or even a gpio pin state) to decide at startup whether to load the 'Primary' or 'Secondary' script depending on the order they start up in... possibly influenced by the presence or absence of a serial response. A reset hardware timing delay (capacitor) could be added to one of the chips to cause one ESP to always start before the other, but I don't think it would be necessary unless wanting to check for pin states rather than serial response. A software time difference could be implemented according to the unique last IP address byte, ie: DELAY LastByte * 200 would ensure a minimum difference of 200ms even for consecutive DHCP addresses.
The Primary script would 'do the main business', and the Secondary might just keep checking status of the primary while remaining on standby to load it's own 'Primary' script and take control if the existing primary or it's network connection failed, then the failed primary could be rebooted again as a secondary. The primary could send all relevent variables via serial for the secondary to save to flash, so whenever there was a role reversal it could be fairly seamless.
The secondary might do other tasks besides just monitoring the primary's health - it could offer availability of a 2nd TIMER facility, or another pin INTERRUPT, or a myriad of other possibilities, including additional independent functionality if required.
It should be possible for the 2 ESPs to share hardware resources, because only the primary would be configured to actively drive shared output pins, and inputs could simply share a common pullup/pulldown resistor.
Slight tangent... they don't have to be double-deckers, ie: a couple of ESP-01's stacked end to end might be used as a physical wifi(1) to wifi(2) bridge with integrated monitoring and signalling.
Just offering some food for thought for anyone who might be interested.
And it's obvious from comments that reliability and fault tolerance are becoming more important, if problematic.
So I thought I'd mention a ghost of a hardware idea that might offer a potentially useful alternative direction which may be of interest to someone.
I keep 'feeling' that there could be some value in stacking a couple of ESP-12F's above each another - using roughly half-inch straight-through connecting wires for power and some common control pins, but criss-crossing TX & RX, and connecting a gpio from each to the others reset.
A sort of 'double-decker ESP brick'.
It would offer a more powerful dual processor node with extra IO if needed.
But it could also offer independent Quality-Of-Service monitoring - of each other and/or the network - with one hopefully always surviving to take corrective action for the other when needed.
They would both have the same common default.bas script plus the same primary.bas and secondary.bas scripts.
The common 'Default' script could check at bootup for something like a serial response (or even a gpio pin state) to decide at startup whether to load the 'Primary' or 'Secondary' script depending on the order they start up in... possibly influenced by the presence or absence of a serial response. A reset hardware timing delay (capacitor) could be added to one of the chips to cause one ESP to always start before the other, but I don't think it would be necessary unless wanting to check for pin states rather than serial response. A software time difference could be implemented according to the unique last IP address byte, ie: DELAY LastByte * 200 would ensure a minimum difference of 200ms even for consecutive DHCP addresses.
The Primary script would 'do the main business', and the Secondary might just keep checking status of the primary while remaining on standby to load it's own 'Primary' script and take control if the existing primary or it's network connection failed, then the failed primary could be rebooted again as a secondary. The primary could send all relevent variables via serial for the secondary to save to flash, so whenever there was a role reversal it could be fairly seamless.
The secondary might do other tasks besides just monitoring the primary's health - it could offer availability of a 2nd TIMER facility, or another pin INTERRUPT, or a myriad of other possibilities, including additional independent functionality if required.
It should be possible for the 2 ESPs to share hardware resources, because only the primary would be configured to actively drive shared output pins, and inputs could simply share a common pullup/pulldown resistor.
Slight tangent... they don't have to be double-deckers, ie: a couple of ESP-01's stacked end to end might be used as a physical wifi(1) to wifi(2) bridge with integrated monitoring and signalling.
Just offering some food for thought for anyone who might be interested.