Jump to content

Photo

Powering RPi Zero through SIO with supercapacitor


21 replies to this topic

#1 RockfordDash OFFLINE  

RockfordDash

    Space Invader

  • 31 posts
  • Location:Bay Area, CA (USA)

Posted Thu Apr 25, 2019 11:40 PM

Hello,

 

I have a question regarding supercap scheme. I have built RPi Zero to SIO for loading ATRs with Hias'es "atariserver" and figured I can power RPi through +5V pin from Atari SIO to cut down on a number of cables. I have a new 5V/2A PS for my Atari, and RPi Zero only needs about 100 mA. There's only one problem. RPi takes several seconds to boot, so I don't want to power it down when I power cycle Atari when reset doesn't work. To that end, I thought I'd use super capacitor. I bought one 1F supercap, some Schottky diodes and resistors. This is a scheme I came up with:

 

supercap-rpi-zero.png

 

Does it make sense? I know it works, but I don't know if I need to bother with a resistor to limit inrush current. I don't know what supercap can tolerate. Perhaps just a diode + supercap would suffice.

With a 10 ohm R1 it takes about 20s to fully charge supercap, and then RPi can run for about 14 seconds after I turn off Atari. That's plenty of time to power cycle Atari.

 

Thanks,

RD



#2 TGB1718 ONLINE  

TGB1718

    Chopper Commander

  • 103 posts

Posted Sun Apr 28, 2019 5:37 AM

What you have there looks ok, but the resistor in series with the capacitor is essential otherwise at switch on

the capacitor would appear as a short circuit, also 4.7 ohms looks a little low for a normal +5V from the SIO.

 

I think the current is limited to 50mA on a standard SIO port unless you have modded it to provide more current.

 

So you need to select a resistor suitable to limit the max current the the +5 can supply, obviously the larger the

resistor the longer it will take C1 to charge.



#3 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 689 posts

Posted Sun Apr 28, 2019 12:33 PM

$.02 I've had good luck with cheap LiPo batteries off of eBay for general use. Same basic circuit with a LiPo would probably power the RPi for a week.



#4 RockfordDash OFFLINE  

RockfordDash

    Space Invader

  • Topic Starter
  • 31 posts
  • Location:Bay Area, CA (USA)

Posted Sun Apr 28, 2019 2:01 PM

Thank you for advice. I'll use 10 ohm resistor to limit charging current.

According to Atari 130XE schematic (https://archive.org/...ematics/page/n7) +5V pin in SIO is connected to power rail through some choke, so I assume I can draw 0.5 A if I have appropriate power supply unit.

LiPos are quite demanding when it comes to storage; they should be partially discharged. Supercap is quite simple to use, has no such reqauirements and should last.


  • slx likes this

#5 E474 OFFLINE  

E474

    Chopper Commander

  • 236 posts

Posted Thu May 9, 2019 9:59 AM

Hi,

Did you get it working, I'm interested in building one if it does?

#6 RockfordDash OFFLINE  

RockfordDash

    Space Invader

  • Topic Starter
  • 31 posts
  • Location:Bay Area, CA (USA)

Posted Thu May 9, 2019 9:01 PM

Hi,

 

Yes, I did build it. I used 10 ohm resistor, 1 F supercap and two Schottky rectifier diodes. RPi Zero W draws about 100 mA and it can run for several seconds (>13s) after I power off Atari.

I use USB power supply rated at 2A to power them.

I can remove stubborn games, turn machine back on and RPi is still there to serve the content. No separate power bricks needed anymore.

 

The one thing I didn't realize is just how big 1 F capacity is. It keeps RPi running fore several seconds, but it also takes about 1/2 a minute to fully charge. Not a big deal, but explains why resistor is important.



#7 Daedalus2097 OFFLINE  

Daedalus2097

    Space Invader

  • 34 posts
  • Location:Glasgow, Scotland

Posted Fri May 10, 2019 4:49 AM

Just a thought here, but what about putting a switch between the capacitor and the RPi? That way, when you want to actually turn off the machine, you can isolate the RPi, leaving the charge in the capacitor there so it'll take less time to fully charge the next time you use it. Might seem a bit of extra faff, but could help if the half a minute charge time becomes an issue.



#8 Nezgar OFFLINE  

Nezgar

    Stargunner

  • 1,976 posts
  • Location:Saskatchewan Canada

Posted Sat May 11, 2019 10:36 PM

One might debate the desk space savings of a 1F supercap, vs an extra wall wart. ;-)

 

I've seen some that are the size of a water bottle or thermos - how big is yours? (Sorry, that sounds bad....  :P  )



#9 RockfordDash OFFLINE  

RockfordDash

    Space Invader

  • Topic Starter
  • 31 posts
  • Location:Bay Area, CA (USA)

Posted Sun May 12, 2019 6:42 PM

Here it is, 1F super capacitor rated at 7.5V:

supercap.jpg

Next to it, standard CR2032 battery to give you the idea how small the cap is.

Technology moves on, this is not an oversized electrolytic capacitor.



#10 RockfordDash OFFLINE  

RockfordDash

    Space Invader

  • Topic Starter
  • 31 posts
  • Location:Bay Area, CA (USA)

Posted Sun May 12, 2019 6:44 PM

Regarding the switch: I was aiming for simplicity. No need to complicate it further. Just turn Atari on and off, the rest should just work.


  • JR> likes this

#11 jvas OFFLINE  

jvas

    Moonsweeper

  • 426 posts
  • Location:Budapest, Hungary (Europe)

Posted Mon May 13, 2019 12:07 AM

Why don't you just feed the SIO from the power plug internally. Just one wire + you need to cut that pin of the SIO.



#12 E474 OFFLINE  

E474

    Chopper Commander

  • 236 posts

Posted Mon May 13, 2019 4:27 AM

Hi,

Is there any chance of some rough and ready pictures showing the assembled unit?

#13 RockfordDash OFFLINE  

RockfordDash

    Space Invader

  • Topic Starter
  • 31 posts
  • Location:Bay Area, CA (USA)

Posted Mon May 13, 2019 3:49 PM

Here's my RPi-based atari server prototype:

 

rpi-supercap-proto.jpg

 

@jvas: sorry, I don't understand your suggestion.

 


  • slx likes this

#14 E474 OFFLINE  

E474

    Chopper Commander

  • 236 posts

Posted Mon May 13, 2019 4:42 PM

Hi,

 

   Thanks very much for the photo, I have some DuPont connectors and a crimping tool, and also some heat-shrink tubing, so I will give it a go if I can find the parts (mainly the super-capacitor). Not having to plug the RPi is a plus as plugs are at a bit of a premium. 



#15 RockfordDash OFFLINE  

RockfordDash

    Space Invader

  • Topic Starter
  • 31 posts
  • Location:Bay Area, CA (USA)

Posted Tue May 14, 2019 11:23 PM

I'm sorry, I messed up connections in the first picture I posted. This is what it actually should be, and it is what I assembled:

 

supercap-rpi-zero-2.png

 

I used 2W 10 ohm resistor, that should be enough. I found all parts on Mouser.com.

 



#16 Mr Robot OFFLINE  

Mr Robot

    Dragonstomper

  • 768 posts
  • Lost in the Robot Factory
  • Location:Englishman in St. Louis

Posted Wed May 15, 2019 8:20 AM

I'm surprised no-one has done this to an Atari powered SDrive-Max yet



#17 toddtmw ONLINE  

toddtmw

    Dragonstomper

  • 632 posts
  • Location:Cincinnati, Ohio

Posted Wed May 15, 2019 3:50 PM

This is great. Two questions:

 

1. can you post a bill of materials (hopefully with links)?

2. what are you running on the Pi Zero?

 

Thank you

-Todd



#18 toddtmw ONLINE  

toddtmw

    Dragonstomper

  • 632 posts
  • Location:Cincinnati, Ohio

Posted Wed May 15, 2019 3:54 PM

So, I went looking for how much power an Uno pulls and found this:

http://www.home-auto...n-cell-battery/

 

Powering an uno for 4 years from a 9V battery. (now, that doesn't include the sdrvie screen, but still...)

 

Might be worth looking at for someone more knowldgable about these things than me!

 

-Todd



#19 gozar OFFLINE  

gozar

    Dragonstomper

  • 992 posts
  • Location:Ohio

Posted Wed May 15, 2019 6:51 PM

So, I went looking for how much power an Uno pulls and found this:

http://www.home-auto...n-cell-battery/

 

Powering an uno for 4 years from a 9V battery. (now, that doesn't include the sdrvie screen, but still...)

 

Probably be easier to grab a USB battery pack, the lipstick looking ones would give you almost 3 times the amount of power of a 9 volt.



#20 Mr Robot OFFLINE  

Mr Robot

    Dragonstomper

  • 768 posts
  • Lost in the Robot Factory
  • Location:Englishman in St. Louis

Posted Wed May 15, 2019 7:36 PM

Given that it only needs to be kept alive to survive a reboot, a battery is probably a bad choice, a super capacitor has much longer lifespan and many many more charge/discharge cycles.

#21 RockfordDash OFFLINE  

RockfordDash

    Space Invader

  • Topic Starter
  • 31 posts
  • Location:Bay Area, CA (USA)

Posted Thu May 16, 2019 9:44 AM

 I found parts on Mouser.com:

 

1 625-SB220-E3
SB220-E3/54
20 Volt 2.0 Amp

2 581-SCMR22G105MRBA0
SCMR22G105MRBA0
7.5V 1F ESR350mOhms

3 603-FKN2WSJR-73-10R
FKN2WSJR-73-10R
2W 10 Ohm 5%

 

mouser-parts.png

 

S&H was $4.99.

 

 


#22 RockfordDash OFFLINE  

RockfordDash

    Space Invader

  • Topic Starter
  • 31 posts
  • Location:Bay Area, CA (USA)

Posted Thu May 16, 2019 9:50 AM

I think this approach works with RPi Zero, because it runs on 3.3V. I suppose it uses step down converter and happens to work with a range of voltages from 3.3V to 5V, which is a key here. Super cap doesn't charge fully (b/c of the diode) and then it slowly discharges and voltage drops.

 

On RPi I run AtariServer: https://github.com/mikekov/AtariServer

 






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users