Power Switch Question - Netduino 2 (and Netduino 1) - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Power Switch Question


Best Answer hanzibal, 20 July 2013 - 11:28 PM

It might be possible to modify the board bypassing the two power lines to a dpst switch. The 2.1mm should be fairly easy to hi-jack but USB 5V is probably a lot trickier since you'd have to cut the trace and solder wires before and after the breakage. Could be there a testpoints you could use but I doubt it. A non-intrusive way could be to create kind a "docking station" with its own 2.1mm and USB that connects to those of the board after going through a dpst switch. If you're planning to use an enclosure, this is likely the best way to go. Brw, Is it for an N or NP? Go to the full post


  • Please log in to reply
11 replies to this topic

#1 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 17 July 2013 - 08:13 PM

Hello,

 

I'm wondering if it would be possible to wire up a power switch to a Netduino board directly. That is, I don't want the switch to be wired to a power cord or USB cord, as I'd like to let someone power it up with their own USB cord or their own power adapter. I could mount a barrel jack that runs to the Netduino's plug and wire the switch in there, or create a whole external power circuit, but that wouldn't solve the problem for the USB cord, and I still want USB debugging and programing to work (plus, I'd rather not create an external power circuit).

 

I was thinking I might be able to attach the switch to the Netduino's reset pin, so when the switch was "off" the Netduino would be held in a reset state until the swtich was flipped to "on", but that seems like it might have problems of its own, not least of which is the fact that the Netduinio might still be drawing power while in the reset sate (I honestly don't know if that's the case).

 

So bascially, is there a way to wire something to the Netduino directly (ideally without soldering) that will act like a power switch regardless of where the power comes from (USB or barrel jack)?

 

Any suggestions or thoughts are more than welcome, thanks!



#2 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 19 July 2013 - 10:30 PM

Alright, so after looking over the schematics, it's clear that there's no easy way to control the power on the board itself, and holding it in a reset state is not an option. So I guess my question now is: Is there a simple circuit I can construct that will allow be to control the power from a USB or wall adapter? I'd be fine splitting the cords open in wiring them together if necessary.



#3 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 20 July 2013 - 10:39 PM

So you want to be able to use a mechanical switch to cut power to the board regardless of whether it is currently being powered by the 2.1mm barrel or USB. Correct?

#4 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 20 July 2013 - 10:59 PM

Yes, exactly, if that's feasible. Otherwise, I'll have to wire the switch into the power cord, which is not as ideal.



#5 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 20 July 2013 - 11:28 PM   Best Answer

It might be possible to modify the board bypassing the two power lines to a dpst switch. The 2.1mm should be fairly easy to hi-jack but USB 5V is probably a lot trickier since you'd have to cut the trace and solder wires before and after the breakage. Could be there a testpoints you could use but I doubt it. A non-intrusive way could be to create kind a "docking station" with its own 2.1mm and USB that connects to those of the board after going through a dpst switch. If you're planning to use an enclosure, this is likely the best way to go. Brw, Is it for an N or NP?

#6 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 21 July 2013 - 03:52 AM

Thanks for the suggestions! I understand what you're saying, and a docking station would probably be best, as I don't want to start cutting traces on my Netduino (not yet, at least). As a quick solution, I was thinking of just taking apart a power cable and a USB cable and wiring their ground wires through the switch. It wouldn't allow for the use of other cables, but it should work until I can get a proper docking station going.

 

The switch I was wanting to use was a SPST switch, as I'm assuming it won't cause problems for the 2.1mm and the USB to have their grounds connected together through the switch, though I could be wrong.

 

It's for a Netduino 2, by the way.



#7 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 21 July 2013 - 07:34 PM

Yes, cutting ground only should work so an spst would do, I didn't think of that.

#8 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 21 July 2013 - 08:03 PM

Excellent, thank you!



#9 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 22 July 2013 - 08:23 AM

Out of curiosity why do you want the usb power to be switchable?

I can understand the use for the barrel socket in case you are running on batteries, but usb would be powered from PC so would have a ready supply of power?

 

Nak.



#10 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 22 July 2013 - 05:57 PM

Good question! Firstly, it’s a matter of convenience. The Netduino will be in an enclosure, so I need a way to powercycle the device. I could just unplug/replug the USB cable from the PC, but I thought that since I'm using a power switch for the barrel socket anyway, why not just have it control the USB too. It also seems more elegant to have a single power switch control all power to the board regardless of the source rather than having the switch control the barrel jack, and then have no effect on the USB power at all.

 

Secondly, and more importantly, this project will need to survive as long as possible on batteries. While your average 9V battery isn't too bad, it will be driving the Netduino, one or two LCD screens, an RFID reader, and a few other small things. The best batteries to use, then, would be lithium ones, but I didn't want to deal with charging circuits, and then getting the lithium battery voltage up to 7.5V for the barrel jack (I know I could run 5V into the Netduino’s 5V pin using a prebuilt charging board from Sparkfun or the like, but that’s a non-ideal solution, as I need to use the 5V pin, and the pin isn't really not designed for powering the board from what I’ve read).

 

So I hit on the idea of using one of those USB battery backups for cell phones (example), as they’re fairly cheap, have a good amount of power, and already come with all the charging circuitry and voltage conversions from 3.7V to 5V. So with a switch on the USB and barrel jack, I could either plug in the Netduino as normal, plug it into my PC, or plug it into one of the USB battery backups, all with the power controlled through a single switch.



#11 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 23 July 2013 - 10:06 AM

Ahh cool, i actually designed a board which was integrated into vending machines where i powered the ND via the 5V pin (as long as your regulator is solid it shouldn't be a problem) i ended up using a LM2596T as a simple switchmode PSU integrated into the shield as the only voltage i could rely on was 24V AC!



#12 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 23 July 2013 - 03:07 PM

That's a good solution, though I'm pretty lazy, so using the USB batteries just seemed easier, :D






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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