Arduino Yun - put linux environment to sleep or halt

Is it possible to put into sleep or halt mode only Linux (AR9331) part of Arduino Yun and then
wake it up by Arduino part (ATmega32u)?

Regards, Boštjan

No

Just doing some linking - this has been dicussed in another thread. See here Arduino Yun, power draw - #13 by system - Arduino Yún - Arduino Forum

It looks like pressing the YUN RST button (next to analog pin A4) powers the linux portion back up without affecting the Arduino part.

My setup was:

  1. Started blink program running on Arduino, pin 13.
  2. SSHd into Linino and issued halt command.
  3. Got disconnected from SSH, Yun dropped off of the wireless network.
  4. Observed that blink program was still running.
  5. Pressed YUN RST button (quick press, less than a second).
  6. Observed that blink program continued running uninterrupted.
  7. After a minute or so, Yun came back onto the wireless network and I was able to SSH in again.

The upshot is that you should be able to trigger the YUN RST button from Arduino, perhaps by connecting it to a digital output, or less invasively, having an arduino controlled servo press it. Then it should be possible to issue a halt command to Linino via the bridge and then restart it using the YUN RST button. I'll do more tests and report on my results.

Why do you want to do this? The normal reason to halt or sleep a processor is to put it in a low power operating mode to save battery life. Issuing a Linux halt command will only shutdown the Linux OS, it will not actually halt the processor, will not put it into a low power mode, and will not power down the WiFi radio or other power consuming peripherals. Basically, it just makes Linux non-responsive, and adds a long startup delay when you decide it's time to "wake" it up. What's the point?

Ah, well that was going to be one of my tests, to see if issuing the halt command actually powered down the related hardware by measuring power consumption. Sorry that I didn't specify that I haven't tested that yet. If it doesn't, then of course you are correct. There's no real point of doing it except perhaps to reset the linux portion if it becomes unresponsive.

dmitriyp:
Ah, well that was going to be one of my tests

Please do the test. I'd love to be proven wrong.

There's no real point of doing it except perhaps to reset the linux portion if it becomes unresponsive.

Except that if it becomes unresponsive, how will it respond to the halt command? :wink:

Of course, the hacking the reset button idea would reset it. If you do hack it, remember that the AR3391 runs on 3.3 volts, so you don't want to hook up a 32U4 pin directly to the AR3391 reset line - both because 5V could damage the AR3391, and because pressing the reset button to ground the reset line could damage the 32U4 output if it's trying to drive it high at the same time.

Results! Sort of...

Stock Yun configuration draws about 250mA from my USB port.

ShapeShifter, as you suspected, issuing the halt command does not affect the power draw.

When the YUN RST button is pressed and held down, however, the current draw drops down to 160 - 180 mA.

I'm not yet sure why this happens, if it's safe for the Yun, or if it can be used. (Maybe it just cuts power to the WiFi module and that accounts for the current drop, in which case, there are better ways to do the same thing).

I'll do some more testing and also see if I can find more documentation on what the RESET input on Atheros AR9331 does exactly.

Maybe holding reset stops the oscillator? With the clock stopped, power consumption would go down. I don't know if that would account for 70 to 90 mA. And, of course, user LEDs would turn off, so that will be several 10's of mA. So maybe the LEDs and clock together account for the difference?

Connect the TP51 or TP52 TestPoint to one selected AVR port.
A LOW state on selected port (digitalWrite(PORT, LOW)) shutting off the power of the AR3391. I think this is the lowest power consumption state of the YUN. (~30mA)

YunPower-wired.png

jwaldha:
Connect the TP51 or TP52 TestPoint to one selected AVR port.

Interesting, now we're getting somewhere! After powering down that portion, not it makes sense to periodically put the 32U4 to sleep to save power.

jwaldha:
Connect the TP51 or TP52 TestPoint to one selected AVR port.
A LOW state on selected port (digitalWrite(PORT, LOW)) shutting off the power of the AR3391. I think this is the lowest power consumption state of the YUN. (~30mA)

jwaldha,

I've been watching this conversation going on, and I thought perhaps (but I really don't know), if there was a separate USB/serial chip - you might be able to turn that off to save more power.

Anyhow, the Leonardo is the base design for the Yun (we are told). I found this.

Arduino Leonardo

Scroll down to power.

3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.

The page for the Yun says similar. I still don't know if there is a separate USB chip.

Jesse

jessemonroy650:
if there was a separate USB/serial chip - you might be able to turn that off to save more power.

Nope. The boards with a '328P processor, like the Uno, use a separate USB chip.

The Yun, like the Leonardo, uses a '32U4 processor which has the USB interface built in. There is no separate USB interface chip. This gives the Yun and Leonardo the ability to act like more than a serial communications port: it can also be programmed to appear to be a keyboard, mouse, etc.

ShapeShifter:
Nope. The boards with a '328P processor, like the Uno, use a separate USB chip.

::::SNIP::::

Yeah. I guess I should have read the data sheet. ;D

Jesse

jwaldha:
Connect the TP51 or TP52 TestPoint to one selected AVR port.
A LOW state on selected port (digitalWrite(PORT, LOW)) shutting off the power of the AR3391. I think this is the lowest power consumption state of the YUN. (~30mA)

Has anyone figured out a way of starting the AR9331 chip again? Letting TP51/52 go back high doesn't seem to do it.

Put transistor (mosfet) control by Atmel chip turn on/off the Yun shield (AR9331) power.

http://forum.arduino.cc/index.php?topic=324524.msg2241893#msg2241893