Reading Sensor Pressure from Analog output
-
@developeralgo222 I would have a thought that a voltage divider would be fine for this sort of application (reducing the range of an analogue voltage), after all that is exactly what is used to measure the supply voltage on a Duet board. Do you have a reference that gives details as to why a divider would not work?
-
@developeralgo222 @dc42 says
U is limited to the range -20.0 to +20.0. V is limited to the range -0.2 to +0.2.
If this range isn't big enough, let us know, though it sounds like the voltage conversion isn't quite working correctly.
Ian
-
@droftarts
Thanks Ian, i have tried connecting directly & through a level Shifter and none seems to work correctly .I am sure i am not the only one who has dealt or is dealing with this issue on Duet3 boards.
How to correctly read Pressure Sensor values either using a Digital NPN output signal ( 1 =True , 0=False) or Analog Voltage/Current Signal output ( Variable range ). i have made the connections and double checked everything but can't get it to work on Duet3 Boards but it works great on my Arduino and other boards no issues at all.
-
@gloomyandy , Voltage divider is simple and works most of the time (Dividers tend to be unreliable sometimes when you need accuracy ) but i have 6 sensors that are connected and are being used as Vacuum Pressure Sensing Actuators for my Pick-and-Place machine . i need high accuracy and robust reliability , that's why i used a Voltage Level Shifter
-
@developeralgo222 Have you actually measured the voltages on each side of the level shifter you are currently trying to use? That is really the first step and should be easy to do.
-
@gloomyandy Yes i did before i plugged everything in . 5V on the High side and 3.3V on the low side. Let me just do it again to see if that changed with the load
-
@developeralgo222 You need to do it at various different pressure readings so we can see what the transfer function of the level shifter looks like.
-
@gloomyandy , ok will do that. Quick question, Do i need to connect a 10K resistor between the 3.3V converter source i.e Tie VA(3.3V) to OE then to 10K resistor to GND as per the TXS0108E Datasheet ?
-
i need high accuracy and robust reliability , that's why i used a Voltage Level Shifter
The level shifter you want to use is inappropriate for the task: as @gloomyandy says, the TXS0108E translates logical (i.e. ”binary”) signals from one voltage level to another one. Please study the data sheet to understand what this device is intended to do. On page 17, they say explicitly what they do to your analog signal:
When transmitting data from A-ports to B-ports, during a rising edge the one-shot circuit (OS3) turns on the PMOS transistor (P2) for a short-duration which reduces the low-to-high transition time. Similarly, during a falling edge, when transmitting data from A to B, the one-shot circuit (OS4) turns on the N-channel MOSFET transistor (N2) for a short-duration which speeds up the high-to-low transition.
So, they don’t shift an analog voltage to another level, instead, they try to detect flanks and sharpen these for better digital signal quality. For your use case, that’s the opposite of ”high accuracy”.
A simple voltage divider is what you need. Using high-quality resistors, these are very accurate and highly reliable. I really have no clue why you disqualify them as ”simple but not robust”. The contrary is true. Towards @gloomyandy, you mention three alternative solutions: ”Zener Diode Clamp” and ”Opto-isolator”. Both are counter-productive: With a Z-diode, you can clip (or limit) a voltage, an opto-isolator is highly non-linear. Your preferred solution, a ”Bi-directional Logic Level Shifter”, falls in the same category.
If you don’t like voltage dividers at all, there is an alternative: Op-Amps. But designing a circuit with several discrete components is a major task and not worth the effort: any added accuracy is easily ruined by the subsequent A/D conversion on the Duet controller or by temperature shifts along all components in the signal path.
-
i can't seem to get a good voltage divider to purchase that can handle 6 outlets. Do you have any link of any voltage divider that can do that and is being sold anywhere ? i don't have time to design one at the moment
-
i can't seem to get a good voltage divider to purchase that can handle 6 outlets.
I’m not aware of a commercial product either. Just mount 12 resistors on a perfboard - that’s it.
-
@developeralgo222 if you don't need isolation between the sensor and the Duet, just use 2 resistors as a voltage divider.
A better solution would be to use sensors that provide a digital interface that the Duet can use, for example Modbus RTL via RS485. You cold put all 6 sensors on the same RS485 bus provided that the sensors provide a way to set then all to different slave addresses.
We have a small number of prototype 2-channel ADC daughter boards designed for reading 0 to 10V signals.