Starting DC motor based on squeeze pressure.

sailorjoe

Joined Jun 4, 2013
363
Here is a simple circuit you can build that will do what you've asked. It doesn't require a microprocessor.
You will have to experiment with it to get it to work for you. Here is a basic explanation of how it works.
On the left is your battery, whatever you use to run the fan motor. I guessed that it would be 6 volts. This has to be at least 4.5 volts, and 6 is better, so if you only need 3 volts for your motor, we need to make an adjustment.
The part labeled FSR is your Force Sensitive Resistor. This whole thing depends on what you pick for that. Here one option: http://www.kr4.us/force-sensitive-resistor-long.html?gclid=CJ2o9NTajMoCFYeBfgodxggAgQ
The IC is a LT319A dual comparator, arranged so that it can detect if the voltage from the FSR is inside of a narrow voltage range. The voltage range is set by R2 and R3, where R2 sets the high end and R3 sets the low range. Both of these have to be between 0 and the battery voltage. In this circuit, if the input is between the low and high voltages, the voltage out of the IC will be near zero volts. That will turn on the mosfet (transistor) and power will go to the motor. The main requirement on the mosfet is that it can handle the power to the motor and it needs to be a P-Channel mosfet.
So 15 minutes of thought and here is something you can try. Can you get the parts?
I didn't put values on the resistors, because it might take some experimentation. But I would start with R1-10k, R2, R3-100k, R4-10k, and the diode could be a 1N914. But other parts could work too.
Questions?
 

Attachments

Thread Starter

homer2121

Joined Jan 2, 2016
32
Here is a simple circuit you can build that will do what you've asked. It doesn't require a microprocessor.
You will have to experiment with it to get it to work for you. Here is a basic explanation of how it works.
On the left is your battery, whatever you use to run the fan motor. I guessed that it would be 6 volts. This has to be at least 4.5 volts, and 6 is better, so if you only need 3 volts for your motor, we need to make an adjustment.
The part labeled FSR is your Force Sensitive Resistor. This whole thing depends on what you pick for that. Here one option: http://www.kr4.us/force-sensitive-resistor-long.html?gclid=CJ2o9NTajMoCFYeBfgodxggAgQ
The IC is a LT319A dual comparator, arranged so that it can detect if the voltage from the FSR is inside of a narrow voltage range. The voltage range is set by R2 and R3, where R2 sets the high end and R3 sets the low range. Both of these have to be between 0 and the battery voltage. In this circuit, if the input is between the low and high voltages, the voltage out of the IC will be near zero volts. That will turn on the mosfet (transistor) and power will go to the motor. The main requirement on the mosfet is that it can handle the power to the motor and it needs to be a P-Channel mosfet.
So 15 minutes of thought and here is something you can try. Can you get the parts?
I didn't put values on the resistors, because it might take some experimentation. But I would start with R1-10k, R2, R3-100k, R4-10k, and the diode could be a 1N914. But other parts could work too.
Questions?
Here is a simple circuit you can build that will do what you've asked. It doesn't require a microprocessor.
You will have to experiment with it to get it to work for you. Here is a basic explanation of how it works.
On the left is your battery, whatever you use to run the fan motor. I guessed that it would be 6 volts. This has to be at least 4.5 volts, and 6 is better, so if you only need 3 volts for your motor, we need to make an adjustment.
The part labeled FSR is your Force Sensitive Resistor. This whole thing depends on what you pick for that. Here one option: http://www.kr4.us/force-sensitive-resistor-long.html?gclid=CJ2o9NTajMoCFYeBfgodxggAgQ
The IC is a LT319A dual comparator, arranged so that it can detect if the voltage from the FSR is inside of a narrow voltage range. The voltage range is set by R2 and R3, where R2 sets the high end and R3 sets the low range. Both of these have to be between 0 and the battery voltage. In this circuit, if the input is between the low and high voltages, the voltage out of the IC will be near zero volts. That will turn on the mosfet (transistor) and power will go to the motor. The main requirement on the mosfet is that it can handle the power to the motor and it needs to be a P-Channel mosfet.
So 15 minutes of thought and here is something you can try. Can you get the parts?
I didn't put values on the resistors, because it might take some experimentation. But I would start with R1-10k, R2, R3-100k, R4-10k, and the diode could be a 1N914. But other parts could work too.
Questions?
Thanks for the response. I have ordered a few different motors ranging from 1.5-6v so I won't know until I get them but I will likely pick the one with the highest v that will still fit inside the handle (approx 15-20 mm diameter). This leads me to my first question, will all these components be small enough to stack on top of each other inside the handle?

I also want to make sure we are on the same page. When the handle is squeezed between a high and low range of force I want the motor to be off. I only want the motor on when it is not squeezed at all, squeezed lightly or squeezed really firmly, which is why I need a switch to turn it off so the motor isn't running when nobody is holding it. From your description it sounded like you maybe thought I wanted the motor to be turned on when the voltage is between the high and low range.

As for the sensor, do you know if it would be flexible enough to wrap around and around the handle all the way down? Another afterthought, if I wanted to have a sensor for each hand would I also need to add a 2nd one of all these parts?

As for me getting the parts are they all available online?

I am sure I will have more questions once I research more to figure out what everything is.

Thanks again
 

sailorjoe

Joined Jun 4, 2013
363
Yeah, I set it up so the motor only runs when the force resistor is either lightly pressed or heavily pressed. That why I used a P-Channel mosfet.
I did forget the switch. Just wire it in series with the the battery.
I can't tell you if the sensor is flexible enough or not, but a call to the mfg should clear that up. The resistive material from Adafruit is clearly flexible enough, but you'll have to play with it to understand how it reacts to pressure.
If your battery and battery holder will fit inside the handle, then I think all the other electronic parts will also. None are very large. You may need to make a sort of long and narrow printed circuit board to hook everything up permanently. It's not difficult; something new to learn.
Everything is available on line.
I don't quite understand the second sensor idea. Can you elaborate? You want the left hand to run the motor in the right hand? Also, would you mind explaining why you want the motor to stop I'd the pressure is in the middle range? Thanks.
 

Hypatia's Protege

Joined Mar 1, 2015
3,226
Here is a simple circuit you can build that will do what you've asked. It doesn't require a microprocessor.
You will have to experiment with it to get it to work for you. Here is a basic explanation of how it works.
On the left is your battery, whatever you use to run the fan motor. I guessed that it would be 6 volts. This has to be at least 4.5 volts, and 6 is better, so if you only need 3 volts for your motor, we need to make an adjustment.
The part labeled FSR is your Force Sensitive Resistor. This whole thing depends on what you pick for that. Here one option: http://www.kr4.us/force-sensitive-resistor-long.html?gclid=CJ2o9NTajMoCFYeBfgodxggAgQ
The IC is a LT319A dual comparator, arranged so that it can detect if the voltage from the FSR is inside of a narrow voltage range. The voltage range is set by R2 and R3, where R2 sets the high end and R3 sets the low range. Both of these have to be between 0 and the battery voltage. In this circuit, if the input is between the low and high voltages, the voltage out of the IC will be near zero volts. That will turn on the mosfet (transistor) and power will go to the motor. The main requirement on the mosfet is that it can handle the power to the motor and it needs to be a P-Channel mosfet.
So 15 minutes of thought and here is something you can try. Can you get the parts?
I didn't put values on the resistors, because it might take some experimentation. But I would start with R1-10k, R2, R3-100k, R4-10k, and the diode could be a 1N914. But other parts could work too.
Questions?
'Analog logic' -- I like it!:cool:
 

BReeves

Joined Nov 24, 2012
410
The big problem I can see is how to make the whole length of the handle respond to squeeze pressure. Maybe use air, an outer membrane with air between it and the hard handle. Some form of sensor that will read the air pressure change when the handle is squeezed. Just throwing out an idea...
 

Thread Starter

homer2121

Joined Jan 2, 2016
32
Yeah, I set it up so the motor only runs when the force resistor is either lightly pressed or heavily pressed. That why I used a P-Channel mosfet.
I did forget the switch. Just wire it in series with the the battery.
I can't tell you if the sensor is flexible enough or not, but a call to the mfg should clear that up. The resistive material from Adafruit is clearly flexible enough, but you'll have to play with it to understand how it reacts to pressure.
If your battery and battery holder will fit inside the handle, then I think all the other electronic parts will also. None are very large. You may need to make a sort of long and narrow printed circuit board to hook everything up permanently. It's not difficult; something new to learn.
Everything is available on line.
I don't quite understand the second sensor idea. Can you elaborate? You want the left hand to run the motor in the right hand? Also, would you mind explaining why you want the motor to stop I'd the pressure is in the middle range? Thanks.
Yeah, I set it up so the motor only runs when the force resistor is either lightly pressed or heavily pressed. That why I used a P-Channel mosfet.
I did forget the switch. Just wire it in series with the the battery.
I can't tell you if the sensor is flexible enough or not, but a call to the mfg should clear that up. The resistive material from Adafruit is clearly flexible enough, but you'll have to play with it to understand how it reacts to pressure.
If your battery and battery holder will fit inside the handle, then I think all the other electronic parts will also. None are very large. You may need to make a sort of long and narrow printed circuit board to hook everything up permanently. It's not difficult; something new to learn.
Everything is available on line.
I don't quite understand the second sensor idea. Can you elaborate? You want the left hand to run the motor in the right hand? Also, would you mind explaining why you want the motor to stop I'd the pressure is in the middle range? Thanks.
It is a project for a course where we have to demonstrate that technology can differentiate circumstances and make a decision based on the environment. The second sensor was just to add an extra element in that if the person squeezed too light with one hand even though they were squeezing middle firmness with the other the motor would still run until both hands were squeezing basically the same.
As for things fitting I was also thinking lengthwise inside the handle since I only have approx 12" to work with...you, with batteries(possibly 3aaa stacked on top of each other) and all components would it fit inside 12".
Is there a certain type of switch i would get?
Is there a place online to get all of this on one site or do I just google?
Is the circuit board something i put together after I figure everything out or do the components need to be on the circuit board to work?

Thanks
 

GopherT

Joined Nov 23, 2012
8,012
I would use aluminum foil on the wood handle, wrap with the thinnest foam or even 5 or 6 layers of paper towel and a second layer of foil. At one end, Crumple the inner layer of foil and clip with aligator clip, half-way around the stick, crumple and clip the outer layer of foil. Wrap the whole thing loosely with electrical tape (make sure the foil layers or aligator clips (and their attached wires) do not short. Now you have a capacitor. It should change from about 100 -300 nF. You should have some meters in the lab to check.

Then build an astable circuit with a 555 timer and see how you can change the frequency by squeezing.

Once you have the range of frequency, then, build a one-shot 555 circuit that has a pulse slightly shorter (about 90% of the on/off cycle of your astable circuit).

Have the astable trigger the monostable. You have a Pwm circuit (duty pulse is fixed but the triggering frequency is variable to give you a way to control the average voltage

Run the output of the one-shot to a capacitor and resistor in parallel to ground. This will give you a filtered output and a stable voltage - changing with variable squeeze pressure and area covered.

Run the output of your cap/resistor filter to a window comparitor that will turn your motor on/off/on as you squeeze tighter.

The whole point of your course is to Hack together a device. If you cannot get enough dynamic range on the foil/paper towel stick, try the conductive foam with a fixed capacitor. You should have tried 10 different things yesterday to make this switch. Different types of inner layers, different number of paper towel wraps, at least knowing what dynamic range of capacitance you will have to design around. Hacking is quick trial and error. It is not over engineering before you attempt your final build in one attempt. That one-time build approach is commonly, and correctly, viewed as FAILURE.
 

ronv

Joined Nov 12, 2008
3,770
It is a project for a course where we have to demonstrate that technology can differentiate circumstances and make a decision based on the environment. The second sensor was just to add an extra element in that if the person squeezed too light with one hand even though they were squeezing middle firmness with the other the motor would still run until both hands were squeezing basically the same.
As for things fitting I was also thinking lengthwise inside the handle since I only have approx 12" to work with...you, with batteries(possibly 3aaa stacked on top of each other) and all components would it fit inside 12".
Is there a certain type of switch i would get?
Is there a place online to get all of this on one site or do I just google?
Is the circuit board something i put together after I figure everything out or do the components need to be on the circuit board to work?

Thanks
Sailorjoe has my vote.
 

Thread Starter

homer2121

Joined Jan 2, 2016
32
Here is a simple circuit you can build that will do what you've asked. It doesn't require a microprocessor.
You will have to experiment with it to get it to work for you. Here is a basic explanation of how it works.
On the left is your battery, whatever you use to run the fan motor. I guessed that it would be 6 volts. This has to be at least 4.5 volts, and 6 is better, so if you only need 3 volts for your motor, we need to make an adjustment.
The part labeled FSR is your Force Sensitive Resistor. This whole thing depends on what you pick for that. Here one option: http://www.kr4.us/force-sensitive-resistor-long.html?gclid=CJ2o9NTajMoCFYeBfgodxggAgQ
The IC is a LT319A dual comparator, arranged so that it can detect if the voltage from the FSR is inside of a narrow voltage range. The voltage range is set by R2 and R3, where R2 sets the high end and R3 sets the low range. Both of these have to be between 0 and the battery voltage. In this circuit, if the input is between the low and high voltages, the voltage out of the IC will be near zero volts. That will turn on the mosfet (transistor) and power will go to the motor. The main requirement on the mosfet is that it can handle the power to the motor and it needs to be a P-Channel mosfet.
So 15 minutes of thought and here is something you can try. Can you get the parts?
I didn't put values on the resistors, because it might take some experimentation. But I would start with R1-10k, R2, R3-100k, R4-10k, and the diode could be a 1N914. But other parts could work too.
Questions?
Which component do the R-values get entered into and how is that done?
 

ronv

Joined Nov 12, 2008
3,770
So is it better or cheaper to do it with hardware or microprocessor? Would there be less parts involved if I used a microprocessor?
Just my take:
If you are going to build a lot of them the micro might be the better choice mainly because you can do the adjustments in code instead of hardware so a little cheaper (2-$3). However there will be some additional expense to get the micro going (cables to program etc.).
The learning curve for you will be more with the micro since you will need to learn both how to assemble and read schematics and write code.
 

Thread Starter

homer2121

Joined Jan 2, 2016
32
Just my take:
If you are going to build a lot of them the micro might be the better choice mainly because you can do the adjustments in code instead of hardware so a little cheaper (2-$3). However there will be some additional expense to get the micro going (cables to program etc.).
The learning curve for you will be more with the micro since you will need to learn both how to assemble and read schematics and write code.
Would an arduino starter kit teach me this stuff? The one listed on Amazon gets a ton of good reviews. I prob won't go that route but if I do it sounds like it may help me.

I am just wondering about cramming all these components into the handle...in the event it doesn't fit will the microprocessor route take up less room?
 

Thread Starter

homer2121

Joined Jan 2, 2016
32
Yeah, I set it up so the motor only runs when the force resistor is either lightly pressed or heavily pressed. That why I used a P-Channel mosfet.
I did forget the switch. Just wire it in series with the the battery.
I can't tell you if the sensor is flexible enough or not, but a call to the mfg should clear that up. The resistive material from Adafruit is clearly flexible enough, but you'll have to play with it to understand how it reacts to pressure.
If your battery and battery holder will fit inside the handle, then I think all the other electronic parts will also. None are very large. You may need to make a sort of long and narrow printed circuit board to hook everything up permanently. It's not difficult; something new to learn.
Everything is available on line.
I don't quite understand the second sensor idea. Can you elaborate? You want the left hand to run the motor in the right hand? Also, would you mind explaining why you want the motor to stop I'd the pressure is in the middle range? Thanks.
What type of battery would you suggest? AA or AAA or what? I want to use the fewest number of batteries as possible due to the small space.

So which of these should I be getting. The cheaper the better as long as it works for what I need.

http://www.amazon.ca/gp/aw/s/ref=is_s_?ie=UTF8&k=Mosfet+p+channel

Would this diode work?
http://www.amazon.ca/gp/aw/s/ref=is_s_?ie=UTF8&k=Diode

Haven't found the comparator yet.

Thanks again
 

MaxHeadRoom

Joined Jul 18, 2013
22,338
No I haven't but only because I am not informed on them. Would it be possible to run a 4.5-6v motor with just one small battery?
They are used extensively in the RC world, each cell is 3.7v so if you have to use two, say, a couple of diodes could be used in series if too high, if the motor is controlled by PWM or other variable means then that is not an issue.
You would need to asses the total current demand of the system.
Max.
 

sailorjoe

Joined Jun 4, 2013
363
Homer, here are some things to think about, but ultimately this is your project and you get to make the choices.
There is rarely a single website where you can buy everything, so you'll usually shop around.
An Arduino is a great learning platform, but it will never fit in a broom handle. The ATMega chip from an Arduino could be part of a circuit board redesign that would fit, but that's a lot of extra work. You have a due date, yes?
Regardless of this project, go get an Arduino starter kit and play with it, so you start to understand what is possible.
Battery selection usually depends more on power requirements than anything else, but in your case, size is a big concern, so use batteries that fit. For all we know, C size will exactly fit inside your handle without a holder. AA and AAA will certainly fit, but you'll have to figure out how to hold everything in place. And you need six volts. LiPO batteries would work too, if you can find the right size.
The circuit I suggested should fit in a circuit board about 3" long, maybe less, so think about what that means for your handle length when you add batteries and motor. All you need is a perf board to hold the components and interconnects. In fact, you could use a piece of acrylic if you wanted, or a piece of wood.
The diode you found will work fine.
For the mosfet, find something that can handle about five to ten times the amount of current your motor needs, in terms of max Ids (that's max current drain to source). The reason is because you won't have much room for a heat sink, so go heavy on the transistor. I'm sure something much cheaper than $50 can be found. Learn to read transistor data sheets to find the value you need at a price you can afford.
The switch selection is up to you. There are thousands to choose from. For me, a small slide switch would be fine.
Bottom line: the circuit is easy, the sensor is your primary problem. Concentrate there first. Spend a little to try out the ideas you've read in these posts. This is the big experiment for you to work out.
 
Top