Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

Physical Sensor termination on ADC-DAC Pi Zero

The ADC-DAC Pi Zero is a 2 Channel ADC and 2 Channel DAC for the Raspberry Pi

21/10/2021

Posted by:
agardner

agardner Avatar

Hi Everyone,

I'm looking to use the ADC-DAC Pi Zero with my Raspberry Pi4 to read the analogue output from the Sharp GP2Y0A41SK0F Analog Distance Sensor 4-30cm

From a physical connection point of view, is this as simple as:

1. Plugging in ADC-DAC to Pi Headers

2. Wiring the sensor as below

3. Coding in Python

forum image

Many thanks and apologies for the Newbie question.

Adam

21/10/2021

Posted by:
andrew

andrew Avatar

Hi Adam

According to the datasheet for the sensor, the output voltage can be between 0 and 5V. As the maximum input voltage on the ADC DAC Pi is 3.3V you will need to use a voltage divider between the sensor and the ADC input to reduce the maximum voltage down to a safe level.

We have a resistor divider calculator at Resistor Voltage Divider which you can use to find suitable resistor values. If you use a 1K resistor for R1 and a 1.8K resistor for R2 that would reduce 5V down to 3.21V making it safe to connect to the ADC input.

Using the above resistor values, in your python code, you will need to multiply the ADC voltage by 1.556 to get the correct voltage reading from your sensor.

21/10/2021

Posted by:
agardner

agardner Avatar

Thank you very much for your quick reply Andrew.


Would you mind rechecking the data sheet for me please? I believe the input is 5v, but the output maxes out at 3.3v (Third page shows the graph)



if that's the case, is my cable termination plan suitable? That is, voltage output of the sensor connected to In1 with the power and ground supplied to the sensor from the pins shown. I am assuming these are active and fed from the pi?



Thanks again and apologies for the basic questions. I'm still learning and have definitely had some expensive lessons when I fry things... :-)

21/10/2021

Posted by:
andrew

andrew Avatar

Hi Adam

You are correct, based on the graph on page 3 it should max out at 3.3v in which case you can connect the output directly to the ADC DAC Pi. The 3.3V, 5V and GND pins on the ADC DAC Pi are connected directly to the pins on the Raspberry Pi GPIO header.

On page 2 of the data sheet, it does show that the absolute maximum voltage for the terminal output is -0.3 to Vcc+0.3 where Vcc would be your 5V power supply voltage so if you have a multimeter it may be worth checking the output voltage to make sure it stays below 3.3V before connecting it to the ADC input.

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout