msheald
Posts: 51
Joined: Sun Dec 31, 2017 7:45 pm

Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Thu Mar 22, 2018 10:33 am

Hello! In my project, I have 7 (and probably more in the future) sensors that will input data to a Pi zero. They work at 3.3 Volts.

I have several machines that run on 12 volts that the Pi will switch on in response to the sensors. Their circuits are optically isolated from the Pi.

I thought that I might use the 12-volt power supply and a Buck converter to get the 3.3 volts in order to run the sensors so that they do not draw power from the Pi Zero. However, I am concerned that, if the Buck converter fails, there would be a 12-volt surge into the sensor and then to the Pi. While the sensors may fail with the voltage surge (and thus protect the Pi), I would like to put some sort of fail safe into the circuit if possible to protect the sensors and the Pi Zero.

Is there anyway to protect the Pi Zero and sensors from a 12-volt surge in case the Buck Converter fails? Or is this just a bad idea and I should run all sensors from one of the 3.3-volt GPIO pins?

Thank you and best regards.

Mike

PiGraham
Posts: 3115
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Thu Mar 22, 2018 10:50 am

You could opto-isolate the sensor signals to keep the 12 well away from the Pi..
But you might do better to get a good quality PSU. If you are concerned to get high reliability you should consider all sorts of failure. What is the Pi fails? What is individual sensor fails? What if the actuators the Pi controls fail?
I can't recall having a PSU fail in normal operation. I think most are pretty reliable. Chances of input to output shorts would be very low unless it's very badly designed. Go for one with input to output isolation.
A PiZero is hardly a high value component. What happens if it does get fried?

msheald
Posts: 51
Joined: Sun Dec 31, 2017 7:45 pm

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Thu Mar 22, 2018 2:28 pm

Thank you!

I totaled the draw of the sensors at present - about 50 mA.

Would something like the following provide some protection against failure of the Buck converter?

Place 0.2 amp fuse in line between the buck converter and the load. Place a 5.6 volt Zener diode (in case future sensors need 5V) between the positive and negative wires of the circuit, or between the two output terminals of the Buck converter.

So, 12 volt to 3.3 volt via Buck converter. The 0.2 amp fuse in the positive line to the sensors and the Zener diode between the positive and negative lines.

Best regards.

Mike

PiGraham
Posts: 3115
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Thu Mar 22, 2018 2:41 pm

I wouldn't bother with that.
Isolated DC-DC and maybe opto-isolators on the signal lines if you really want to go overboard.

Obviously, if you are going to that much trouble for the sensors you should do the same for the Pi. Make sure the PSU is isolated type.

msheald
Posts: 51
Joined: Sun Dec 31, 2017 7:45 pm

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Thu Mar 22, 2018 4:52 pm

Thank you for your note.

I am concerned that I may be approaching the limit of the current that the Pi Zero can provide to my sensors - 40 mA with 50 mA being the limit of the 3.3-volt rail?

If so, I thought it might be prudent to try to off-load the sensor current load to another source, but then I have the problem of ensuring that my current 12-volt source (currently optically isolated) does not pose a threat to the system if I use a Buck converter to obtain a 3.3-volt circuit or whether I should create another optically isolated circuit that uses a 3.3-volt power supply. The former is easy since I have the system made, the latter would just take some time and soldering since I have the components; I would just need to purchase the 3.3-volt power supply.

Thank you and best regards.

Mike

PiGraham
Posts: 3115
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Thu Mar 22, 2018 5:18 pm

I would think you just need isolated buck converters to regulate from 12V to 5V (Pi) and 3.3V (sensors).
Either two DC-DC units or one dual rail.

But then again you haven't specified what the 12 supply is like. Is it nicely regulated DC from a mains powered switch mode PSU or is it sn unstable noisy spiky supply like a vehicle electrical system?

In any case I don't think injection of 12V onto 3.3 or 5V outputs is a problem for an isolated DC-DC. Isolation will protect against thousands of volts. There should be no path for 12V to reach the outputs.

msheald
Posts: 51
Joined: Sun Dec 31, 2017 7:45 pm

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Thu Mar 22, 2018 6:30 pm

Hello! Thank you for your note.

I'm sorry, I did not specify the 12-volt supply. It is a regulated supply, but is only used to drive my 12-volt equipment (telescope, camera, etc.) Ig does not feed the Pi. The Pi has its own supply, and the 12-volt supply is completely isolated from the Pi.

However, if I use the 12 volt to bring off a line to step down to 3.3 volts in order to feed the sensors, the 12 volt supply will no longer be isolated from the Pi - the circuit would go through the sensors and then down to the GPIO. If the Buck converter never fails, no problem. However, if it fails, then the 12 volts may go into the GPIO.

So, if I am interpreting these comments correctly, if I use the Buck converter to obtain 3.3 volts from the 12 volt supply, I should probably isolate that 3.3 volts as well.

Is this a correct synopsis?

Alternatively, I can use a 3.3 volt power supply to drive the sensors. This should create no difficulty for the GPIO input from the sensors since the circuit can only go to 3.3 volt.

Thank you and best regards.

Mike

User avatar
davidcoton
Posts: 2850
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Thu Mar 22, 2018 8:27 pm

There are two ways to provide protection:
  1. Add a (poly)fuse and a 3V6 Zener diode on the output of the 3V3 converter. This is how the Pi 3B 5V0 input is protected -- as long as you use the microUSB power input.
  2. Opto-isolate every connection between 3V3 powered sensors and the Pi.
However, as several people have tried to tell you, if it is a well designed and built converter it should be isolated by the HF transformer, so a 12V to output failure is extremely unlikely.
The failure is equally likely with a separate mains to 3V3 PSU. If you are concerned enough to protect the Pi from 12V converter failure, you should logically be concerned about mains to 3V3 failure of a separate PSU.
"If it ain't broke, fix it until it is."
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”
The Pink Unicorn is a symbol of commitment to sensible discussion of future versions of the Raspberry Pi ™


Idahowalker
Posts: 181
Joined: Wed Jan 03, 2018 5:43 pm

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Fri Mar 23, 2018 12:38 am

msheald wrote:
Thu Mar 22, 2018 6:30 pm
the Buck converter
Consider the MTFB (Mean Time Between Failures) of the buck converter and how long the buck converter is expected to last. Perhaps a burn in test, of the buck converter under some kind of load, for a few weeks. Most electronics fails during the early stages of operation.

Perhaps monitoring the output voltage of the buck converter with an A to D converter and... Naa, this is electronics working at near the speed of light.

The buck converter will, most likely short, at near the speed of light, for a very, very, very few moments before it opens up to let the magic smoke seep out.

*shrug*
Being a programmer: She says go to the store get 1 bottle of milk, if they have eggs bring back 6. She gets mad cause I brought back 6 bottles of milk.

User avatar
davidcoton
Posts: 2850
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Fri Mar 23, 2018 12:51 am

Idahowalker wrote:
Fri Mar 23, 2018 12:38 am
Most electronics fails during the early stages of operation.
Really? You must be buying real rubbish. The accepted shape of the graph of number of failures against time is a "bathtub". There are some early failures, rapidly declining. Then a period of stability with few failures. Then increasing failures in the collective "end of life" phase. Most failures for well-designed and built electronics occur in this phase.
"If it ain't broke, fix it until it is."
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”
The Pink Unicorn is a symbol of commitment to sensible discussion of future versions of the Raspberry Pi ™

Idahowalker
Posts: 181
Joined: Wed Jan 03, 2018 5:43 pm

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Fri Mar 23, 2018 1:06 am

davidcoton wrote:
Fri Mar 23, 2018 12:51 am
Idahowalker wrote:
Fri Mar 23, 2018 12:38 am
Most electronics fails during the early stages of operation.
Really? You must be buying real rubbish. The accepted shape of the graph of number of failures against time is a "bathtub". There are some early failures, rapidly declining. Then a period of stability with few failures. Then increasing failures in the collective "end of life" phase. Most failures for well-designed and built electronics occur in this phase.
Yup.
Being a programmer: She says go to the store get 1 bottle of milk, if they have eggs bring back 6. She gets mad cause I brought back 6 bottles of milk.

User avatar
KLL
Posts: 1431
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Fri Mar 23, 2018 2:02 am

davidcoton wrote:
Fri Mar 23, 2018 12:51 am
Most failures for well-designed and built electronics occur in this phase.
may i rephrase it:
Most failures are well-designed
like the cheap LED bulbs, all work from the beginning and now after one year 6/15 needed replacement.
* * someone ever checked if the LEDs fail or the powersupply "buck converter?" photo board
Last edited by KLL on Fri Mar 23, 2018 7:56 am, edited 1 time in total.

User avatar
rpdom
Posts: 12308
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Fri Mar 23, 2018 6:00 am

KLL wrote:
Fri Mar 23, 2018 2:02 am
davidcoton wrote:
Fri Mar 23, 2018 12:51 am
Most failures for well-designed and built electronics occur in this phase.
may i rephrase it:
Most failures are well-designed
like the cheap LED bulbs, all work from the beginning and now after one year 6/15 needed replacement.
* * someone ever checked if the LEDs fail or the powersupply "buck converter?" photo
The cheap LED bulbs that I use have a capacitive dropper, not a buck converter. Of the 12 or so I have, two didn't work at all and one failed after a couple of days. The rest have been running for a few years.

msheald
Posts: 51
Joined: Sun Dec 31, 2017 7:45 pm

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Fri Mar 23, 2018 10:21 am

Hello! Thank you for the replies. I have inexpensive Buck converters on hand, so that is why I wanted to protect against their failing.

After considering what I wanted to do (protect the Pi Zero and sensors and be able to switch the sensors on/off even with the Pi on 24/7), I thought it cheaper to buy a 3.3 volt AC-DC converter and some simple switching modules that us the RFP30N06LE Mosfet. Cost about $10 for several switches and the converter, about what I would pay for some Zener diodes and appropriate fuses since I don't have those components.

With this, there will be no voltage issue since it will be 3.3 volts. If the AC-DC converter fails, I believe it won't transmit current, unlike a Buck converter. And, I'll be able to switch the sensors on/off should I desire to do so, which I would no have been able to do with the Buck converter without adding the RFP30N6LE circuit in any case.

Thank you again for everyone's guidance. Best regards.

Mike

PiGraham
Posts: 3115
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Usng 12 Volt Stepdown to 3.3 volts to Power Sensor - How to Protect the GPIO Input in case of Stepdown Failure??

Fri Mar 23, 2018 11:38 am

msheald wrote:
Fri Mar 23, 2018 10:21 am
If the AC-DC converter fails, I believe it won't transmit current, unlike a Buck converter.
I think you don't understand switchmode power supplies (SMPS).

Whether you get 3.3V from deadly 240Vac or 12Vdc it should work fine if you get well designed and made SMPS.

Return to “Beginners”

Who is online

Users browsing this forum: ayeem and 11 guests