sc7-testo-firmware/README.md

3.7 KiB

TESO-O Fun Robot at Hackaday Supercon 2023

Firmware for TEST-O: The Continuity and Diode Test Funbot

This is a PlatformIO-compatible project.

 

BE AWARE:
On REV1 boards, the right potentiometer only works for the first half of its rotation. Turning the right pot beyond half way will not cause damage, but the addon will consume extra current (up to ~3-5mA). If the knob is within the affected second half of rotation, the eye LEDs will flash red as an indicator while in RGB fun mode.

To work around this, use the right pot only within the first half of its rotation.

 

What can you do with it?

The TEST-O Robot is:

  • A continuity meter

    • Set the switch to the left position.
    • Use the provided probes to check continuity.
    • The left eye will show continuity status.
    • Continuity is indicated if a resistance of ~100ohms or less is detected.
    • Turn the buzzer on or off using the button while in this mode.
    • Testing voltage is ~1.2V and limited to ~2mA.
  • A diode test meter

    • Set the switch to the right position.
    • Use the provided probes on the diode.
    • The right eye will show diode test status.
    • Status is updated if the diode conducts (positive on anode, negative on cathode).
    • Shorts are shown with a different eye LED color.
    • LEDs can be tested, though not all will light or indicate on the right eye.
    • Testing voltage is ~3.1V and limited to ~2mA.
  • An RGB light show with long dangly probe arms

    • Up to you if you want to short things out with dangly probes
    • 7 configurable RGB programs available
    • Turn the potentiometers to set program parameters
    • There is an empty RGB LED program slot available for hackers to add one

Hacking

Use a DAPLink probe to debug. If you don't have one, there are many projects to convert existing devboards to DAPLink.

If you want to hack on this without a debug probe, an XMODEM bootloader is available. Use a TTL UART to connect to the UART pins on the addon header. To activate the bootloader, ensure the left knob is between halfway to full clockwise. Press and hold the button while powering on. The bootloader will now indicate it is working with flashing LEDs, and will communicate at 115200-8-N-1. Send your firmware.bin file using XMODEM using a terminal emulator.

Specifications

  • PUYA PY32F003W16S6 MCU
    • ARM Cortex-M0+ core running at 8MHz
    • 32K Flash / 4K RAM
  • 2x RGBLED for indicators or fun mode
  • Low-power piezo buzzer for continuity test
  • Built-in continuity cheeks and LED test antenna
  • Pots to set things just how you want them
  • Works as an addon, or standalone with a CR2032

Binaries

The bin/ directory contains pre-built binaries. Names are formatted as follows:

testo_0.0.1_abcdef1_fw2k.bin

fw2k are intended to be sent via XMODEM to the built-in bootloader.

blfw_x.y.z are binary files with the bootloader version x.y.z prepended. These are intended to be written with a debugger or programmer.

Misc Notes

  • This device is using PUYA PY32F003 series MCU. This MCU, as well as other PY32F002A/003/030 cores with at most 32K flash, internally uses the same core (and has the same features) as PY32F030F6P6.

  • The normal firwmare does not use UART and leaves the pins configured as SWD to allow the user to interface a debugger.

  • There is no official OpenOCD support for this MCU. It is possible to get PlatformIO to support debugging this MCU with pyOCD as adding PUYA MCU to pyOCD is trivial. Use of OpenOCD, J-Link debug probe, or anything other than the DAPLink compatible debugger with pyOCD is untested and left as an exercise to the programmer.

Credits

Original idea by rCON. Idea tweaked and implemented by true.

Art modified by rCON and further modified by true.

Schematic, board layout, code, and assembly by true.