Go Down

### Topic: Output TO ANALOG or DIGITAL, that is the question (Read 2015 times)previous topic - next topic

#### ShowerMaster

##### Nov 29, 2013, 04:41 pm
Hello!

I am measuring the water level in a 10in tall bucket and converting it to LEDS that light to the corresponding level.  To do this I'm using a 0-.3psi amplified pressure transducer (SM5852-003-G-3-L).
The amplified pressure sensor that will output both ANALOG (.5 to 4.5V) and DIGITAL.  My question is whether there is any advantage to using the DIGITAL output?  The ANALOG seems straight forward but if there is an advantage to using DIGITAL I may tackle that.

Thank you.
Ken

#### robtillaart

#1
##### Nov 29, 2013, 06:05 pm
you must give more information to make a decision between the two.

Analog will probably fluctuate, digital can be different protocol, supported by arduino or not. etc.

so, tell us more!
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

#### jremington

#2
##### Nov 29, 2013, 06:29 pm
Does that pressure sensor have the appropriate range? If the bucket is full and the pressure sensor is at the very bottom, ten inches of water provides pressure (0.434 psi/foot)* (10 in/12 in) = 0.36 psi.

#### dgar

#3
##### Nov 29, 2013, 07:28 pm
... go for digital! easy to read 5800 series devices on Arduino and have not to worry of linearity issues, as all of these are taken accounted of by the device.

#### ShowerMaster

#4
##### Nov 29, 2013, 10:34 pm

Does that pressure sensor have the appropriate range? If the bucket is full and the pressure sensor is at the very bottom, ten inches of water provides pressure (0.434 psi/foot)* (10 in/12 in) = 0.36 psi.

I know it's slightly over the full range but the next range up is 0-.80 psi.  I'd be using half the range so my error will be higher.  Not that it makes a huge difference.  We're talking shower fresh water bucket.  I assume if it goes over-range it will simply continue to provide the max 4.5v out.  We'll see.

#### michinyon

#5
##### Nov 30, 2013, 09:45 am
The "digital" output could mean several things.

It might be an actual measurement value,  encoded as a digital number.

Or it might just be an "on" or "off" signal,  depending on whether the pressure is above or below some amount.

#### robtillaart

#6
##### Nov 30, 2013, 11:44 am
found datasheet - http://totem-dcs.web.cern.ch/totem-dcs/index.php?dir=E.03.05.05&file=03.SM5812_-_SM5852.pdf -

Digital seems to be I2C, so go for that.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

#7

#### BobMoore18

#8
##### Mar 09, 2017, 02:53 am
Good luck communicating with that sensor. There's shifting of the MSB and LSB that needs to be done in your software. I don't have the sensor yet, but it's on the way. I plan to release a library for it. I'll probably sell it to Silicon Micro Devices for a  small fee. People are having a hard time communicating with the SM5XXX series. Coming soon.....

#### BobMoore18

#9
##### Mar 09, 2017, 03:20 am
The reason that digital is probably better in your case is the fact that within the sensor chip, there is an ASIC module that converts the signal at a higher bit resolution than the ADC on the arduino can achieve. 10 bit vs 11 bit. You get twice the precision if you use the digital, but it might be possible to get higher (12bit) precision if you use an external 12bit ADC. The sensor uses an internal 12bit DAC to output the final analog signal, so I think 12bit is the absolute best precision you can expect from the sensor itself. You can also read temperature from this as well.

#### Delta_G

#10
##### Nov 03, 2017, 11:15 pmLast Edit: Nov 03, 2017, 11:15 pm by Delta_G
The code link is in the description, but it's not free ; )
If anyone has a copy of the protocol send it to me and I'll write you a free version.  This is an open source community after all.
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

#### BobMoore18

#11
##### Nov 17, 2017, 01:58 amLast Edit: Nov 17, 2017, 05:11 pm by BobMoore18
https://youtu.be/Xb2J1puSOwk
The link to the free and donate downloads are in the description as well as the website from which the sensor was purchased. This took me a while to figure out, so please donate if you feel inclined.

This is the serial print example only. Enjoy.

Go Up