I’ve recently been speaking to Ben about the next generation of the HAccess system
It turns out the main sticking point may be the software rather than the hardware.
In that we’d need different scripts or variations for different things like the door or the laser cutter etc.
One idea that’s cropped up is the use of micropython
This would make it easy to script by as many users as possible.
I’ve been giving this a bit of thought, there may be a couple of different ways to do this
The first option is to use an ESP-07S in combination with an external ARM chip
The ARM chip does the IO and micropython side of things, and watchdog’s the ESP
The ESP handles the wifi and a basic socket server
I like this idea because the ESP side of the code might already be written for us
the duet wifi board uses an ESP8266 to handle the wifi which is controlled by an ARM CPU
The socket server is based on the arduino framework for the ESP8266
- https://github.com/dc42/DuetWiFiSocketServer - I think the main socket server run on the ESP
- https://github.com/dc42/CoreESP8266 - appears to be a piece of the arduino library
- https://github.com/dc42/LwipESP8266 - appears to be a piece of the arduino library
- https://github.com/esp8266/Arduino - all in one library
I’ve not tried building this yet or but I’ve got some hardware dev boards to play about with.
This could potentially cut out a large chunk of the code we need to write.
As it’s just a case of writing some python on the Arm to configure / setup the ESP
The next option is an ESP32 standalone
- Might be cheaper (upside)
- Might not have as much IO as the above (downside)
- Unsure if it has similar watchdog issue as the ESP8266
Based on the info here
The minimum specs for micropython are around
- RAM: > 64kB
- Flash: > 256kB
- Clock: >70MHz
The baseline CPU they use is a STM32F405RG
- 196KB Ram
- 1MB Flash
I’m unsure which Arm CPU is in the latest incarnation of the hardware design / what the specs are
Looing at the STM32F405RG these are around £7.80 from farnell, or £3.60 from aliexpress
Although I’d imagine something lower spec / cheaper would be okay instead
although things for evaluation would be how easy to solder, compatibility with micropython (software and mem / flash specs), and what type of IO would be best.
I was also wondering if adding a cheap SD card to the design would be an idea?
A cheap aliexpress micro-sd card smallest size which is written to using a wear leveling filesystem
It might avoid wearing the flash of the microcontroller out, and be replaceable
since every time a new member is added it will need to update
micropython has support for a minimal filesystem and could also be used to store python scripts.