Powering Photon Particle with 5V/10amp power supply

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
BrookeDot
 
Posts: 35
Joined: Sat Sep 05, 2015 12:34 pm

Powering Photon Particle with 5V/10amp power supply

Post by BrookeDot »

I am working on an LED project which will use the Particle Photon as the controller with an external 5V/10amp power supply. I've done some reading and it appears that it is safe to drive the Photon directly from the power supply but coming here for a second (or third) opinion.

Here is a Stack Exchange Electronics Post which states that it should be safe.

The Particle Datasheet says:

Power to the Photon is supplied via the on-board USB Micro B connector or directly via the VIN pin. If power is supplied directly to the VIN pin, the voltage should be regulated between 3.6VDC and 5.5VDC.

... To avoid voltage spikes, keep input wiring as short as possible. If long wires are unavoidable, it is advisable to add a 5.1V zener diode or similar transient suppression device from VIN to GND. Another technique is adding more capacitance to the input using an electrolytic capacitor. Please refer to AN-88 by Linear for a good discussion on this topic.
My question is do I need (or would it be safer) to use a voltage regulator, diode, etc of some sort to prevent possible spikes or over amprage from damaing the board? If so, what?

User avatar
bidrohini
 
Posts: 202
Joined: Thu Oct 20, 2022 10:03 am

Re: Powering Photon Particle with 5V/10amp power supply

Post by bidrohini »

The LM7805 voltage regulator will be fine, I believe.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering Photon Particle with 5V/10amp power supply

Post by adafruit_support_mike »

BrookeDot wrote: Fri Jan 20, 2023 2:07 am My question is do I need (or would it be safer) to use a voltage regulator, diode, etc of some sort to prevent possible spikes or over amprage from damaing the board? If so, what?
The power supply should have its own voltage regulator. That's basically what a power supply is: a voltage regulator that maintains a stable output voltage across a wide range of load currents.

The Photon also has a built-in 3.3V regulator, so the only concern is to avoid spikes which exceed that regulator's maximum input voltage. A good power supply should do that, but voltage spikes are possible when you also have high-current loads switching on and off (which is common for LED projects).
bidrohini wrote: Fri Jan 20, 2023 2:43 am The LM7805 voltage regulator will be fine, I believe.
The 7805 requires about 1.5V of headroom to work properly. It doesn't regulate well until its supply voltage is around 6.5V.


There are thousands of projects using 3.3V microcontrollers that run from a 5V supply, so thinking stastically, the chance of it being safe is high.

If you want to be extra certain, the first step is to add debounce capacitors.

The voltage between a capacitor's plates is directly proportional to the number of electrons on the plates. The Farad -- the unit of capacitance -- can be broken down to Coulombs of charge per Volt between the plates. To change the voltage across a 1 microfarad capacitor by 1V, you have to add or remove 1 microcoulomb of charge.

Electrons can't move instantly, so it's physically impossible for a capacitor's voltage to change instantly. That means capacitors limit voltage spikes. Real spikes aren't instantaneous (infinitely narrow), but they do contain a finite amount of charge arriving in a short time. That charge can only change a capacitor's voltage by a finite amount, proportional to the amount of charge in the spike. The larger the capacitor is, the smaller the voltage change will be.

When choosing the size of a debounce capacitor, more is always better, but there's a point of diminishing returns. You have to make the capacitor 10x larger to reduce spikes to 1/10th of their initial voltage, and high-value capacitors get expensive. As a rule of thumb, 1uF of capacitance per 1mA of load current is a good starting point.

For extra protection beyond that, the next step is what's known as a 'shunt regulator': a device that only conducts current when the voltage rises above a given level. Routing current away from the load is a way to prevent spikes.

The preferred devices for spike protection are Metal Oxide Varistors (MOVs) and Transient Voltage Suppression (TVS) diodes.

MOVs have high resistance until they start to conduct, then their resistance drops dramatically. The voltage where they do start to conduct is controllable, so manufacturers can design them for specific breakdown voltages. MOVs get hot if they conduct current for too long, so their typical use is for suppression of lightning strikes.

TVS diodes are made from semiconductor powder where the junctions between grains act as diodes. When the voltage rises above a given level, they start to conduct. TVS diodes are better than MOVs for moderate periods when the voltage is a bit too high.

Devices that will be exposed to a wide range of voltages, like multimeters, have both MOVs and TVS diodes connected to the probes.

For your application, a 5V TVS diode would protect against spikes high enough to cause problems for the Photon's internal regulator.

User avatar
bidrohini
 
Posts: 202
Joined: Thu Oct 20, 2022 10:03 am

Re: Powering Photon Particle with 5V/10amp power supply

Post by bidrohini »

Thanks to Adafruit for the detailed answer. Much appreciated.

User avatar
BrookeDot
 
Posts: 35
Joined: Sat Sep 05, 2015 12:34 pm

Re: Powering Photon Particle with 5V/10amp power supply

Post by BrookeDot »

Wow @adafruit_support_mike that's an amazing answer. I also asked in the Particle Forms and got a very similar (granted less detailed) answer.

I actually designed a custom PCB for LED control. I added a 1000µF 16V capacitor between the power supply and Particle's VIN. Things appeared to be working great until I attached a longer LED strip and ran into trouble due to trying to control 120 NeoPixels over a 3.3v pin and 5V power. This was more noticeable when I had a 470Ω resistor between the pin and the LEDs taking that out mostly fixed the problem.

What was interesting is it was only noticeable when the voltage went above about 3.5 volts. So I made a second version of the board which uses a level shifter, it'll arrive in a few weeks. Adding a diode also worked but did of course drop the voltage to the neopixels making the more dim.

If I do end up doing a V3 (2.5?) I'll add a diode as you suggest. What's nice is the power supply has a pot on it that lets me set the max voltage between about 4.5 and 5.5 so I have it set around 5.1 now which should account for any voltage spikes but seems to be doing a pretty good job of regulating things at the moment.

This has been a fun project combining custom PCB, 3D Printing, and Laser cutting, I'll make sure to share when it's all done.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering Photon Particle with 5V/10amp power supply

Post by adafruit_support_mike »

BrookeDot wrote: Thu Feb 09, 2023 3:55 am I added a 1000µF 16V capacitor between the power supply and Particle's VIN.
Can you post a schematic? That specific way of describing the connection could mean the capacitor is doing more harm than good.

Debounce capacitors go between the line you want to keep smooth and GND. In this case, it would be good to have a 1000uF capacitor between the board's 5V and GND pins. Then you could put another, smaller cap (maybe 47uF) between the Particle's 3.3V pin and GND.

Connecting a 1000uF capacitor between the 5V and 3.3V lines would do the opposite of what you want.. it would carry spikes on the 5V line directly to the 3.3V line.

User avatar
BrookeDot
 
Posts: 35
Joined: Sat Sep 05, 2015 12:34 pm

Re: Powering Photon Particle with 5V/10amp power supply

Post by BrookeDot »

Can you post a schematic? That specific way of describing the connection could mean the capacitor is doing more harm than good.
Sure, I'm including both the full schematic and then a closeup of the screw terminals for the board power. Let me know if you need something else (as I appreciate the feedback ;)
Debounce capacitors go between the line you want to keep smooth and GND. In this case, it would be good to have a 1000uF capacitor between the board's 5V and GND pins. Then you could put another, smaller cap (maybe 47uF) between the Particle's 3.3V pin and GND.
It looks like that is what I have, so all good there. In this case 5v in is actually VIN. I didn't think to add another 47µF between the 3.3v and ground, but if I do another revision that makes sense to me (along with the diode you mentioned earlier)
Connecting a 1000uF capacitor between the 5V and 3.3V lines would do the opposite of what you want.. it would carry spikes on the 5V line directly to the 3.3V line.
You had me worried there for a second, but glad I didn't do that at least :). Must have just explained it poorly.

Thanks again!
led_board_v2.png
led_board_v2.png (14.65 KiB) Viewed 162 times
led_board_v2_board_power.png
led_board_v2_board_power.png (9.59 KiB) Viewed 162 times
[/img]

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering Photon Particle with 5V/10amp power supply

Post by adafruit_support_mike »

BrookeDot wrote: Sat Feb 11, 2023 4:10 am You had me worried there for a second,
Likewise. ;-)

Connecting a capacitor in series between two signals is generally called 'AC coupling' because high-speed signals pass through unchanged while DC signals are blocked.

It's not unusual for people first learning about debouncing to AC-couple the supply lines. Clearly you didn't, but it was definitely worth verifying.

User avatar
BrookeDot
 
Posts: 35
Joined: Sat Sep 05, 2015 12:34 pm

Re: Powering Photon Particle with 5V/10amp power supply

Post by BrookeDot »

It's not unusual for people first learning about debouncing to AC-couple the supply lines. Clearly you didn't, but it was definitely worth verifying.

Yeah, the only real "problem" was that Eagle wanted to connect the 3.3v out to the VCC on the level shifter since they were both named "VCC" in the schematic. I guess I could have maybe tricked it by choosing a different name like 3.3v (maybe revision 3 haha). I had to do some fancy things in the board layout to connect the VCC of the level shifter to the 5v line.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering Photon Particle with 5V/10amp power supply

Post by adafruit_support_mike »

Yeah, if you have more than one supply voltage, it's best to call out their values.. VCC_5V, VCC_3V3, etc.

If you're stuck with a schematic from someone else who used plain VCC, and you don't have the option of renaming the signal, a quick workaround is to add a dummy resistor between VCC and a properly named signal.

At worst, that will force you to add a wire jumper or a 0-Ohm resistor on the physical board. But you can usually find a way to draw a trace that connects the pads without making the rules checker freak out too badly.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”