Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Battery powered raspberry pi (http://www.chiefdelphi.com/forums/showthread.php?t=117989)

Gary Dillard 31-10-2013 08:30

Re: Battery powered raspberry pi
 
Our controls team is looking at integrating a raspberry pi with a vision system for a fall project. One question they have is on boot up time - the specs are quoting about 45 seconds. Has anyone had any issues with this, does it determine how it needs to be powered (breaker or direct), do you power up the robot in queue to give it time, and any other advice on integrating it to maintain connection through the match?

wilsonmw04 31-10-2013 10:22

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by Gary Dillard (Post 1299405)
Our controls team is looking at integrating a raspberry pi with a vision system for a fall project. One question they have is on boot up time - the specs are quoting about 45 seconds. Has anyone had any issues with this, does it determine how it needs to be powered (breaker or direct), do you power up the robot in queue to give it time, and any other advice on integrating it to maintain connection through the match?

45 seconds seems more than enough time. if you power it on when you place the robot on the field, there could be 3-4 minutes of time to boot that little guy up.

yash101 31-10-2013 21:00

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by philso (Post 1286812)
This will not work due to the high ESR inherent to Super Caps. They are only meant for applications where the current draw is much less than 1 mA. The datasheet gives values ranging from 14 to 600 Ohms. If the supercap is charged to 5 Volts, a 300 mA input current (into the Raspberry Pi) through the 14 Ohms would cause a 4.2 Volt drop giving an input voltage of about 0.8 Volts at the Rasperry Pi). We made this mistake at work when they first became available and we were able to verify this. Note that the ESR will limit the charging current just like it would limit the discharge current so there is no concern about large charging currents.




This will work the best if you use a low-dropout 5V regulator.

The regulators that are not low-dropout (78xx, LM371, etc.) require that the input voltage be at least 2-3 Volts higher than the selected output voltage. When the input voltage drops too low, the output voltage also drops, with the voltage across the regulator being in the 2-3 Volt range, depending on the regulator type and the output current.

With low-dropout types, the input voltage can be as little as 0.5 Volts above the selected output voltage.

It would still be best to install a capacitor bank and an input diode on the input of the regulator to provide "ride through" time. The anode of the diode would be connected to the battery. The cathode would be connected to the capacitor and regulator input. The diode becomes reverse biased when the battery voltage drops and "disconnects" the regulator input from the battery leaving it to be powered from the capacitor. Without the diode, the other loads on the battery will discharge the capacitor and you are no better off. It would be best to use a schottky diode such as a STPS1545FP from ST since it has lower forward voltage drop than the normal rectifier diode. With the maximum input current of 0.7 Amps for the Raspberry Pi, a battery voltage of 11 Volts, a forward diode drop of about 0.3 Volts, a minimum input voltage of 6.0 Volts to the regulator and a ride through time of 1 second, one would need a 150,000 microFarad capacitor (C = current x ride through time/ voltage change). Nichicon makes a suitable part that is 51 mm in diameter and 120 mm long and is rated at 6.3 Volts. This capacitor is rated for 15.3 Amps so one would not get very much voltage drop when discharging it. One should use an oscilloscope to monitor the battery voltage, the regulator input voltage and the regulator output voltage during high load to verify that the capacitor chosen is large enough.

http://www.digikey.com/product-searc...ds=LNR1E154MSE

There is still the problem of getting this past inspection. Allowing for a lower battery voltage, lower regulator input voltage and shorter ride through time will reduce the capacitor value required and the stored energy in the capacitor. A smaller part would be:

http://www.digikey.com/product-detai...579-ND/1882056





You will still have to deal with the ride through time issue with this scheme.

You would want to choose a step up converter with a very minimum input voltage (at the desired load current) yet still has a high enough maximum input voltage that will accept the maximum battery voltage without damage. The output voltage should be as high as possible (check with next year's rules). You may want to choose a converter that has a maximum output current rating that is several times higher than the maximum load current. The rated minimum input voltage is usually with the maximum output current and will be lower with lower output currents. To get the most out of your system, it would be best to actually measure the maximum current draw of your Raspberry Pi while running the software you want it to run since it may be quite different than what the maximum current in the specification.

You would want to choose the step down converter with a maximum input voltage that is equal to or just greater than the output voltage of the step up converter. You would also want the minimum input voltage to be as low as possible at the desired output current. Again choose a converter with a maximum output current that is several times higher than your maximum load current.

You may need to connect a capacitor on the output of the step up converter to get the ride through time you want. The step down converter may have an input capacitor that will help with this. Use the same calculation shown above. You will not need the series diode since the step up converter will isolate you from the battery already.

It would be best to use an oscilloscope to monitor the battery voltage, the output voltage of the step up converter and the output of the step down converter during high load conditions to ensure that the system is working correctly and the ride through cap is sufficiently large.

When choosing the step up and step down converters, you do not need to choose isolated types since they are usually more expensive than the non-isolated types. The input reference terminal (0 Volt) of the isolated type is not connected to the output reference terminal but is connected in the non-isolated type.

I do agree about choosing a voltage regulator with the requirements. However, I would like to point out that there is a polyfuse. Just make sure your voltage regulator it able to put out the current of the polyfuse rating and put a 1000 uF capacitor to isolate the current spikes.

Off topic: Make sure you strip the Pi of all the software that you do not need because everything means greater power consumption and lower performance. You want to squeeze the juice out of the Pi during the few competition minutes. Put good load on the Pi, the Pi will do the work slowly but efficiently. For example: My Website run on a Pi. I have all sorts of other crapware on the pi too, but it still works with a decent result.

Also, why are you using a Raspberry Pi? It is one of the lowest power dev boards available, just better than the cRIO by a few times. You might try looking at a development board like the oDroid. The specs make it seem like a good one to use.

Along with removing the crapware to squeeze the juice out of the Pi, you might find it useful booting off USB with an HDD or even an SSD. I reduced my boot time twice by doing this. Also, SD cards die quickly when running an OS on them because that is against their nature. Booting from USB will allow you to use a more OS "Friendly" disk drive. Also, an SSD will be better becauause of the G-Forces on the drive in a moving robot. Also, how will you keep the SD card in place.

TO RDP to it, use SSH. It eliminates the requirement for an entire server like xRDP. That helps with development.

yash101 31-10-2013 21:01

Re: Battery powered raspberry pi
 
^^Probably a bad idea to quote the entire message above! :D^^

yash101 01-11-2013 11:46

Re: Battery powered raspberry pi
 
Hey guys,
What do you think about this:
http://www.adafruit.com/products/1385

ptan 27-11-2013 00:05

Re: Battery powered raspberry pi
 
FWIW, the Beaglebone Black ($45) boots up in under 10 seconds using the native Angstrom Linux.

Quote:

Originally Posted by Gary Dillard (Post 1299405)
Our controls team is looking at integrating a raspberry pi with a vision system for a fall project. One question they have is on boot up time - the specs are quoting about 45 seconds.


yash101 27-11-2013 11:33

Re: Battery powered raspberry pi
 
My Pi server (devstuff.no-ip.biz) takes 1.5 minutes to boot to a point where I can SSH to it. However, it takes up to ten minutes to get to max efficiency, where it is done launching every application! Is there a way how I can benchmark the boot?

wireties 28-11-2013 10:02

Re: Battery powered raspberry pi
 
To solve the boot time issue - perhaps put a circuit inline with the Pi's power that will use a dedicated battery until the robots mains come online? Two diodes and a capacitor will do or one can get fancy with a circuit based on something like the MAX6236.

HTH

techhelpbb 28-11-2013 10:31

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by wireties (Post 1306819)
To solve the boot time issue - perhaps put a circuit inline with the Pi's power that will use a dedicated battery until the robots mains come online? Two diodes and a capacitor will do or one can get fancy with a circuit based on something like the MAX6236.

HTH

That addresses the problem but unless said battery was bought enclosed with the Raspberry Pi complete and off the shelf it violates FRC rules. There was a whole topic on ChiefDelphi about it this year (this topic actually so this is a restatement).

If someone wants to make such an item they need to be prepared to supply anyone that wants it to make it legal as COTS.

To get it approved outside of COTS they need to make several and go through FIRST engineering which will eat up this entire season between field testing and internal testing.

Capacitors are a grey area. For a real storage capacitor you should treat it like above. People have managed to slide high value capacitors into competition but run time would be uncertain.

wireties 28-11-2013 11:29

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by techhelpbb (Post 1306833)
That addresses the problem but unless said battery was bought enclosed with the Raspberry Pi complete and off the shelf it violates FRC rules. There was a whole topic on ChiefDelphi about it this year (this topic actually so this is a restatement)

"The only legal source of electrical energy for the ROBOT during the competition, the ROBOT battery, is one of the following 12VDC non-spillable lead acid batteries:"

You missed the point of SWITCHING power sources. I'm not talking about storing energy anywhere illegal during competition. The battery (or whatever power source) used to boot the Pi is not on the robot "during the competition". You remove it after turning on the robot mains. If necessary to comply with the rules a second approved battery can be the source during boot time, similar to how many of us power the driver station or Ethernet switches (for debugging) between matches.

techhelpbb 28-11-2013 11:51

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by wireties (Post 1306858)
"The only legal source of electrical energy for the ROBOT during the competition, the ROBOT battery, is one of the following 12VDC non-spillable lead acid batteries:"

You missed the point of SWITCHING power sources. I'm not talking about storing energy anywhere illegal during competition. The battery (or whatever power source) used to boot the Pi is not on the robot "during the competition". You remove it after turning on the robot mains. If necessary to comply with the rules a second approved battery can be the source during boot time, similar to how many of us power the driver station or Ethernet switches (for debugging) between matches.

I wonder if that would be considered legal. I can not say I have seen anyone do that on a competition field. Worth asking in the official Q&A though. Does address the boot time issue but not the potential for brown out.

wireties 28-11-2013 11:59

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by techhelpbb (Post 1306867)
I wonder if that would be considered legal. I can not say I have seen anyone do that on a competition field. Worth asking in the official Q&A though. Does address the boot time issue but not the potential for brown out.

Agreed - hard to see how a Pi stays up in an environment where the voltage drops below 5V or so. But we should be able to approach the brownout voltage that would kill the cRIO.

wireties 28-11-2013 12:53

Re: Battery powered raspberry pi
 
One of the last off-season tasks for FIRST 1296 is playing with the PiCam so I happened to be looking into quick boot times. Some solutions for booting quicker include using a class 10 SD card (faster transfer rates), compile kernel to use hard-float (faster math), remove all necessary services (less to start at boot time), remove unused kernel features (smaller kernel loads are faster), no DHCP (no searching for an querying DHCP servers), alternative user space startup schemes (other than sysV style), quiet console during boot (less time printing startup messages), customize/trim library contents and busy box features, etc.

The Pi runs embedded Linux and there are huge repos of advice out there to optimize the boot time. Many folks are booting Pis in 10 seconds, sometimes less. I'll post 1296 results here in a couple/few weeks.

HTH

yash101 29-11-2013 01:34

Re: Battery powered raspberry pi
 
It would be nice if we could make the Pi boot a read only image, to a RAMDISK, and make sure that the Pi doesn't get corrupted on brownout. That way, just like the cRIO, just turn it off by flipping the switch!

wireties 29-11-2013 15:09

Re: Battery powered raspberry pi
 
Quote:

Originally Posted by yash101 (Post 1306990)
It would be nice if we could make the Pi boot a read only image, to a RAMDISK, and make sure that the Pi doesn't get corrupted on brownout. That way, just like the cRIO, just turn it off by flipping the switch!


That is doable! And from other online users reports it would boot and run in 5 seconds or so using an initrd-style ramdisk.


All times are GMT -5. The time now is 22:51.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi