Remix.run Logo
aaronblohowiak 14 hours ago

What’s the deal with 5v, 3.3v and 24v “standards” for sensors? It seems like there are really three different markets and it sucks because crossing “lanes” is really annoying. I like how you all made the qwik connectors “just work”, but now that I’m trying more industrial stuff I’m having a hard time figuring out how to get my 24v world to play nicely with the 3.3v world but of course my 24v world only wants to do SPI over 5v.

Anyhoo, sorry we can’t just stick to the technical drama.

analog31 an hour ago | parent | next [-]

At least going between 3.3 and 5 Volts, they depend on the fab process used to make the chip. Fab capacity is more widely available for the lower voltages, making it inconvenient to keep supplying higher voltage chips. It has also gotten easier to do high performance analog at lower voltages.

Yeah, it's a pain. Many of my boards have both 3.3 and 5 Volt rails. There are quite a number of level-shifting logic buffers, for instance that are powered by 3.3 but accept 5-V inputs with no penalty.

For hobbyist type stuff, a 3.3 V CMOS chip will accept a 5 V logic signal if you feed it through a series resistor, since the built-in protection diodes of the CMOS chip will clamp the voltage. Don't let the engineers catch you doing it. ;-) But I often use a series resistor to provide a little bit of overload protection to a CMOS input.

Little or no logic ever operated at 24 V, other than relays. There's always some level translation needed there. The higher voltage follows the same rule as electric transmission lines: Correspondingly lower current allows for thinner wire, of importance if you're driving something like a solenoid valve.

roland35 14 hours ago | parent | prev | next [-]

Those levels are based on the electronics themselves. Earlier circuits used TTL which needed higher voltages to signify a "High". Newer CMOS based electronics need less voltage.

Lower voltages help with power savings. Higher voltages can and do work better in high power, high noise environments though! 24V as you see is still very popular and useful inany applications.

ptorrone 14 hours ago | parent | prev | next [-]

great question! so historically microcontrollers (and sensors) were 5V 'CMOS' power and logic. this was way better than the up-to-12V for TTL logic but over time the desire for higher clock speeds / faster IO / lower power means the voltage needs to drop (since power = current * voltage lower voltage is lower power) the next voltage standard became 3.3V. these days, even 3.3V is a 'bit high' and we're seeing lots of device that are 1.8V or 1.65V or even 1.2V max (yeek!) one thing we do for all of our sensor breakouts is add level shifting up/down as necessary so they work with EITHER 5V older boards (yay no need to throw them out!) or with the newer 3.3V boards (woo forward compatibility) level shifting and regulation also reduces the risk of damage from over/under volting or plugging stuff in backwards. this is documented here: https://learn.adafruit.com/introducing-adafruit-stemma-qt/st...

maybe someone from sparkfun could post advice for you here too...

aaronblohowiak 14 hours ago | parent [-]

Ooh thank you! I often forget that everything is a capacitor/resistor/inductor all at once and i see how at higher frequencies that starts to matter! I think the 24v stuff is also more low frequency signaling over longer distances so rise/fall time is less of a worry but voltage drop / noise is perhaps more of one. Thanks!

Fwiw, I’m team adafruit on this. Hope it works out for y’all

mschuster91 14 hours ago | parent | prev [-]

> What’s the deal with 5v, 3.3v and 24v “standards” for sensors?

Historical garbage and different manufacturing technologies. Be happy if you can get away with only 5V and 3V3 rails in your project. 24V is usually to interface with industrial sensors. And sometimes you see 12V as well, for stuff that's RS232 based.

And on top of that you got a fifth standard, 4..20 mA current loops. That one is used for long range transmission of analog values of a single sensor per wire pair, with 4-20 mA being seen as the value (4 mA = 0%, 20 mA = 100%), and anything less being seen as a cable break, anything higher as a short circuit somewhere.

gmueckl 13 hours ago | parent | next [-]

4 to 20mA signaling is only the start of a very specific rabbit hole. Someone had the brilliant idea to encode digital signals on top of the analog current loop. The result is the HART communication protocol, which is old, bloated, confusing, quirky - and it is really popular in industrial automation.

johnwalkr an hour ago | parent | prev | next [-]

Those voltage standards are kind of meant for very local things. If you really get into industrial things, one should look to industrial standards that work over longer distances. That is things like RS422, RS485, and increasingly industrial versions of ethernet that use differential signals. One should also learn what a PLC is and understand that in an industrial context, implementing controls in an Arduino or rpi is probably reinventing the wheel to achieve less reliability than industry standards.

4 to 20mA sensors are great. Invented in the 50s (!) to replace pneumatic controls and to this day work great. iirc they are usually 24V these days. You missed an important detail; the first 4mA (96mW) powers the sensor/local microcontroller (no local power supply required), and the remaining 4-20mA gives a calibrated current output for voltage/pressure/whatever you are measuring. If the output is less than 4mA or more than 20mA you know something is wrong (and many devices will output 20.1, 20.2 etc currents as a kind of fault code).

mmmlinux 13 hours ago | parent | prev | next [-]

don't forget 0-10v and 2-10v analog signals.

HeyLaughingBoy 7 hours ago | parent [-]

Never used 2-10V but I learned about 0-10V when someone approached me to design a device to input 0-10V position signal and output two phase-shifted sinusoids to retrofit to a controller that only took resolver inputs. We shipped a couple dozen of them to repair broken machine tools. Fun project, but not going to get rich from it!

I'm guessing that the 2-10V is to detect line break conditions?

aaronblohowiak 12 hours ago | parent | prev [-]

Ah yes, I was wondering why my ClearCore supported that, seemed oddly specific!