Connecting Sensors to 3.6

Status
Not open for further replies.

Shekari

New member
Hi! I'm an engineering intern working on project to produce a system to measure some variables for our production process. My intention is to use 2 pressure sensors and temperature/humidity sensor wired up to a Teensy 3.6, which record data to an SD card for about half an hour.

Right now I'm having issues with connecting the sensors I've purchased with the Teensy 3.6, and I'm struggling with how to solve the issue.

The sensors I'm using are:
A pressure transducer;
www.efe-sensor.com/pdf/tcpdf/examples/efe.php?model=PHT167 With a 0.5-4.5V output, I'm wiring this with a voltage divider consisting of a 1k and a 2k resistor, which should reduce the voltage to a 3V max?

A combined temperature and relative humidity probe;
https://www.rotronic.com/en/hygroclip-xd.html With a 4-20mA output, I've wired this with a shunt resistor of 150Ω, which should translate the current signal to a 3V max?

Both of these sensors required external power, so I'm using an 11v Li-Ion battery pack to power them.

For the time being I'm using the example code AnalogInOutSerial, as this should allow to me to read some signal from the sensors, even if it isn't entirely accurate. The only value i'm changing on this is the value of the input pin I am using.

Currently when I try and read from either of the sensors, it seems to make no difference whether the sensors are connected or not. The serial plot value hovers around 600. I'm doing my best to determine the issues, but I'm having trouble working out where I'm going wrong at this point.

Attached is a screenshot of my intended circuit, currently I don't have the regulator or the LED's wired up, as I am just trying to get a sign that the sensors will work with the card.
I have also attached a screenshot of the wiring I'm using on the breadboard for the pressure sensor. This has a +11v wire to the top left, and 0v to the bottom left when running.

Hopefully some of this makes sense?

Thanks for the Help!
 

Attachments

  • Circuit Diagram.JPG
    Circuit Diagram.JPG
    104.3 KB · Views: 154
  • Pressure Circuit.JPG
    Pressure Circuit.JPG
    110.1 KB · Views: 180
Yes and yes on your voltage ranges (assuming for 1st probe you are measuring voltage across 2k resistor)

You mention using the example code AnalogSerialInOut. Did you modify it? (Post your code next time!) Note that this example specifies the analog input pin as A0. This is pin 14 on the Teensy 3.6. Your schematic indicates you have no connection to pin 14. In this case, it probably isn't too crazy to think you are getting ~600 on a floating input (about 1/2 the max count).

Suggestion: Take a step back, disconnect sensors. Wire up a simple potentiometer circuit powered by battery (or output of your voltage reg). Very the input signal by turning the knob. Make sure your physical input pin matches the one specified in your code (const int analogInPin = A0; // Analog input pin that the potentiometer is attached to...chage this if you wired to a different input. Does your ADC count now vary?

Lastly, note that powering a Teensy externally with batteries, you'll likely want to carefully review this page:
https://www.pjrc.com/teensy/external_power.html

Hope this helps. Good luck.
 
From your photo it looks like you are just pushing pins into the Teensy. This will NOT do, they need to be soldered!
 
Status
Not open for further replies.
Back
Top