10508 questions

12508 answers


22025 members

0 votes
689 views 1 comments

Hi there, I'm Ivan and I hope everyone is doing well! 

I have a question on analog and digital inputs for the RUT955. 

I would like to use the RUT955 for 2 applications: 

1) Read the state of a mechanical pushbutton switch (currently proposing to connect it between RUT955 pins 1 and 6) 

2) Read the state of TTL signal from a water level sensor via RUT's analogue input pin 

Please find a circuit sketch-up as attached: 

The water level sensor is labelled as "TTL sensor" 

How the water level sensor works: 

- It will be connected to the same ground as the ground that is used to power the RUT955 

- When it is in contact with water, it outputs its VCC voltage (for example 5v) from its TX pin

- When it is not in contact with water, it outputs 0V from its TX pin

- This is in accordance with TTL serial communication 

How the mechanical pushbutton works: 

- It will be manually pressed 

It is intended to read the states of the digital input pin (DIN1) and analog input pin via gpio.sh

May I check if the components have been wired correctly and the RUT955 can indeed read the state of the TTL signal from the water level sensor via the analogue input pin (whether it is at VCC voltage or 0V) correctly? 

1 Answer

0 votes

Digital input should work without issues, once pushbutton is pressed, router's digital input states will change from open to shorted and vice versa.

For analog input, which uses  9 and 6 pins, it can be used to measure voltage or current, thus if sensor's TX pin can give voltage to router's analog input once there's contact with water, there should not be any issues monitoring water level with analog input, knowing that 5V reading will indicate the contact, while 0V - no contact.

You can also check wiki article for Analog input, for connection reference:

Best answer
Alright thank you Zilvinas!