Trinkets, Power supplies and resets

For a project I’ve working on, I’m using a Trinket M0 from Adafruit. This tiny board runs a cut down version of Python called CircuitPython which is a derivative of MicroPython. This allows the board to be treated like a USB disk to copy on the code and then simply power it up to run the code.

Failing to boot

The code and electronics worked fine when in development but when I wired it all together it kept failing to boot. Resetting the board or rapidly toggling the power supply resolved the issue.

Luckily the Trinket comes with a handy status LED which can flash different colours when errors occur. Mine was flashing yellow.

The Troubleshooting Guide reports this means:
“YELLOW: Circuit Python is in safe mode: it crashed and restarted”

In the Circuit Python docs, it mentions that:

“safe mode that does not run user code after a hard crash or brown out”

There were other components in the circuit running on 12v so I’d picked a simple car 12v-5v DC-DC converter. It was rated well over the required specification and contained some handy mounting lugs which I thought would save me some effort in the project.

Looking at the data sheet for the main chip ATSAMD21E, there’s a section on power that mentions:

“Minimum Rise Rate
The integrated power-on reset (POR) circuitry monitoring the VDDANA power supply requires a minimum rise rate.”

Slow to rise or wobbly?

I don’t believe the issue is that the supply is not regulating well as when some higher power switches in the rest of the circuit are switched that does not affect the Trinket. Also looking at the schematic of the trinket there are some big capacitors on the supply rails.

So the conclusion is that the CPT-UL-1 module does not stabilise at 5v quickly when powered from the mains adaptor I’m using. I’ve bought a second one so I can have a further experiment without affecting the project.

My work around for this project was to add a simple resistor / capacitor reset circuit which will hold the reset line down until the power has had a bit more time to stabilise. There do also seem to be some simple chips like the LP3470 and DS1818 which provide a nice clean signal for the reset line.

Leave a Reply

Your email address will not be published. Required fields are marked *

 characters available

Notify me of followup comments via e-mail. You can also subscribe without commenting.