Distance measurements into Mervis

Suntherm
Posts: 11
Joined: Mon Feb 22, 2016 11:40 am

Distance measurements into Mervis

Postby Suntherm » Thu Mar 10, 2016 12:16 pm

Hello team,

At SUNTHERM we're using the Unipi together with Mervis to control our heating system. As part of this system we need to monitor the waterlevel in a tank.
For this purpose we intend to use a HC-SR04 based ultrasonic device like this:
http://www.modmypi.com/blog/hc-sr04-ultrasonic-range-sensor-on-the-raspberry-pi

How do I connect the 4 pins to the Unipi, when the GPIO header is used by the board to board connector?
How do I import the value from python into Mervis as a global variable?

Looking forward to some valuable input:-)
Morten Veis Donnerup

SUNTHERM
Innovative heating and storage system
tomas_hora
Site Admin
Posts: 298
Joined: Wed Oct 29, 2014 9:56 am

Re: Distance measurements into Mervis

Postby tomas_hora » Mon Mar 14, 2016 8:01 am

Hello,

I am afraid that this piece of HW cannot be used with Mervis because you need the exact time of the pulse from the sensor. Mervis is not a perfect solution for that because the DI are not read that often.

Br,
Tomas
Suntherm
Posts: 11
Joined: Mon Feb 22, 2016 11:40 am

Re: Distance measurements into Mervis

Postby Suntherm » Mon Mar 14, 2016 9:42 am

Hej Tomas,

Thank you for the response.
Would it be more suitable with a device like this:
https://www.adafruit.com/datasheets/1786_Chemical_eTape_Datasheet.pdf

Connected to Analog input?

rgs Morten:)
Morten Veis Donnerup

SUNTHERM
Innovative heating and storage system
tomas_hora
Site Admin
Posts: 298
Joined: Wed Oct 29, 2014 9:56 am

Re: Distance measurements into Mervis

Postby tomas_hora » Tue Mar 15, 2016 8:30 pm

You can use the first simple voltage divider schematics for reading resistance with UniPi 1.1. Below is a schematics with values calculated for use with sensor with 400-5000ohm resistance.

Also please remember that the onboard 12V might not be stable enough for using for such purposes!

https://files.unipi.technology/index.ph ... uk6tMtL07M

Return to “Mervis”

Who is online

Users browsing this forum: No registered users and 1 guest