Pico keeps on blowing up

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
stefatasium
Posts: 2
Joined: Mon Aug 30, 2021 9:09 am
Contact:

Pico keeps on blowing up

Post by stefatasium » Mon Aug 30, 2021 9:25 am

Hi all,

I'm hoping that someone can help resolve this problem as I've blown up two pico's so far and I'm really reluctant to blow up another.

I am using the standard Raspberry Pi Pico.

I am using it to control a switch.

When the switch is pressed, it activates a servo and then a few seconds later actiavte a 12v relay.

After 30 seconds of operation, the relay goes off and the servo resets.

It all works fine for a few days and then it just stops working and then I can't connect.

I'm pretty sute its my code... any help would be awesome.

Stef x

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Pico keeps on blowing up

Post by Roberthh » Mon Aug 30, 2021 12:01 pm

If you mean: electrically damaged with "blow up": code will not blow up a pico. What can damage a pico is a insufficient electrical connection. In connections with electromagnetic components like servos ans relays, if your be the flyback voltage when switching. So to understand your question, we would need teh schematics of your wiring.

stefatasium
Posts: 2
Joined: Mon Aug 30, 2021 9:09 am
Contact:

Re: Pico keeps on blowing up

Post by stefatasium » Mon Aug 30, 2021 5:45 pm

Great news that it's not possible to blow up with code. So, I will do a schematic and send over. x

cnmcdee
Posts: 12
Joined: Sat Sep 11, 2021 10:41 pm

Re: Pico keeps on blowing up

Post by cnmcdee » Sun Sep 19, 2021 11:06 pm

I would use an optical isolater. I would never do any direct current driving past a couple leds, this 3.6V device I just do not want it to be current loading, just leave it to do the thinking.

Strangely I thought I was the only one who could not find the current load per pin, and this posting confirmed it's not in the spec-sheet - 50mA per GPIO, and a maximum of 300mA into the device:

https://raspberrypi.stackexchange.com/q ... can-output

Some basics on LED loading to 20mA : https://www.electronicsclub.info/leds.htm

Basically an optocoupler completely isolates the Pico from any loads by an optical gap.

https://www.vishay.com/docs/83500/vo615c.pdf

This vo615c optocoupler is using a 100 ohm current limiting resistor on a 5V bus for it's example - and getting 3 microsecond switch-on times - and only drawing 2 mA! No load at all. Then hook the first stage output across the servo as long as it is not in excess of 60 mA. It looks rated to about 70 Volts. Just remember Picos choke on 5V! - So if we had a 100 Ohm resistor on the 3.6V we are looking at 1.6mA? Almost no load at all - it should work. But why think smal get something that can switch a LOT more power, like - an optocoupler that can handler higher loads : https://www.digikey.ca/en/products/deta ... F/10492493 can switch up to 2A, only loading 5 mA onto the Micropython, less load than a standard LED diode.

Amazon has lots of 'lego' type optocouplers if you want something easy and quick on a pre-built board but looking at about $10.

Use these and you should have a very safe isolation. IMHO you know they are going to keep it safe versus the older MOSFET / TRIAC stuff.

ex_piro
Posts: 5
Joined: Thu Sep 09, 2021 11:46 pm

Re: Pico keeps on blowing up

Post by ex_piro » Mon Sep 20, 2021 1:16 am

Opto isolators are most often used to isolate high voltage circuits. They're not the greatest voltage level shifter/relay driver since they usually have a current transfer ratio of less than 1, meaning that it needs more drive current than it outputs. LED's as used in opto isolators also degrade with use, although that takes a long time. To drive a typical low voltage relay (<=24VDC) from a MCU simply requires a cheap transistor. Even if the relay contacts are switching 120 volt AC, the relay usually provides at least 1K volt isolation between the coil and contacts, provided you keep the contact and coil PCB traces as far from each other as possible. This circuit should drive most power relays with a coil current less than 150ma with a cheap transistor, and draws about 5ma from the pico output.

https://www.raspberrypi.org/forums/view ... 7#p1909794

All you need to change is the resistor in series with the optional indicator LED. The resistor value should be sized to provide about 15ma to the LED since standard LED's usually require a nominal 20ma current for peak brightness.

So with a 12 volt supply and relay, LED voltage about 2.2 volts and the transistor 'on' voltage about .3 volts .
resistance = volts/amps (ohm's law) = (12-2.5)/.015 = 633 ohms or a standard 5% 1/4 watt resistor value of 620 ohms, or 560 ohms (17ma), or 680 ohms (14ma).

If you're interested in high level voltage isolation for maximum safety, like an industrial type relay driver, this is one of the ways of doing it right with an opto isolator.

https://www.waveshare.com/wiki/Pico-Relay-B
https://www.waveshare.com/w/upload/c/cb ... SchDoc.pdf

The 5V and 3.3 volt supplies are isolated from each other with an expensive isolation regulator, and two transistors are used to gain drive current for the relay coil to keep the MCU output current low.
Last edited by ex_piro on Wed Sep 22, 2021 12:23 am, edited 7 times in total.

hippy
Posts: 130
Joined: Sat Feb 20, 2021 2:46 pm
Location: UK

Re: Pico keeps on blowing up

Post by hippy » Mon Sep 20, 2021 10:24 am

cnmcdee wrote:
Sun Sep 19, 2021 11:06 pm
Strangely I thought I was the only one who could not find the current load per pin, and this posting confirmed it's not in the spec-sheet - 50mA per GPIO, and a maximum of 300mA into the device:
According to the RP2040 datasheet I have; maximum drive strength per GPIO pin is 12mA (default is 4mA), IIOVDD_MAX (Sum of all current being sourced by GPIO and QSPI pins) and IIOVSS_MAX (Sum of all current being sunk into GPIO and QSPI pins) are both 50mA.
That thread appears to relate to Raspberry Pi single board computers and Broadcom BCM27xx chips, not the RP2040 chip as used on the Pico.

cnmcdee
Posts: 12
Joined: Sat Sep 11, 2021 10:41 pm

Re: Pico keeps on blowing up

Post by cnmcdee » Tue Sep 21, 2021 10:56 pm

ex_piro wrote:
Mon Sep 20, 2021 1:16 am
Opto isolators are most often used to isolate high voltage circuits. They're not the greatest voltage level shifter/relay driver since they usually have a current transfer ratio of less than 1, meaning that it needs more drive current than it outputs. LED's as used in opto isolators also degrade with use, although that takes a long time. To drive a typical low voltage relay (<=24VDC) from a MCU simply requires a cheap transistor. Even if the relay contacts are switching 120 volt AC, the relay usually provides at least 1K volt isolation between the coil and contacts, provided you keep the contact and coil PCB traces as far from each other as possible. This circuit should drive most power relays with a coil current less than 200ma with a cheap transistor, and draws about 5ma from the pico output.

You are completely correct and my correction when I dug into them farther. {IF} these can only drive 4mA if we can use 5mA there are
a few direct options without multi-staging.

https://www.ween-semi.com/sites/default ... 000c0t.pdf

This BTA408 TRIAC needs a minium of 5 mA but will get you to 8A @ 1000V. Maybe that is too much to direct jump. One would want to cycle test that for a long time to see how it would hold.

I find this device just quite sensitive, and easily knocked out.

Post Reply