Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!




Physical connection...
 
Share:
Notifications
Clear all

[Solved] Physical connection between sensor-ADC-RaspberryPi

4 Posts
2 Users
0 Likes
1,217 Views
(@ranjanpal)
Eminent Member
Joined: 3 years ago
Posts: 15
Topic starter  

Hi,

I want to connect a current sensor (which is an analog sensor) to RaspberryPi via an ADC.

On the current sensor there are 4 ports as shown in attached figure.

 

 

+5V on sensor --- connected to ---- +5V on RPi

gnd on sensor --- connected to ---- gnd on RPi

My query is, what do these "out" and "o/c" pins mean?

Also,out of "out" and "o/c", which will get connected to my ADC input pin?

If somebody could please let me know these, I would be very much appreciative.

This topic was modified 3 years ago by ranjanpal

   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2654
 

With the help of Google I found this:

+5v : 5v Supply
gnd : Supply Ground
out : Output Voltage proportional to current, 11mV/A for 5V supply
o/c : Over-Current Detection Digital Output, Low on Over-Current, High otherwise

Current=(Vout-2.5)/0.011

Note: Over Current can be detected by adjusting the preset for desired value of current [the blue potentiometer!].
Turn preset clockwise to increase current range and anti-clockwise to decrease current range.

On over current, o/c pin goes low and red LED glows. 

I also found this Arduino topic, this example at RoboJax, and this YouTube video.

 

 

So my best guess:

OUT goes to the analog pin (ADC). In the Arduino Topic they are discussing the math as well:

float scalefactor = 0.011;
float current = ((5.0/1024.)*AnalogRead(A0)-2.5)/scalefactor;

(scalefactor derived from spec sheet: 11mV/A with a 5V power supply)

O/C goes to a digital pin to detect over-current (normal = HIGH. over-current = LOW).
I'm pretty sure that it is not required to use this pin, unless you'd like to detect over-current of course.

 

Hope this helps ... 😊 


   
ReplyQuote
(@ranjanpal)
Eminent Member
Joined: 3 years ago
Posts: 15
Topic starter  

Hi Hans,

Thank you so much for your valuable feedback.

This was really helpful to me.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2654
 

Awesome! Glad I could help 😊 


   
ReplyQuote

Like what you see and you'd like to help out? 

The best way to help is of course by assisting others with their questions here in the forum, but you can also help us out in other ways:

- Do your shopping at Amazon, it will not cost you anything extra but may generate a small commission for us,
- send a cup of coffee through PayPal ($5, $10, $20, or custom amount),
- become a Patreon,
- donate BitCoin (BTC), or BitCoinCash (BCH).

Share: