RPi GPIO low - floating or low?

Hi all,

Just a quick question that a google search hasn't been able to clarify, if I use an rpi-gpio out node and set it to low, is it really held low (by means of the internal pull-down resistors) or is it just floating?

I have a project that I've been switching relays with and the relay contacts are spent. I'm swapping out to SSRs today and just wondering if I need to bother with external pull-down resistors.

Supposedly they are held low but in actual experience if you really want them high or low , set that in the pin setup and then use a pull-up or pull-down resistor externally.
[Edit] I don't bother with resistors on the SSR's I use and they have worked fine for several years

Pullup or pulldown resistors are used on inputs.
Settings output 0, pin is connected to ground.
Settings output 1, pin is connected to 3.3v.

1 Like

Great thankyou, good to have that clarified!

Project is up and running again with SSRs substituted.

Just a bit off topic, but what kind of longevity did you get out of the mechanical relays? Also how often were they triggered? I have some in a project that has been going for about 1.5 years now, but not sure what to expect of them (nothing critical of course).

The life of the relay contacts depends on the spec of the relay and characteristics of the load being switched. Plus the switch rate of course.

I have some Sonoff Basic (rated at 10A ac if I remember correctly) that are running at about half that load, switching several times an hour, that have been going for years. Generally if you stick to about half the rated load, are on ac, and am not switching inductive loads then they should last for a very long time.

Okay thanks. They're only for a grow light and a pump that switch on and off about once a day, so I don't think I've got anything to worry about.

I would've seen less than a couple hundred cycles before the one that switched the heater started sticking. Let's say 8 weeks in service with a dozen cycles a day on average something like that.

By the time I got to replacing them they were not just sticking, but properly cooked. Couldn't get them to release even tapping them. That was the 9.5A heater relay which was just an element of course, no inductive load. The 2A compressor motor relay stuck several times too.

The vents are obviously a low current load I never measured them, but they never stuck and never failed to vent the excess heat luckily. Expensive to be throwing heat out the wall though

What relays were you using?

Just a cheap 8 channel relay board I don't know what brand. Chinese, rated for 10A.

These are the contacts, I opened one after I got them replaced.

I've bent the armature up to show the contact.

what is the voltage of switching load and ac or dc ?
For ac there are thyristor solutions.

There are numerous ways to switch loads, for a long time I used home grown solutions with JFET's, diodes, thyristor's, or big relays with elaborate trigger circuits and they all worked and were reliable. Most of them were an exercise to see how to do it. If you want to walk that road go for it. You will learn lots. Otherwise if these are "necessary" projects, KISS. There are lots of off the shelf SSR's to switch most anything and they work on 3.3 v inputs. I have a couple switching 220 volts AC at 40 amps. Work great. Others switch DC loads. Do what works for you.

As I said earlier, if you want to switch 9.5A then using a cheap 10A relay may well be a bad idea. Use something rated at nearer 20A.
The 2A compressor may have massive inrush current, or may have a significant inductive component, in which case you would need a protective circuit at the contact. This link may be helpful with this.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.