Netduino home hardware projects downloads community

Jump to content


Photo

Can the Netduino Plus be powered by a 5V 2A input that is also powering some LEDs?


  • Please log in to reply
21 replies to this topic

#1 Kenny Spade

Kenny Spade

    New Member

  • Members
  • Pip
  • 8 posts

Posted 27 August 2011 - 11:59 AM

I'm finishing up a project that uses a Netduino Plus to drive 50 LED pixels along with an RFID reader, and am hoping to clean it up a bit by possibly reducing the number of cables I've got going into it. I currently have three connections coming into my project enclosure: A micro USB cable powering the Netduino Plus, an ethernet cable providing connectivity, and a 5V 2A power supply for the LEDs. A buddy of mine suggested that I look into a Passive Power over Ethernet Injector, and I'm wondering if I could somehow use it to drive the entire project. Ideally, the solution would be to power the LEDs and Netduino Plus from the same input, and drive the RFID reader from the Netduino Plus, all while giving me the ability to plug in via USB for updates to the system.

From what I've read so far, I'm a little unsure of what I am able to get away with and still have this thing be reliable. It looks like if I wire the 5V input directly to the +5V pin, it should work? The project I'm working on will be set out somewhere and potentially be unattended for a while, so I would hate it if it died somehow while I was away from it.

If this was software, I'd just try it out and let it crash, but I don't want to fry anything here.

Thanks in advance,

Kenny Spade

#2 Dixon

Dixon

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 27 August 2011 - 03:30 PM

Hi Kenny, You always can use an USB cable and power the board at 5v by it. Carlos

#3 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1716 posts
  • LocationVenezia, Italia

Posted 27 August 2011 - 04:34 PM

The Carlos' suggestion is right, but I would not consider to plug the USB cable just to power the Netduino. You may avoid the USB cable, and connect your 5V supply to the +5V pin of the Netduino. By the way, if you mean to use the USB sometime, I would avoid to feed the supply twice: either you provide it by your PSU, or you provide by the USB. Making both the source co-existent, you should moke some hardware trick. Cheers
Biggest fault of Netduino? It runs by electricity.

#4 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 914 posts
  • LocationNorth Yorkshire, UK

Posted 27 August 2011 - 05:22 PM

From what I've read so far, I'm a little unsure of what I am able to get away with and still have this thing be reliable. It looks like if I wire the 5V input directly to the +5V pin, it should work?

If you are connecting devices with the same voltage requirements then you can connect them to the same supply. You need to make sure that the total current requirements are met by the power supply. The only time I would not use the same supply is if I was workig with noisy components such as a motor. In this case I would isolate the two systems or work out a way of making sure the noise from the motors did not get through to the Netduino.

I have recently built a circuit which had 512 LEDs (only 64 powered at once) with a controller board with a Mini and some other electronics all using the same 5V supply.

Hope this helps,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life


#5 Kenny Spade

Kenny Spade

    New Member

  • Members
  • Pip
  • 8 posts

Posted 29 August 2011 - 03:47 PM

Hey everyone, thanks for the great information. Based on what I read, I went ahead and wired everything up with a single power source, running from the 2A source. I tried it in a few configurations, and sure enough I was able to power everything without a problem. The one concern I ran into is that if I plug in the USB, but not the primary power source going into the 5V pin, it will power the LEDs off of the USB power. Since the LEDs have a much higher draw than should be provided through the USB input, I can't imagine this would be good for the N+. Should I worry about this? I would like to be able to program the N+ without worrying about plugging in the lights, so if I could restrict the power to the LEDs when it is only powered by USB. From what I remember in my Physics class back in college, that's the purpose of diodes. If I insert a diode between the power supply and the LEDs, could that cause a problem? I know that diodes have a bit of leakage, so it wouldn't be a perfect isolation, which is fine. I just don't want the LEDs putting too much strain on the N+.

#6 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1716 posts
  • LocationVenezia, Italia

Posted 29 August 2011 - 05:17 PM

Hello Kenny.
You are correct: the diodes can be the solution.
However, the problem could arise if you connect both the 2A supply and the USB, since you can't insert a diode for the USB source.
That's not trivial, without hacking the board (which I don't suggest though).

I may suggest the following:
  • consider having a "component", powered by the 5V/2A source, that doubles the voltage (so 10V), having max 100mA current capability;
  • use this 10V to power the Netduino to the Vin (NOT on the +5V anymore);
  • use the 5V/2A only for the led circuit.
However, the Netduino board and the led circuit MUST connected in open-drain pattern. Otherwise could flow a current when the board is USB powered.
The mysterious component could be this one.

Anyway, I would consider to use an higher supply voltage. For instance, a common 12V. In this way the things are getting dramatically simpler.
Cheers
Biggest fault of Netduino? It runs by electricity.

#7 Stefan W.

Stefan W.

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts

Posted 29 August 2011 - 05:20 PM

Hey everyone, thanks for the great information. Based on what I read, I went ahead and wired everything up with a single power source, running from the 2A source. I tried it in a few configurations, and sure enough I was able to power everything without a problem. The one concern I ran into is that if I plug in the USB, but not the primary power source going into the 5V pin, it will power the LEDs off of the USB power. Since the LEDs have a much higher draw than should be provided through the USB input, I can't imagine this would be good for the N+. Should I worry about this? I would like to be able to program the N+ without worrying about plugging in the lights, so if I could restrict the power to the LEDs when it is only powered by USB. From what I remember in my Physics class back in college, that's the purpose of diodes. If I insert a diode between the power supply and the LEDs, could that cause a problem? I know that diodes have a bit of leakage, so it wouldn't be a perfect isolation, which is fine. I just don't want the LEDs putting too much strain on the N+.


The problem with a diode is that they have a forward voltage drop, the netduino won't get 5V if you simply add one before the netduino +5V pin. How much current do the LEDs draw?
I believe that no discovery of fact, however trivial, can be wholly useless to the race, and that no trumpeting of falsehood, however virtuous in intent, can be anything but vicious.
-- H.L. Mencken, "What I Believe"

#8 Kenny Spade

Kenny Spade

    New Member

  • Members
  • Pip
  • 8 posts

Posted 30 August 2011 - 12:50 AM

The problem with a diode is that they have a forward voltage drop, the netduino won't get 5V if you simply add one before the netduino +5V pin. How much current do the LEDs draw?


At peak, full white, the LED strand could draw 3 amps. In my application, I never have a call for displaying full white, and in fact there are often a percentage of the pixels that will be dark. My current thought is to wire everything together such that the 5V 2A source splits to two lines, one going into the netduino +5 pin, and the other going through a diode into the LED, both sharing a common ground. The LEDs should work fine even with a forward voltage drop

I actually misread a post by Chris saying that it was possible to power the N+ through the +5V pin that mentioned the circuit that cuts off power when the VIN or power barrel were used, and was thinking it wouldn't power via USB when it was receiving power from +5V, rather than one of those sources. From what I think I understand of this stuff so far, that really shouldn't be too much of a problem, as it shouldn't be too much of a difference as long as it is isolated from the LEDs. If I only have the USB plugged in, I don't care whether the lights are on or off, as long as it isn't hurting any of the components.

#9 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1716 posts
  • LocationVenezia, Italia

Posted 30 August 2011 - 06:21 AM

I actually misread a post by Chris saying that it was possible to power the N+ through the +5V pin that mentioned the circuit that cuts off power when the VIN or power barrel were used, and was thinking it wouldn't power via USB when it was receiving power from +5V, rather than one of those sources.

The USB power is cut off only when the Vin is applied. Also, Chris designed that switch when Vin is >= 7.5V. Unfortunately it won't work if you apply the +5V as Vin.

When you power your Netduino using the +5V pin, and using the external supply, there's no way to cut off the +5V exposed by the USB cable. I would not like to connect two power sources together, unless they are perfectly paired.
You may consider this solution as well: supply the Netduino via +5V pin, using the external supply, *BUT* adding a Schottky diode. This kind of diode acts exactly as a normal diode, but offers a very low drop. Thus, the actual voltage used to power the board would be around 4.8V, instead of 5V.
When the USB cable will be inserted, the diode is reverse-polarized, and there's no "collision".
Cheers
Biggest fault of Netduino? It runs by electricity.

#10 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 914 posts
  • LocationNorth Yorkshire, UK

Posted 30 August 2011 - 07:15 AM

The USB power is cut off only when the Vin is applied. Also, Chris designed that switch when Vin is >= 7.5V. Unfortunately it won't work if you apply the +5V as Vin.


Chris's post:
BTW, the Netduino and Netduino Plus also have circuitry which cuts off power from USB when the VIN header or power barrel are used. This allows you to use higher-amperage sources while debugging.

The way I read Chris's post there are two power scenarios here:

- Using the power barrel (7.5V <= Vin <= 12V)
- Using the Vin header (Vin = 5V)

Both of which will cut the USB power and both have different thresholds.

If I have ready Kenny and Chris's posts correctly then the header on the board is being used (not the power barrel) so 5V should cut off the USB power supply. Kenny - you think you have misunderstood Chris's post but I read it the same way that you orginally did.

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life


#11 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1716 posts
  • LocationVenezia, Italia

Posted 30 August 2011 - 07:29 AM

- Using the power barrel (7.5V <= Vin <= 12V)
- Using the Vin header (Vin = 5V)

Both of which will cut the USB power and both have different thresholds.

Nope!
As long the schematic of the Netduino (std and Plus) is correct, the USB power is controlled by a MOSFET, which is controlled by an OPAMP. If you check its inputs, the OPAMP's output will switch when the voltage is above +3.3V. Since the voltage divider is actually a halver, and there is a protection diode, the overall voltage should be (approx) above +7V. +7.5V is a good choice, for a decent margin.
Cheers
Biggest fault of Netduino? It runs by electricity.

#12 Kenny Spade

Kenny Spade

    New Member

  • Members
  • Pip
  • 8 posts

Posted 30 August 2011 - 10:13 PM

Nope!
As long the schematic of the Netduino (std and Plus) is correct, the USB power is controlled by a MOSFET, which is controlled by an OPAMP. If you check its inputs, the OPAMP's output will switch when the voltage is above +3.3V. Since the voltage divider is actually a halver, and there is a protection diode, the overall voltage should be (approx) above +7V. +7.5V is a good choice, for a decent margin.
Cheers


This looks correct to me. The schematic shows that the +VIN header is essentially equivilant to the barrel jack, so it would require 7.5 to 12 volts before it kicks off the USB power.

I dropped in a diode between the power supply and measured the voltages. The power supply itself measures at 4.97 volts. After the diode, it falls to 4.20 volts. My USB port is measuring at 5.13 volts. If I plug in the USB port to the N+, the power supply jumps slightly to 5.01 volts. If I measure the +5v on the N+ with both the power supply and USB, it reads 4.76 volts. When I unplug the power supply, leaving only the USB plugged in, it still reads at 4.76 volts and the power supply shows no voltage. I read up on diodes, and I'm going to pick one with less of a voltage forward drop. This one works, but I might as well get as close to ideal as I can. I'll let you know if that works.

#13 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1716 posts
  • LocationVenezia, Italia

Posted 31 August 2011 - 07:22 AM

I am sorry, but how is that you read 4.76V instead of +5V? I tried right now, and the voltage on the +5V pin is exactly +5V, when USB only powered. NOTE: I also own a N+. Are you measuring the power with all the leds connected? If so, try to detach them, and make the readings again. Cheers
Biggest fault of Netduino? It runs by electricity.

#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7092 posts
  • LocationNew York, NY

Posted 31 August 2011 - 08:00 AM

A few notes: USB voltage is 4.5V-5.5V. In theory, it's 5.0V, but USB voltage varies from computer to computer. The VIN header, like the power barrel, needs 7.5V or more. The Netduino runs off of 3.3V power. The 5V header and 5V regulator are only there for Arduino shield compatibility, to give extra brightness to the LEDs, and to provide a 5V power source for components. So as long as USB power is 4.5V or more, the 5V LDO power regulator will step that voltage down to the 3.3V needed by the microcontroller. Chris

#15 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1716 posts
  • LocationVenezia, Italia

Posted 31 August 2011 - 09:10 AM

@Chris: my question was not about the min req, but about the fact that he reads +5V on the USB plug, then 4.76 without extra supply. That sounds as an excessive load, such as the whole leds network connected by the USB. When the extra supply is off, the leds should be unpowered as well, and the USB will power the N only. Cheers
Biggest fault of Netduino? It runs by electricity.

#16 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7092 posts
  • LocationNew York, NY

Posted 31 August 2011 - 09:19 AM

Hi Mario, Thank you for sharing all your electrical wisdom with the community! The built-in LEDS are 5V LEDs and only draw a few mA of power. If one has a bunch of external LEDs (several 100s of mA) connected to the Netduino then, yes, external power should be supplied. USB is rated to supply 500mA, and there is a resettable fuse on the Netduino to help protect against overcurrent draws. Chris

#17 Kenny Spade

Kenny Spade

    New Member

  • Members
  • Pip
  • 8 posts

Posted 31 August 2011 - 03:35 PM

I am sorry, but how is that you read 4.76V instead of +5V?
I tried right now, and the voltage on the +5V pin is exactly +5V, when USB only powered.
NOTE: I also own a N+.
Are you measuring the power with all the leds connected? If so, try to detach them, and make the readings again.
Cheers


The LEDs are connected, but should be mostly isolated because of the diode. There may be a difference in voltage caused by where I read the USB versus the output past the N+. The voltage I was reading on the USB was taken with nothing plugged in but a USB to barrel jack adapter, whereas I read the N+ by plugging it in with a different cable from the same USB jack and then measuring from the +5V pin to the GND pin, which was routed through a breadboard. There is probably some resistance in there that accounts for the voltage drop. I'll measure it again with nothing connected going straight pin to pin and let you know what I get. I also picked up a new Schottky diode last night that is rated for a much lower voltage forward drop. I'll see how that affects things.

When I was looking for diodes, I found a few places that had them, but most required a fairly large order or had a large S&H cost. Any suggestions on where to pick these up? I ended up killing a couple hours in Fry's and picked up a few components, but they didn't have exactly what I wanted, just closer than what I had.

Hi Mario,

Thank you for sharing all your electrical wisdom with the community!

The built-in LEDS are 5V LEDs and only draw a few mA of power. If one has a bunch of external LEDs (several 100s of mA) connected to the Netduino then, yes, external power should be supplied.

USB is rated to supply 500mA, and there is a resettable fuse on the Netduino to help protect against overcurrent draws.

Chris


Thanks for the response, Chris. I am pretty sure I read somewhere that the N+ can provide up to 800mA output. If I am powering the N+ through USB with a port that gives more than 500mA, could that damage the N+? I have powered it through a 1A wall jack and a 2.1A car adapter and it seemed like it ran great.

#18 Kenny Spade

Kenny Spade

    New Member

  • Members
  • Pip
  • 8 posts

Posted 31 August 2011 - 08:07 PM

Did some more measuring. With nothing plugged into the N+, just USB power, I'm getting 4.97 volts. I add in the RFID reader, and it drops down slightly to 4.77 volts. With the lights plugged in to the Netduino but isolated from the +5V line with a schottky diode, the measurement is still 4.77 volts. With just the power supply, no USB, I'm seeing 4.95 volts at the source, with 4.65 volts after the diode. Measuring through the N+, I'm seeing 4.63 volts. With both the power supply and the USB, I'm getting 4.80 volts. I think that based on the requirements of my project, these should all be well within tolerance. I would probably look at getting a separate power source if I needed a clean 5V signal for something, but with the components that I have it seems to be doing fine. One interesting thing, I tried upping the draw from the lights by turning them all white with just the power supply connected, no USB, and I ended up reading 4.55 volts through the N+. Still within the tolerance for my project, and I don't plan to do that in any of the scenarios I have in mind, but interesting nonetheless. Pretty sure it's caused by the forward voltage drop of the LEDs as the current going through them rises. Thanks for the help figuring this out. Once a few more components come in I'll finish it all up and write up the project. Should be neat. :)

#19 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7092 posts
  • LocationNew York, NY

Posted 31 August 2011 - 09:39 PM

Hi Kenny,

If I am powering the N+ through USB with a port that gives more than 500mA, could that damage the N+? I have powered it through a 1A wall jack and a 2.1A car adapter and it seemed like it ran great.

There is a resettable fuse on the Netduino which is designed to keep more than 500mA being drawn from the USB port. You should stay under this limit. [The Netduino enumerates as a USB 1.1/2.0 device--so the port isn't required to give any more than this.]

You could in theory capture the VBUS from a USB cable and route it to the 5V header manually if it's safe to draw more power than that...

Chris

#20 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 914 posts
  • LocationNorth Yorkshire, UK

Posted 01 September 2011 - 08:00 AM

You could in theory capture the VBUS from a USB cable and route it to the 5V header manually if it's safe to draw more power than that...

Can you supply the N+ with 5V through the header at the same time as having the USB connected?

If yes, then will the USB power be disconnected and still allow debugging?

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2010-2014 Secret Labs LLC  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.