0

I am developing simple project of water level alert when water reaches to a certain level (adjusted by user) in inches.

Which electronic component i should use where user can adjust inches?

Like 5, 6, 7 .... 20 inches.

I have searched a lot over internet and found Potentiometer can be used for this purpose. But it is not accurate and depends of input voltage/current etc...

I need smaller component because it will be used in 3x3 inches circuit board with Arduino.

Burhan
  • 1
  • What do **you** want to use? Potentiometer, potentiometer + display, encoder + display, up/down keys + display. Display can be LCD, OLED, LCD etc. – Spehro Pefhany Aug 05 '15 at 02:53

2 Answers2

1

A coded rotary DIP switch will allow the user to select discrete values (usually 10 or 16 different ones), but will use 4 GPIOs in order to read the selected value.

enter image description here

Ignacio Vazquez-Abrams
  • 48,282
  • 4
  • 73
  • 102
0

You want a BCD thumbwheel switch (sometimes incorrectly called decade counters):

enter image description here

Picture from How to read decade counter with minimum pins

You press the buttons to increment or decrement the number, and the number is output at the back in BCD. Unlike a rotary dip switch, they're much easier to fit to panels.

james
  • 1,662
  • 7
  • 12