but that's just it, in my car, the radio turns off as soon as the key is turned to the off position, effectively acting as a "power outage". I know I could tie it into an always on circuit, but I'd rather it act as my radio does, and to not have to mess with it each time.BudBennett wrote:I wouldn't recommend this approach for an automotive system - you've got a large battery already as a backup power source. I think that there are other threads dealing with 12V automotive systems.
Hi Guitarist,guitarist46559 wrote:but that's just it, in my car, the radio turns off as soon as the key is turned to the off position, effectively acting as a "power outage". I know I could tie it into an always on circuit, but I'd rather it act as my radio does, and to not have to mess with it each time.BudBennett wrote:I wouldn't recommend this approach for an automotive system - you've got a large battery already as a backup power source. I think that there are other threads dealing with 12V automotive systems.
I hadn't seen any other threads that quite cover what I want to do (this ones been the closest), but I'll keep looking.
Note: I obtained a login on 'Putty' with more than 4.05V at 5V line.Disable LAN9512
The LAN9512 is the hardware device which controls Ethernet and USB ports. This chip consumes almost 200mA, and it will be very useful to disable it to save energy when I don't need USB or Ethernet. The LAN9512 datasheet explains some states of the device to save energy - these modes are SUSPEND2, SUSPEND1 and SUSPEND0. Therefore, it seems to be possible.
I have already found a partial solution:
echo 0x0 > /sys/devices/platform/bcm2708_usb/buspower will effectively disable the device and wake up it again with echo 0x1 to the same file. However, once the device has been stopped and started a certain number of times, it won't wake up again until the next reboot of the operating system.
Is there a method to disable LAN9512 and start it again reliably? (Maybe can I reload some driver that controls LAN9512?)
When a raspberry pi model B is idle, it consumes 400 mA. When it's stressed, 470mA. When the LAN9512 is disabled, it consumes 200mA on idle and 260mA stressed.
I have tested the fiability of disabling the chip through "buspower" by using a script that disables the LAN9512, tries to mount an usb device to check for activity and reboots. Until now, the raspberry pi has rebooted 9222 times without errors.
echo 1 > /sys/devices/platform/bcm2708_usb/bussuspend Disables the LAN9512 But won't wake it up again when doing echo 0 to the same file. After disabling it, the raspberry pi goes extremly slow reporting a load average up to 4.
http://raspberrypi.stackexchange.com/qu ... le-lan9512
Code: Select all
proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults,noatime,ro 0 2 /dev/mmcblk0p2 / ext4 defaults,noatime,ro 0 1 tmpfs /tmp tmpfs defaults,noatime,nosuid,size=100m 0 0 tmpfs /var/tmp tmpfs defaults,noatime,nosuid,size=30m 0 0 tmpfs /var/spool/mqueue tmpfs defaults,noatime,nosuid,mode=0700,gid=12,size=30m 0 0 none /var/run tmpfs size=5M,noatime 0 0 none /var/log tmpfs size=5M,noatime 0 0
as the webpage you have linked to says that they are still in development and was only launched this month I think the phrase "already a product" is an exaggerationslado wrote:Interesting topic. There is already a product using supercapacitors instead of batteries to backup power for the Raspberry Pi for a short time. The main difference: The supercapacitors work with their full charge, not only with a small change of charge around the 5V. A step-up/step-down converter is doing the job of converting the falling or rising voltage at the supercapacitor:
Code: Select all
#!/usr/bin/env python import RPi.GPIO as GPIO import os, time GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP) def powerfail_detect(channel): for n in range(1,4): time.sleep(1) if (not GPIO.input(23)): return print("powerfail detected...shutting down the Pi!") os.system("sudo shutdown -h now") GPIO.add_event_detect(23, GPIO.RISING, callback=powerfail_detect) try: print("Waiting for falling edge on port 23") while True: time.sleep(1) except: GPIO.cleanup() # clean up GPIO on CTRL+C exit GPIO.cleanup()