I plan on trying to use this SFR with a relay so after looking at the FSR Integration Guide I believe i should follow Figure 14 - "FSR Variable Force Threshold Relay Switch"
I will be using the FSR and an arduino to determine if my dog is in his house and if so to kick on a small heating pad with the use of the relay... When following the schematic of Figure 14 where does my arduino fit into this and do i have to set it up this way...??? It seems like a lot of stuff to make it work... I am very new to electronics so my understanding of schematics is limited...
Figure 14 is an operational-amplifier-based circuit that will close a relay when force is applied to the FSR. It uses the op-amp as a comparator where the comparison voltage is controlled by a potentiometer. This allows adjustment of the trip point for more or less force applied to the FSR. No microcontroller is needed, the circuit is complete in itself.
I've used an FSR just once, this one from SparkFun. I only wanted to sense a binary condition, i.e. on or off, force applied or not. I was prepared to design some sort of interface circuitry for the FSR, but then was amazed when I discovered that I was able to treat it exactly like a tactile button switch. I used the exact same code, and a digital input on the Arduino with the pullup resistor enabled. So no additional hardware, and for me this works very well indeed. Maybe I got lucky, YMMV, but it's certainly worth a try!
[quote author=Jack Christensen link=topic=74751.msg563369#msg563369 date=1318103087]
I've used an FSR just once, this one from SparkFun [/quote]
That is the exact one i plan to use...!!! Is it a good one to use??? Do you tink if i put it under a piece of linoleum flooring it will be able to determine if my dog is in his house??? How long do you think it will last? Finally I probably have to run a pretty long wire from the arduino to the sensor... Anywhere from 2 - 5 feet. Are there any special considerations i need to make to account for this long of a wire?
Thanks for the reply too... Its good to hear from someone who has actually used this to have some insight on it's performance...!!!
This brings up another question... How exactly do these work...? If it says it will sense pressure from 1 lbs to 25 lbs and the dog is 5 lbs and i have 2 lbs of bedding always over the sensor will I be able to set the sensor to kick on the heating pad if it senses pressure over 5 lbs or does it just measure pressure or no pressure...???
Sorry it took me a while to have time to mess with my FSR but I am working on it today and have a question... IF i want to simply hook it up to my arduino to see what reading it will output how can i do this...???
It has two pins so does one go to analog input and the other to ground...??? Do i need any caps or resistors or anything...???
It has two pins so does one go to analog input and the other to ground...??? Do i need any caps or resistors or anything...???
Yes you need a resistor from the input to the +5V to pull up the signal.
Experiment with the value, as a start measure the resistance of the sensor and then make the pull up resistor close to that. Note you won't get the full 0 to 1023 range out of a sensor wired like this but it is the simplest way to do it.
The larger value the resistor the more range you get but the less stable will be the reading.
The only way i can get it to work is when I connected one side on the FSR to analog in on the arduino and to ground via a 10K resistor and the other side of the FSR to +5... ??? I have changed the value of the resistor and it produces different readings, but it si all over the place so I wanted to ask if it is set up right...??? From what you said it sounds like I have it wrong...
Well you sound to have it upside down to what I said, that is you should swap the ground and +5V connection, but there is no reason why wiring it up your way would cause the reading to be:-
all over the place
so there must be something else wrong as well.
I assume you mean that the reading fluctuates over a very wide range without any change in input pressure.
This is what happens if you have not got the ground connected, or indeed you are reading the wrong analogue input.
A photo of your wiring setup might help.
The human and the foil make a capacitor there. Change the distance between them and the capacitance between them changes. But you can take two pieces of sheet steel and do the same. Put a piece of insulating springy foam between and you have a pressure sensor that can also work as a proximity sensor.
Of course you could go about 1000x simpler and just put the dog bed on springs. When the dog lies down on it the springs compress and two contacts meet... viola, an on switch. Just keep the volts and current low, don't use aluminum, and you won't be cleaning corrosion often at all. Throw in a thermostat and a logic gate or two and you can have it warm the bed when it's cold, run the fan when it's hot or do nothing when it's nice out all without needing a processor of any kind.
Aluminum in contact with other metals and current flow in the presence of oxygen results in corroded aluminum. Conductive paint, or sheet steel, better for long-term. You can paint steel to seal it with ordinary oil-based paint.
Okay i switched the wiring around like Grumpy mike said to and it is working but the analog read is starting with 1023 and then goes down with pressure applied... How do i get it to start around 0 and then go up when pressure is applied...????