1

Im starting to get into Arduino a little. Ive got a Small project to start me off, To keep it simple its: 5 level Switches, 1 flow switch and 3 solenoid valves.

This question is for the Level Switches.

Now Im wanting to save Pins as I'm using a Arduino UNO. So would I be right to use the method ive seen around here a few times of Making a Resistance ladder.

Question is. 1- Will the method of using the same value of resistors (2k2) work? I dont think so..

As multiple "buttons" ie the flot switches will be pressed at once it will end up having no idea whats happening correct?, I need to be able to Identify each one (0%,25% etc etc)

If I was to use different vales of resistance would that make a difference ?

Cheers

2

Just look at this answer. When you press the LEFT switch, the SELECT button has no effect when pressed (i.e. it doesn't get detected, but also doesn't hinder detecting the LEFT button press). So in your case, you aren't really interested in the 0% button, when the 25% is pressed.

I wouldn't use same value resistors, as the resulting voltages would be non-linear, making it difficult to differentiate between the button at the far end ladder. If you'd use 2k2 everywhere, the voltages would be

  • 100% 0.00v
  • 75% 2.50v
  • 50% 3.33v
  • 25% 3.75v
  • 0% 4.00v
  • no value: 5v

In the answer provided above, voltages would be: 0, 0.71, 1.61, 2.47, 3.62, 5v

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.