Latest posts

How do I fix a bricked device?

You will need the following installed on your computer:

  • You need Python installed
  • Installation of esptool.py and other python programs are simplified by also installing pip
  • Install esptool.py, which is a Python program. The simplest way to install it is to open a command window and enter: pip install esptool

Pow-K+ (ESP32-S2 microcontroller)

You're lucky - this is an easy one!

The Pow-K+ can be reprogrammed from a PC using the micro USB port at the back of the board:

Pow-K+ USB port

How to reprogram the board

  1. Remove the Pow-K+ from your power meter
  2. Connect a micro-USB cable between your computer and the board
  3. Wait a minute or so to charge the super capacitor (no worries; nothing wrong will happen if you're too impatient).
  4. Press and hold the AP/Prog button while you press and release the RESET button. The board is now ready to receive firmware upload. This will open a COM port on your computer.
  5. If you're on Windows, open Device Manager to identify which COM port is opened. Note it down; you'll need it later. If you're on a mac... well, I have no idea, but I assume you'll be able to google it. :-)
  6. Download the latest revision firmware files from Github. The processor on Pow-K+ is an ESP32-S2, be sure to select the right files.
  7. Open a command window and go to the folder containing the downloaded files.
  8. Enter the following command, replacing "COM3" with the COM port you found in point 5
    esptool.py --chip esp32s2 --port COM3 --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_qio_40m.bin 0x8000 partitions.bin 0x10000 firmware.bin
  9. If all is well, you'll see the upload progress in the command window.
  10. If you get an error message, retry point 4, and/or recheck that you are on the right COM port.
  11. When upload is completed, press RESET to reboot the board
  12. Press and hold the AP button for 5 seconds
  13. Follow the instructions in Firmware User Manual to configure your board.

Pow-K or Pow-U (ESP8266 microcontroller)

You will need an FTDI-module, for instance this one: https://www.kjell.com/no/produkter/elektro-og-verktoy/arduino/moduler/luxorparts-usb-til-seriell-adapter-for-arduino-p88064

Power the board before powering the FTDI module. Connecting a powered FTDI module to an unpowered board may destroy your board.

  • Pow-U is powered by the micro USB connector.
  • Pow-K is powered by providing 5V to the board on its power port:

Ensure the FTDI module is set to 3,3V (usually by a jumper). Having it set to 5V may destroy your board.

Your board has holes where the pins of the FTDI-module can be plugged in. The holes are arranged in zig-zag, so you will get a good connection without soldering in a connector.

 

The marking on the PCB (GND, Rx, Tx) is for the FTDI-module:

  • Rx on FTDI to Rx on the board
  • Tx on FTDI to Tx on the board
  • GND on FTDI to GND on the board
  • (The remaining lines on the FTDI module are not used)

Programming procedure:

  1. Connect the FTDI-module to your computer
  2. If you're on Windows, open Device Manager to identify which COM port is opened. Note it down; you'll need it later. If you're on a mac... well, I have no idea, but I assume you'll be able to google it. :-)
  3. Press and hold the AP/Prog button while you press and release the RESET button. The board is now ready to receive firmware upload.
  4. Download the latest revision firmware files from Github. The processor on these boards is an ESP8266, be sure to select the right file.
  5. Open a command window and go to the folder containing the downloaded file.
  6. Enter the following command, replacing "COM3" with the COM port you found in point 2
    esptool.py --chip esp8266 --port <port> --baud 115200 --before default_reset --after hard_reset write_flash 0x0 firmware.bin
  7. If all is well, you'll see the upload progress in the command window.
  8. If you get an error message, retry point 3, and/or recheck that you are on the right COM port.
  9. When upload is completed, press RESET to reboot the board
  10. Press and hold the AP button for 5 seconds
  11. Follow the instructions in Firmware User Manual to configure your board.

Posted in: FAQ

Leave a comment