Go Down

Topic: Use same analog input for 2 sesnors? (Read 186 times) previous topic - next topic

Lumis

Hello it's my first project on arduino.

I'm trying to do digital air ride pressure gauge in my car.

I'm using 5 Pressure Transducers
4 for each bag and one for air tank.

I'm using arduino uno. And for display i bought 16x2 I2C LCD.

At first i thought that is good idea to have i2c lcd becouse it's only 4 wires to hook up. I'm willing to leave arduino in car trunk and wire up lcd to the dash.

But now I'm facing one problem: i2c lcd using 2 analog inputs and I need to connect 5 sensors.

What ways I have to connect last sensor? maybe i can connect multiple sensors connected to one analog input?

here is my scheme:


Paul_KD7HB

Perhaps you could describe you air ride system a bit more. Is each air bag independently inflated and then disconnected from the tank? The commercial ones I have seen are all continuously connected to the common air storage tank, which is kept at a set pressure by an air compressor. How is your different/

Paul

Lumis

#2
May 18, 2017, 11:24 pm Last Edit: May 18, 2017, 11:36 pm by Lumis
Perhaps you could describe you air ride system a bit more. Is each air bag independently inflated and then disconnected from the tank? The commercial ones I have seen are all continuously connected to the common air storage tank, which is kept at a set pressure by an air compressor. How is your different/

Paul
yeah, all bags is independent, in tank is pressure switch witch turns on/off compressor. then from tank 4 pipes to 4 solenoid valves from there pipes going to bags and in between bags and valves another smaller pipe going to analogue needle gauge. everything like in scheme below.

my point is to see pressure in lcd instead of needle gauge. At the moment I'm reading values from 4 sensors. Didn't tried in car yet. But seems it's working. Later if I can figure out how to write code my goal would be to have few buttons and have some presets. Like one button drops car to 0 psi another 50 psi on all bags, and third one 120 front 80 rear for speed bumps. I don't need any automatic management just simple presets.


Delta_G

Easy, get an LCD that doesn't use I2C.  There are some that will work off the serial line, or there are others that you make a parallel connection to.  The latter use up a lot of pins, but if you are creative (or know where to find my github) you can use a 595 shift register to communicate with it using the SPI bus.   There are tons of ways to drive an LCD, and you have the one style that won't work in your project. 
If at first you don't succeed, up - home - sudo - enter.

MasterT

#4
May 18, 2017, 11:39 pm Last Edit: May 18, 2017, 11:44 pm by MasterT
There is a "software I2C" library, that is using two digital pins for communication.

edgemoron

You could use an analog multiplexer and 2 digital pins to steer 1 of the 4 analog signals to 1 analog input.

Lumis

There is a "software I2C" library, that is using two digital pins for communication.
this one would be great but I can't figure out how to make it work. I downloaded soft I2c master but lcd not showing anything

Go Up