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

Turning off power to a socket...


  • Please log in to reply
14 replies to this topic

#1 NXTwoThou

NXTwoThou

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationTulsa, OK

Posted 18 January 2013 - 08:07 PM

How do you accomplish this?  It has been suggested that the reason why a module I'm trying to use is unstable because of a power issue.  One of the things I noticed is that even though the blue light for a socket on the Go isn't on, the lights on the modules are, indicating they get power.  When looking through the driver code, I see

SetSocketPowerState is being set to false to turn off the power to the socket, wait two seconds,

SetSocketPowerState back to true, then wait a tiny bit, then start doing init. But when I put a breakpoint in after the turning off, the light on the module stays on.

 

Does SetSocketPowerState do nothing at all?  How do I not apply power to non-inited sockets so that I can stage up my power usage so there's no drops?  If I can't shut off power to a socket, how do I truly reinit a module that may be in a bad state?



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 January 2013 - 09:02 PM

Hi NXTwoThou, The GoBus protocol has a "reset" feature which will bring your module back into a known-good state. The power switches on the GoPorts are there for reflashing scenarios (i.e. turning modules off and on to force them into programming state). Essentially the modules should run in a standby power state until you connect to them. We didn't mandate that in GoBus 1.0, but it'll be part of the GoBus 2.0 spec. If you want to play with the power state of each socket, you might be able to do that via reflection. Again, it's not really there as a user-facing feature...but we do encourage hacking :) Chris

#3 NXTwoThou

NXTwoThou

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationTulsa, OK

Posted 18 January 2013 - 09:47 PM

So in standby power state, a module should be lit up?



#4 NXTwoThou

NXTwoThou

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationTulsa, OK

Posted 18 January 2013 - 11:07 PM

After looking through the forums, I found PowerState.RebootDevice.  Since this is a failure on init and doesn't seem to have any issues later on once it starts correctly, I'm experimenting with rebooting everything until it inits correctly.  Sometimes it takes 3 or 4 tries to boot correctly, but it does.  I'd much rather just turn off the power to all the other sockets before I try and init this one, and then just power off/on this one socket to get the module to start correctly.



#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 January 2013 - 11:28 PM

So in standby power state, a module should be lit up?
With GoBus 2.0, when a module is connected to it'll go into an active state. The deep sleep (standby) would be for when the module is "off" and the LED is turned off. Deep sleep mode would enable the module to be enumerated and connected to. Chris

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 January 2013 - 11:28 PM

Hi NXTwoThou,
After looking through the forums, I found PowerState.RebootDevice.  Since this is a failure on init and doesn't seem to have any issues later on once it starts correctly, I'm experimenting with rebooting everything until it inits correctly.  Sometimes it takes 3 or 4 tries to boot correctly, but it does.  I'd much rather just turn off the power to all the other sockets before I try and init this one, and then just power off/on this one socket to get the module to start correctly.
Which GoBus module are you experiences troubles with? Is this a custom module or an off-the-shelf one? Chris

#7 NXTwoThou

NXTwoThou

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationTulsa, OK

Posted 18 January 2013 - 11:35 PM

Nwazet DAQ module.  My Netduino Go has a Nwazet display, DAQ, and then 6 relay modules attached to it.  After doing extensive diagnostic testing(the daq has an awesome debug mode) he believes its a power drop from all the other modules. 

 

Am I able to set DeepSleep with the current firmware?



#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 January 2013 - 03:47 PM

Nwazet DAQ module.  My Netduino Go has a Nwazet display, DAQ, and then 6 relay modules attached to it.  After doing extensive diagnostic testing(the daq has an awesome debug mode) he believes its a power drop from all the other modules.    Am I able to set DeepSleep with the current firmware?
You're probably drawing quite a bit of current, true. If you unplug some of the other modules, does that give you enough power for the components you have connected to your DAQ? With GoBus 2.0, your mainboard will be able to put GoBus 1.5+ compliant modules into deep sleep mode automatically. That's a new feature we're working on for GoBus 2.0 (due out later this year) Chris

#9 NXTwoThou

NXTwoThou

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationTulsa, OK

Posted 20 January 2013 - 04:51 PM

I currently have nothing plugged into the daq.  Eventually it'll be hooked up to some sensors. 

 

If I unplug 3 of the relays, I can consistently start up the daq.  What's the fix for this?



#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 January 2013 - 06:14 PM

Hi NXTwoThou,

If I unplug 3 of the relays, I can consistently start up the daq.  What's the fix for this?

Netduino Go can provide a lot of 3.3V power (~500mA) to modules, but there is always a limit. Effectively you need to add more power to your system. We're adding power extender and powered hub support to GoBus 2.0. You could also feed the power-hungry modules using external power now, but that would probably require a bit of hardware hacking. Chris

#11 NXTwoThou

NXTwoThou

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationTulsa, OK

Posted 21 January 2013 - 12:44 PM

Not very good at hardware hacking, that's why I picked Go over other solutions.  So what we're saying is that I can't run 8 modules?  All because every module gets power at startup? 

 

Is there really a reason why you supply power to a socket when a socket hasn't been inited yet?

 

SetSocketPowerState does nothing?  While looking through the code for this particular driver, its set false for 2 seconds, then back true for 250ms.  I'm assuming this developer thought it would be the way to reset a module by removing power to it.  Do other module developers believe the same thing?

 

If you are fishing for new features.  SetSocketPowerState(GoSocket socket,bool state) would be a good feature.  Would allow me in my Main() to shut power off to all the sockets, pause for a bit to let things settle, then turn them on in sequence of heaviest requirement.

 

Again, once I can get things properly started, everything works fine.



#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 21 January 2013 - 12:55 PM

Hi NXTwoThou, The SetSocketPowerState function is an internal GoBus function which is used for diagnostics and for re-flashing of modules. By design it's not possible to completely turn off individual modules. All of the modules need to be on by default--albeit in a deep-sleep state--so that they can be discovered by the mainboard. This is similar to Ethernet. With Ethernet, many modules can be "off" but turned on via Ethernet. But in reality they're in a really deep sleep mode. It's not really possible to remove power to a module by turning off the GoPort. Data is sent to modules via the shared SPI pins--which could provide enough power to a module to turn it on. And a partially powered module could then send garbage data over the shared bus pins. This is another reason why we don't turn individual modules "off" except for the re-flashing scenarios. GoBus 1.5 requires that all modules start up in a sleep state. All Netduino-brand GoBus modules are designed to support this requirement via firmware upgrade. For now, I would ping the manufacturer of your module that you'd like to turn off and ask them if they are starting up their module in a low-power mode. Chris

#13 NXTwoThou

NXTwoThou

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationTulsa, OK

Posted 21 January 2013 - 03:18 PM

Just emailed Nwazet, since all the modules I'm using are from them.



#14 NXTwoThou

NXTwoThou

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • LocationTulsa, OK

Posted 23 January 2013 - 02:47 PM

When will the power extender be available?  

 

I'm starting to think all the issues I was having with the shield base was more about the lack of power to individual modules more than anything else(display module, 3 relay module, shield base).  It just got much worse when more sockets were freed up for me to plug more things in(Display module, 6 relay modules, and DAQ module). 

 

I was wrong when I said everything was okay when I could get the DAQ to start.  My software has a diagnostic mode, so when I put in the code to reboot the Go until the DAQ responded properly, I'd hit my diagnostic button and then check my sensors(watching the lights come on the display when I triggered them) and then turned on each of my relays to make sure they worked.  Yesterday I decided to make a deeper test and discovered that the DAQ would reset whenever I turned any of the relays back off(and the touch screen would go to being non-responsive, just like what would happen with the shield base).

 

Seriously, don't put 8 sockets on something when you'll not be able to power 8 modules.  Or require module makers to specify power requirements when advertising modules so one could figure that into the math on what they are able to create.



#15 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 23 January 2013 - 03:10 PM

Hi NXTwoThou, Thank you very much for your insights and feedback. Unfortunately, pretty much all component systems have the same power limitations. Even USB has a varying current limit per device, depending on which type of USB port being used. Too many USB devices on a hub can cause intermittent issues, unless there is a power booster (i.e. powered hub) there. Power management is one of the keystone features of GoBus 2.0. For the first power extender option, we're working on a powered hub. We're also going to be making power consumption a required profile report for all GoBus 2.0 devices. That said, GoBus modules like the Shield Base (and accessories like the DAQ) would only report minimum power consumption...since the user could plug any arbitrary part into them. We're looking forward to making this even simpler with GoBus 2.0. We'll take a look at good ways to alert the user to total power consumption numbers as well. Chris




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.