- PC Engines/mini PC
- 2 x LAN connections
- 2 x USB connections
- Turris Omnia
- 1 x WiFi modem
- 2 x LAN connections
- Feather HUZZAH ESP8266
- USB connection
- WiFi connection
- Powered USB Hub
- 4 x USB connections
- 1 x Power connections
- Relay switch
- Power connection
- 1 x Turris Omnia - WiFi access point
- 3 x Feather HUZZAH ESP8266 - IoT WiFi devices
- PC Engines/mini PC
- Reverse SSH, cloud connection
- USB relay connection connection
- Powered USB connection
- Turris Omnia LAN connection
- Relay switch
- Powered USB hub
Instal esptool with:
pip3 install esptool
Using esptool you can erase the flash with the command (use sudo usermod -a -G dialout $USER
to access the serial port without sudo):
esptool.py --port /dev/ttyUSB0 erase_flash
Download micropython for ESP8266 with 2MiB+ flash:
https://micropython.org/download/esp8266
And then deploy the new firmware using:
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20170108-v1.8.7.bin
You might need to change the port
setting to something else relevant for your PC. You may also need to reduce the baudrate if you get errors when flashing (e.g., down to 115200). The filename of the firmware should also match the file that you have.
To access the prompt over USB-serial you need to use a terminal emulator program. Linux has picocom and minicom.
picocom /dev/ttyUSB0 -b115200
Ampy is meant to be a simple command line tool to manipulate files and run code on a CircuitPython or MicroPython board over its serial connection.
pip3 install --user adafruit-ampy
To list the files on ESP use:
ampy --port /dev/ttyUSB0 ls
There are two main python files located on ESP8266 after uploading the firmware:
boot.py
- run on board startup, configures the micropython for the boardmain.py
- where the main app is located
If main.py
is changed, the board needs to be unplugged and the plugged back in for the changes to take effect.
atolla Powered USB 3.0 Hub 20W, 7 Multi USB Data Ports Hub splitter with Individual On/Off Switches+1 USB Smart Charging port with 5V/4A Power.
Changes to hardware:
- Cut the USB 3.0 power wire
- Soldered a shunt between the USB power pin and 5.0 V main power socket input
The relay switch box is based on Devantech USB-RLY16L 8 Channel 16A board. The relay controls two channels 1 and 8, which are connected to two power sockets. The PC to box connection is done through CDC serial USB by using the port /dev/ttyACM0
or similar. The baud rate for the serial connection is 19200
and the commands can be run with picocom
tool as follows:
picocom --imap 8bithex /dev/ttyACM0
The commands descriptions are depicted in the picture below:
Position 0 means that there is no power going to the corresponding power switch.
The relay board construction is as follows:
The hardware setup is depicted below: