Go Down

Topic: Help with Programming Arduino Uno to sleep and wakeup with FSR sensor (Read 3252 times) previous topic - next topic

Jack Christensen

#15
Dec 15, 2012, 11:57 pm Last Edit: Dec 16, 2012, 12:02 am by Jack Christensen Reason: 1

Thanks, Jack. I'm not totally surprised. If the voltage from the FSR when not pressed is quite high (eg. 4V) and when pressed is quite low (eg. 2V) then that effectively could be treated as a digital signal, because the digital inputs would have a "transition" zone (around 2.5V) where above that is considered high, and below is considered low.


Indeed, I've measured it, and I think the FSR is darn near an open circuit with no load (weight) on it, so I'd bet the pin is very close to Vcc (the project actually runs on 2xAA alkaline cells). Since the FSR actuations in my project are quite slow, I did use a fairly long debounce interval on it (100ms vs. 20 or 25 for the buttons), but I'm not sure that is really of any consequence. Just one of those serendipitous things, it still makes me smile :D

I used this FSR from Sparkfun if that makes a difference to anyone:
https://www.sparkfun.com/products/9376
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

zajebiscie


Thanks, Jack. I'm not totally surprised. If the voltage from the FSR when not pressed is quite high (eg. 4V) and when pressed is quite low (eg. 2V) then that effectively could be treated as a digital signal, because the digital inputs would have a "transition" zone (around 2.5V) where above that is considered high, and below is considered low.


Thanks for your help. I have one more question , how do i test to see if the arduino is at sleep or not. ?

PeterH


how do i test to see if the arduino is at sleep or not. ?


Do you mean how can your code test whether the Arduino it runs on is asleep or not? The answer is that it is awake.
I only provide help via the forum - please do not contact me for private consultancy.

Jack Christensen


Thanks for your help. I have one more question , how do i test to see if the arduino is at sleep or not. ?


You're welcome! I just used an ammeter to monitor the current drawn by the circuit.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Go Up