Dec 1, 2016

Raspberry Pi UPS from junk box

I've been using the Raspberry Pi 1 as an ssh shell for Irssi and as a web server for my IP cameras and self-made IoT gadgets. Maybe I had just a bad luck with the corrupting SD cards, but I ended up to put the Arch Linux and other files to 120 GB SSD (although the SD card is still needed for bootloader), which was connected to RPi via 2.5" USB HDD box. Some time ago the SSD died and I got a good reason to upgrade the whole system, so I bought the RPi 3 and replaced the SSD with an 250 GB Samsung 840 basic. The extra performance (1x 700 MHz vs. 4x 1.2 GHz ARM cores) is nice especially when rendering timelapse videos from my IP camera photos.

Click to enlarge
To get some extra reliability, I thought that some kind of UPS could be nice. There's plenty of complete kits on ebay, but I happened to have some suitable parts in my junk box, so I didn't bother to wait 2 weeks. It wouldn't need any fancy features, but obviously should have at least an overcharging protection and under-voltage cutoff if the power outage is long enough. So there's the plan:

Click to enlarge
To keep it simple, there's no separate charging circuit for the 12 V sealed lead acid battery. I had couple of 12 V power supplies so it could charge the battery up to 12 volts. However fully charged battery would sit around 14.2 volts, so charging it only to 12 volts would waste about half of it's full capacity (2.9 Ah). For me, that's not a problem because the RPi would stay on more than long enough even with 1.45 amp-hours. We can limit the charge current of the battery with the 47R resistor, but allow higher discharge currents through the schottky diode, when the primary power supply cuts off. Theres also a protection diode for the 12 V power brick, so it cannot draw current from the battery when the main PSU is down. At these voltages we don't have to care about overcharging the battery.

RPi requires 5 volts, so there's also a regulator. Because the voltage drop from 12 V to 5 V is quite large when considering the 400-1000 mA operating current, I chose a buck switch mode power supply module instead of regular LM7805 linear regulator. That Murata module is pin-compatible with LM7805 but the efficiency is a lot better as it's an SMPS.

The undervoltage cutoff prevents the output of 5 V SMPS module to fall down slowly by causing all kind of unwanted effects for the RPi. When the battery voltage reaches ~6 V, the relay disconnects the battery, which is connected again when the main 12 V supply returns. The coil of the relay is rated for 5 volts, so there must be a series resistor to limit the current. The value of the resistor sets the cutoff voltage. But why there's a capacitor in series with relays coil? I noticed that when the resistor value would be good in terms of cutoff voltage, the relay didn't switch on even at 12 volts. So the capacitor works as a high-pass filter which bypasses the 270R resistor and provides the "kick" to the relay coil when the main PSU turns on, but after that, the current passes only via the resistor, as the capacitor cannot pass DC current. After the transition, everything abouve 6 volts is enough to keep the relay switched on.

Click to enlarge

* The picture above still with the RPi 1 model B.

87 comments:

  1. Great blog! I really love how it is easy on my eyes and the information are well written. I am wondering how I might be notified whenever a new post has been made.
    Paddle Wheel Flow Meter

    ReplyDelete
  2. Wow this look good and good thinking of rather than waiting for 2 weeks when you can made one for yourself. Thanks for sharing the blog.

    ReplyDelete
  3. Can you please enlist the components name and values please

    ReplyDelete
  4. Indexel is manufacturers and suppliers of control panel, SCADA system, VFD system and much more.
    Kindly find the below services:
    Control Panel manufacturers in India
    SCADA system manufacturers in india

    ReplyDelete
  5. The Amazing product that meet your need to withdraw btc coin through world's bitcoin atm card it works as normal atm card at all over the world
    This can be also use to convert bitcoins into real money with current market rate at any ATM Machine.

    ReplyDelete
  6. Here you will find best Latest Ghana music where you can download videos about culture lifestyle of nigerian people african citizens and much more. Thanks for visiting this website

    ReplyDelete
  7. The UK's most visited estate agents.Our Experts can help you buy, sell, rent and let property with branches across the UK. largest online letting agent uk .We will list your property on the main property portals such as Rightmove, Zoopla & PrimeLocations.let your property within the first 48 hours.largest online letting agent uk.

    ReplyDelete
  8. bitcoin mobile recharge and top up credits quickly and easily any where in the world. this is a top up phone with bitcoin best telecom mobile network operator worldwide.Every thing we have explained is so simple to understand. We provide you 24 hours service. Many of our clients have actually fixed their bitcoin amount for their mobile credit. If you also do not use your cryptocurrency for any cause as yet then we have told you the best way to utilize your money

    ReplyDelete
  9. One of the top website for organic SEO, where you can easily Drive More Traffic To Website within a month. Yes, it's time to increase your clients/visitors on your website and earn more and more money from your website or business. Visit for more details.
    drive more traffic to website

    ReplyDelete
  10. Our offer is very effective when compared with the listed list. You create a very site and boost your google rankings web site, but this site does not require anyone to use your site. This is the first place for SEO services to allow users to access your site.

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. Excellent blog & I love your
    latest foreign Music you have a good work here... It's hard to find good quality writing like yours nowadays..
    Naija Entertainment
    Excellent blog & I love your
    latest naija Music

    ReplyDelete
  13. This Blog is really great and good content
    Keep it up
    Exclusive Here

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. I liked your blog very much it is very interesting and I learned many things from this blog which is helping me a lot.


    UV Light Ballasts

    ReplyDelete

  16. Xcluciveoffer
    buy the latest electronics product at here.Choose form a from a wide range of Electronics products at xcluciveoffer prices, brands, offers.
    Click now
    Shop now

    ReplyDelete
  17. Excellent article! We are linking to this great article on our website. Keep up the good writing.Hacking BlogsHack Instagram

    ReplyDelete
  18. In a superior and orderly manner that has a special and excellent function and must have a special result
    فروشگاه اينترنتی
    https://www.baneh.com
    goodluck

    ReplyDelete

  19. Xcluciveoffer
    Buy latest design Hp Desktop and more feature's like-
    HD camera,sound quality,4GB DDR4 RAM,1TB 7200rpm hard drive,21.45-inch screen.Xcluciveoffer get 50% offer all eletronice product's.
    Click now
    Shop now

    ReplyDelete
  20. Nice Blog with Fresh Content. I really Like your Blog. Thanks for Sharing.
    Electrical Accessories at Lowest Prices

    ReplyDelete
  21. Ayo Raih Kesempatan Mendapatkan Uang Ratusan Juta Rupiah... Bandar Sabung Ayam Online Terbesar dan Terpercaya di indonesia, Kunjungi Website Kami Di Disini dan Dapatkan Juga Promo Bonus Natal dan Tahun Baru untuk mendapatkan akun Sabung Ayam anda.
    Hubungi kami di WA: +62-812-2222-995 & Telegram : @bolavitacc

    ReplyDelete
  22. such an excellent post regarding "Raspberry Pi UPS from junk box"

    thanks,

    Gmail Toll Free Number

    ReplyDelete
  23. Happy to see your post as it is just what I’ve looking for. I am looking forward to another great post from you.
    E-waste recycling chennai

    ReplyDelete
  24. This post is really insightful; it has helped me understand so many things.E-waste recycling company in Pune

    ReplyDelete
  25. This is a great blog. I am pretty much impressed with your good work. You put really very helpful information. Keep it up.
    Benefit of E-waste management

    ReplyDelete
  26. very informatie blogs. we could see that electronics appliance is very important to our life and hobby. Very clear explanation. thank you for sharing muco.nl

    ReplyDelete
  27. Happy to see your post as it is just what I’ve looking for. Please keep it up.
    E-waste recycling in Kolkata
    Extended Producer Resposibility

    ReplyDelete
  28. Thanks for writing such a great post. Keep it up. BRP INFOTECH is a reputed company which is dealing in E-Waste Recycling in Delhi-India and it has been serving the nation by reducing the excess amount of e-waste material that is harming our atmosphere.

    ReplyDelete
  29. Very nice blog on this website. It is really difficult to get this kind of with useful information. I will eagerly look forward to your upcoming updates. Thanks for sharing it here. BRP INFOTECH is one of the best E-waste company in Hyderabad.

    ReplyDelete
  30. Thank yo very much for the detailed information.This is useful for me.I waiting for your next post.E-waste recycling solution in India.

    ReplyDelete
  31. #BeirutEscort , #BeirutEscorts , #BeirutEscortsServices , #BeirutEscortsAgency , #EscortsBeirut , #EscortsinBeirut , #EscortGirlsBeirut , #LebanonEscorts , #BeirutEscort , #Beirutescort , #Beirutescorts , #BeirutEscorts , #Beirutescortsservices , #Beirutescortsagency , #escortsBeirut , #escortsinBeirut , #Lebanonescorts , #lebanonescorts , #lebanonescortsservices Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts Beirut escorts
    Beirut escorts
    Beirut escorts services
    Beirut escorts agency
    Escorts Beirut
    Beirut escort
    Beirut escorts
    Beirut escorts services
    Beirut escorts agency
    Escorts Beirut
    Beirut escort
    Beirut Escorts
    Beirut Escorts Services
    Beirut Escorts Agency
    Escorts Beirut
    Beirut Escorts
    Beirut Escorts Services
    Beirut Escorts Agency
    Escorts Beirut
    Beirut Escorts
    Beirut Escorts Services
    Beirut Escorts Agency
    Beirut Escort
    Escorts Beirut
    Beirut Escorts
    Beirut Escorts Services
    Beirut Escorts Agency
    Beirut Escort
    Escorts Beirut
    Beirut escorts
    Beirut escorts services
    Beirut escorts agency
    Escorts Beirut
    Beirut escort

    ReplyDelete
  32. Thanks for sharing very informative post. Keep it up.
    BRP INFOTECH is one of the best Best EPR Service Provider in India.

    ReplyDelete
  33. This is a great post. I am pretty much impressed with your good work. You put really very helpful information. Keep it up. E-waste recycling plant

    ReplyDelete
  34. I’ve been looking for info on this topic for a while. I’m happy this one is so great. Keep up the excellent work.
    E-waste management in India

    ReplyDelete
  35. HACK ANY WHATSAPP ACCOUNT

    HACK ANY INSTAGRAM ACCOUNT ,
    HACK FACEBOOK ACCOUNT,
    READ OTHER PHONE SMS,
    HACK TELEGRAM ACCOUNT,
    HACK VIBER ACCOUNT
    HACK WECHAT ACCOUNT
    HACK HANGOUT CHAT ACCOUNT
    HACK ANY SOCIAL MEDIA ACCOUNT,
    SPY ON YOUR CHEATING PARTNER (HUSBAND/WIFE)
    contact me : putro9111@gmail.com
    Telegram: https://t.me/Hackord247
    Phone: +1(914) 278-7320


    HACK N'IMPORTE QUEL COMPTE WHATSAPP

    HACKER TOUT COMPTE INSTAGRAM,
    COMPTE HACK FACEBOOK,
    LIRE D'AUTRES SMS TÉLÉPHONIQUES,
    COMPTE TÉLÉGRAMME HACK,

    COMPTE HACK VIBER

    COMPTE HACK WECHAT

    COMPTE CHAT HACK HANGOUT

    HACK N'IMPORTE QUEL COMPTE DE MÉDIAS SOCIAUX,
    ESPIONNEZ VOTRE PARTENAIRE TRICHEUR (MARI / FEMME)
    contactez-moi: putro9111@gmail.com

    Télégramme: https://t.me/Hackord247

    Téléphone: +1 (914) 278-7320


    هاك أي اختراق أي حساب واتساب

    اختراق أي حساب في انستغرام ،
    حساب FACEBOOK ،
    قراءة الرسائل القصيرة للهواتف الأخرى ،
    هاك حساب التليغرام ،

    حساب الاختراق

    هاك حساب WECHAT

    اختراق حساب دردشة Hangout

    اختراق أي حساب لوسائل الإعلام الاجتماعية ،
    تجسس على شريكك في الخداع (الزوج / الزوجة)
    اتصل بي: putro9111@gmail.com

    برقية: https://t.me/Hackord247

    هاتف: +1 (914) 278-7320



    HACKEAR CUALQUIER CUENTA DE WHATSAPP

    HACK CUALQUIER CUENTA DE INSTAGRAM,
    HACK FACEBOOK CUENTA,
    LEER OTRO TELÉFONO SMS,
    HACK CUENTA DE TELEGRAMA,

    CUENTA HACK VIBER

    HACK WECHAT CUENTA

    HACK HANGOUT CHAT CUENTA

    HACKEAR CUALQUIER CUENTA DE MEDIOS SOCIALES,
    ESPIA A TU SOCIO ENGAÑOSO (MARIDO / ESPOSA)
    contáctame: putro9111@gmail.com

    Telegrama: https://t.me/Hackord247

    Teléfono: +1 (914) 278-7320


    拥有任何WHATSAPP帐户

    拥有任何INSTAGRAM帐户,
    HACK FACEBOOK帐户,
    阅读其他手机短信,
    骇客电话帐户,

    HACK VIBER帐户

    黑客微信帐号

    HACK环聊聊天帐户

    拥有任何社交媒体帐户,
    窥探您的作弊伙伴(丈夫/妻子)
    与我联系:putro9111@gmail.com

    电报:https://t.me/Hackord247

    电话:+1(914)278-7320



    ਕੋਈ ਵੀ ਵਟਸਐਪ ਖਾਤੇ ਹੈਕ

    ਕੋਈ ਵੀ ਇੰਸਟਾਗ੍ਰਾਮ ਅਕਾਉਂਟ ਹੈਕ ਕਰੋ,
    ਹੈਕ ਫੈਸਬੁੱਕ ਖਾਤਾ,
    ਹੋਰ ਫ਼ੋਨ ਐਸਐਮਐਸ ਪੜ੍ਹੋ,
    ਹੈਕ ਟੈਲੀਗ੍ਰਾਮ ਖਾਤਾ,

    ਹੈਕ VIBER ਖਾਤਾ

    ਹੈਕ WECHAT ਖਾਤਾ

    ਹੈਕ ਅਕਾਉਂਟ ਅਕਾਉਂਟ

    ਕੋਈ ਵੀ ਸਮਾਜਿਕ ਮੀਡੀਆ ਖਾਤਾ ਹੈਕ,
    ਆਪਣੇ ਚੀਟਿੰਗ ਪਾਰਟਨਰ 'ਤੇ ਜਾਸੂਸੀ ਕਰੋ (ਪਤੀ / ਪਤਨੀ)
    ਮੇਰੇ ਨਾਲ ਸੰਪਰਕ ਕਰੋ: putro9111@gmail.com

    ਟੈਲੀਗਰਾਮ: https://t.me/Hackord247

    ਫੋਨ: +1 (914) 278-7320


    WHATSAPPアカウントをハック

    インスタグラムアカウントをハック
    ハックフェイスブックアカウント、
    他の電話SMSを読む、
    ハッキングテレグラムアカウント、

    ハックバイバーアカウント

    ハックWECHATアカウント

    Hang Hangout Chatアカウント

    ソーシャルメディアアカウントをハックする、
    あなたの浮気パートナーをスパイ(HUSBAND / WIFE)
    私に連絡してください:putro9111@gmail.com

    電報:https://t.me/Hackord247

    電話:+1(914)278-7320




    HACKEN SIE JEDES WHATSAPP-KONTO

    HACK JEDES INSTAGRAM-KONTO,
    HACK FACEBOOK-KONTO,
    LESEN SIE ANDERE TELEFON-SMS,
    HACK TELEGRAM ACCOUNT,

    HACK VIBER ACCOUNT

    HACK WECHAT-KONTO

    HACK HANGOUT CHAT-KONTO

    HACK JEDES SOZIALMEDIENKONTO,
    Spionieren Sie Ihren betrügerischen Partner aus (EHEMANN / EHEFRAU)
    Kontaktieren Sie mich: putro9111@gmail.com

    Telegramm: https://t.me/Hackord247

    Telefon: +1 (914) 278-7320



    Взломать любой аккаунт

    Взломать любой аккаунт INSTAGRAM,
    HACK FACEBOOK АККАУНТ,
    ПРОЧИТАЙТЕ ДРУГОЙ ТЕЛЕФОН СМС,
    HACK TELEGRAM ACCOUNT,

    HACK VIBER ACCOUNT

    HACK WECHAT АККАУНТ

    HACK HANGOUT ЧАТ СЧЕТ

    Взломайте любой аккаунт в социальных сетях,
    ПОПИСЫВАЙТЕСЬ НА МОЕГО ПАРТНЕРА (МУЖ / ЖЕНА)
    свяжитесь со мной: putro9111@gmail.com

    Telegram: https://t.me/Hackord247

    Телефон: +1 (914) 278-7320




    HACK QUALQUER CONTA DO WHATSAPP

    HACK QUALQUER CONTA INSTAGRAM,
    CONTA do HACK FACEBOOK,
    LEIA OUTRO TELEFONE SMS,
    CONTA DE TELEGRAMA HACK,

    CONTA HACK VIBER

    HACK WECHAT CONTA

    CONTA HACK HANGOUT CHAT

    Hackear qualquer conta de mídia social,
    ESPIÃO NO SEU PARCEIRO TRAVANTE (MARIDO / ESPOSA)
    entre em contato comigo: putro9111@gmail.com

    Telegrama: https://t.me/Hackord247

    Telefone: +1 (914) 278-7320




    किसी भी व्हाट्सएप खाते को हैक करें

    किसी भी INSTAGRAM खाते को खोलें,
    हैक बुक खाता,
    अन्य फोन एसएमएस पढ़ें,
    हैक टेलीग्राम खाता,

    हैक VIBER खाता

    हैक WECHAT खाता

    HAT HANGOUT CHAT ACCOUNT

    किसी भी सामाजिक मीडिया खाते को खोलें,
    अपने सहयोगी साझेदार (पति / पत्नी) पर जासूस
    मुझसे संपर्क करें: putro9111@gmail.com

    टेलीग्राम: https://t.me/Hackord247

    फोन: +1 (914) 278-7320

    ReplyDelete
  36. really very nice post I am very happy to be here thank you.... keep doing more posts like this for more arduino projects

    ReplyDelete
  37. I am extremely impressed thanks for sharing all information. It is a great post for the people to get the proper information. If you’re facing any technical issues with it, our HP Printer technical executives are much trained to apply the right technical instructions to install HP Solution Center in the right ways. 

    ReplyDelete
  38. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. To activate the Roku TV, it is fundamental to find the Roku link in the first place. As a matter of fact, the account you have on Roku will have definite information regarding the devices you own and the channels you install. Here are the methods to find the code from the My roku account.

    ReplyDelete
  39. This comment has been removed by the author.

    ReplyDelete
  40. Hello,

    I liked your blog very much it is very interesting and I learned many things from this blog which is helping me a lot.

    Thanks a lot!

    UV Lamp Supplier

    ReplyDelete
  41. This is an informative post review. I appreciate your efforts and all the best. I am so pleased to get this post article and nice information. I was looking forward to getting such a post which is very helpful to us. Best Steam Presses A big thank for posting this article on this website.

    UV Lamp Manufacturer

    ReplyDelete
  42. Nice post just want to say thanks for your wonderful post, it is contain a lot of knowledge and information that i needed right now. I wanna tell you that if you want to get more fun and enjoyment then visit Garmin Express and get more fun. Thanks for sharing!

    ReplyDelete
  43. Hi, I read your post and found it quite interesting. The post you shared is very unique and informative. Thanks for sharing such a useful post. For more information visit on Garmin.com/Express.

    ReplyDelete
  44. I saw this very good post of yours and I liked it very much, I do not know how to praise it, I would just like to say that this post is one of the posts that I like very much and I am very happy to see these posts.
    escort service gurugram
    call girl gurugram
    Gurugram Escorts
    Gurugram escorts

    ReplyDelete
  45. Thank you for the post it was really nice. I always like to read your post. There are very easy and simple steps for fubo.tv/activate by our expert. For more detail visit our website or call our toll-free anytime 24x7!

    ReplyDelete
  46. Need an hacker for hire? need to keep an eye on your spouse by gaining access to their emails?, want to know what your kids do on social networks? Whatever it is, Ranging from Bank Jobs, Flipping cash,Taxes. He can get the job done. Are you looking for help hacking into social media? change of grades? help with projects management hacking, social media hacking- Contact him via: (hackingsetting50@gmail.com)

    ReplyDelete
  47. Need an hacker for hire? need to keep an eye on your spouse by gaining access to their emails?, want to know what your kids do on social networks? Whatever it is, Ranging from Bank Jobs, Flipping cash,Taxes. He can get the job done. Are you looking for help hacking into social media? change of grades? help with projects management hacking, social media hacking- Contact him via: (hackingsetting50@gmail.com)

    ReplyDelete
  48. I appreciate your article. You truly share relevant and extraordinary knowledge. Thank you for keep sharing these valuable thoughts.

    38 WATT DC/DC CONVR : 494GC : ALCATEL-LUCENT
    AC-DC PWR UN 950W : ES660C : ALCATEL-LUCENT
    208/240 V0LTS AC-DC : 364A3 : ALCATEL-LUCENT

    ReplyDelete
  49. Thrifty Deals UK awesome communication. Package in perfect condition and exactly what expected.I am having some of Uk best deal through thriftydeals you can enjoy this offers and can send gifts With Discount Coupon to any of your relative.

    ReplyDelete
  50. Ayo Daftar Sekarang, Nikmati Freechip Berlimpah Setiap Hari... Join Disini Banyak Jenis Permainan Taruhan Online Terbaik, Kunjungi Website Kami Di Klik Disini dan Dapatkan Bonus Terbaru 8X 9X 10X win klik disini untuk mendapatkan akun Sabung Ayam anda dan Bonus Berlimpah.

    ReplyDelete
  51. The team of Sanjarirecycling is the organization occupied with sewage and profluent treatment since 2010. Our past experience of 6 years profluent treatment and recycling had helped us in awesome extent. With inventive specialized coordinated effort we had figured out how to streamline our procedure of electronic waste recycling. We likewise figure out how to deliver 0% unusable material from our recycling procedure. We are top E-Waste Recycling Company in Mumbai clinets who has dedicated a e-waste collection centre at Mumbai. We have the cooperation with Door to Door accumulation organizations that go to your place and take your electronic scraps free of cost and for some situation even pay you back after assessment of your item at our office. The cash straightforwardly goes to your account provided to us.

    ReplyDelete