Main PY32F003 application firmware for TEST-O Robot Addon Buddy Badge
Go to file
true ad383a76ac Changed error flash routine
Need to add other features that involve flashing the error code lights, so made it possible to do this with different colors and without interfering with running programs
2023-11-01 06:05:40 -07:00
.vscode Initial repository layout, add datasheets and device pack 2023-10-16 14:26:16 -07:00
boards Move original .svd files to misc/svd/original 2023-10-21 07:12:48 -07:00
datasheet Initial repository layout, add datasheets and device pack 2023-10-16 14:26:16 -07:00
include Changed error flash routine 2023-11-01 06:05:40 -07:00
lib Continuity and diode mode initial implementation 2023-10-21 19:45:15 -07:00
misc/svd Further clean up py32f030xx.svd 2023-10-21 16:43:23 -07:00
src Changed error flash routine 2023-11-01 06:05:40 -07:00
test Initial repository layout, add datasheets and device pack 2023-10-16 14:26:16 -07:00
.gitignore Update .gitignore 2023-10-21 07:54:29 -07:00
README.md Update README.md 2023-10-31 08:22:07 -07:00
platformio.ini platformio.ini and linker script fixups 2023-10-31 07:46:25 -07:00
py32f030x6.ld Use vendor pack 2023-10-21 07:53:25 -07:00
py32f030x6_bl.ld platformio.ini and linker script fixups 2023-10-31 07:46:25 -07:00
pyocd.yaml Use vendor pack 2023-10-21 07:53:25 -07:00
pyocd_user.py Use vendor pack 2023-10-21 07:53:25 -07:00

README.md

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

Misc Notes:

  • This device is using PUYA PY32F003 MCU, an MCU intended for the China domestic market. This MCU, as well as other PY32F002A/003/030 cores with at least 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 for the user.

  • There is no official OpenOCD support for this MCU. This project uses pyOCD as adding PUYA MCU to pyOCD is trivial. Using OpenOCD, J-Link, 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.