Hi, I would like to read the value of a hall effect sensor, but at the same time I want to control two valves (just on and off) based in some condtions, and a timer. I am a newbie with Arduino and I am ready to learn but my question is, ¿all the arduino models support interruptions? (I think I will need them to do the job) I ask because this week I plan to order an Arduino UNO, the sensor and the valves and I don't want to learn that my configuration can't be done with this Arduino after I bough the stuff
How fast things happens in the hall sensor? I think using interruptions will be a little more complex than you expect and for only 2 valves it is better just to loop checking everything without using delays (check blink without delay sample)
eried:
How fast things happens in the hall sensor? I think using interruptions will be a little more complex than you expect and for only 2 valves it is better just to loop checking everything without using delays (check blink without delay sample)
You are right, the pulse of the hall effect sensor will be fast because I will use it to see if water flow through a pipe...
I need to determine when the flow start and when the flow stop, and using timers and contiions I need to open a valve for some time, then close it and then open another valve I am not really too interested in determine the ammount of water that is flowing through the pipe, thats why in another topic someone told me about a "flow switch" that only stays "on" if detect water through the pipe and "off" if there is no movement, the problem is that I found this hall effect sensor near my location and available and the other is located in China.
travis12:
You are right, the pulse of the hall effect sensor will be fast because I will use it to see if water flow through a pipe...
That's not fast at all! - if something mechanical is moving, that's glacially slow compared to a 16MHz processor. An extreme rotation speed of 10,000rpm is 167 revolutions per second is a hall-sensor pulse every 6ms or so. Interrupts can run 1000 times faster than this, individual machine instructions run at 96,000 times that rate. And your flow sensor will be running very much slower than 10,000rpm anyhow.