I'd like to modify a stuffed animal to react to petting/scratching. The last toy I had with a feature like this was a Furby, which you "petted" by simply pressing a rather obvious switch hidden just below the fabric. Has the state of the art progressed at all in the past decade? I feel like conductive thread would be a good place to start, since it could be sewn right into the fabric, but I'm not sure what to do with it.
Electronic – Unobtrusive sensor for detecting touch on a plush toy
sensor
Related Solutions
You don't need the BB to be centered between the emitter and detector
It may be possible to use the phototransistor as an analog sensor rather than a switch (which is what I suspect that you are currently doing). Even if your item does not fully block the light, it will change the light in the area of the pipe occupied Use your phototransistor to create avoltage, amplify or buffer if necessary, and send the output to a differentiating amplifier. This should generate a nonzero voltage whenever the light intensity changes. Assuming that your system is closed at both ends (and that your airsoft gun doesn't have a significant muzzle flash), this should only happen when a bullet is passing the area.
Some ideas from light curtains
Also consider that your problem is similar to the problem solved by light curtains, but on a smaller scale. It's especially similar in your last diagram, with multiple sensors. A few tricks could be borrowed from light curtains:
- It's easier to design and assemble rectangular light curtains than other shapes. Assuming that you've designed your pipe to be large enough that airflow around the bullet isn't a problem, you could put boxes on the end of your pipe containing flat PCBs for mounting your emitters and detectors. This would be considerably easier and more robust than drilling holes in your pipe and running wires all over the place.
Your resolution can be increased significantly by scanning through your emitters and checking each of your detectors. This changes your scan pattern from a row of lines (which would then need to be <6mm apart) to lines between each detector and each emitter. You'll need to check that the pattern formed doesn't leave gaping holes, such as immediately adjacent to the emitters or detectors (though these can be removed simply by spacing the detectors and emitters further apart). Note that you'll need to scan pretty quickly; the limiting factor is probably your phototransistors with rise and fall times on the order of 10 microseconds. To escape detection, a 6mm object would need to be travelling at:
\$ \frac{6~\mathrm{mm}}{10~\mathrm{{\mu}s}} \approx 2000 \mbox{ feet per second} \$
which is, I hope, significantly faster than your airsoft gun is capable of.
One more issue about your source:
I don't know which IR LEDs I'm using (and salesman in the store also doesn't know - he told me these are generic ones for remote controllers, like TV or DVD controller).
No. Just no. Physical stores and real-life salespeople are only useful when (1) you're on a ridiculous time crunch and can't wait until the next day for your parts to come in the mail or (2) they add value to the product. You're not pressed for time, and your salesperson is clueless about the merchandise, so I strongly, strongly suggest you start looking at reputable online distributors like Mouser and Digikey which will provide datasheets and genuine parts.
Furthermore, your price quote of $12 for 5 IR emitters (note that LEDs only emit visible light so it's technically incorrect to call them IR LEDs, they're called "infrared emitters") and 5 phototransistors is ridiculous. IR emitters are about $0.15 each, and phototransistors are about $0.30 each, so you ought to be looking at $2.25 for your 5-piece setup. Note, too, that these price quotes are for small quantities of through-hole parts: If you're buying reels or using cheaper SMD parts, neither the LED nor the phototransistor should be more than $0.10.
Edit
To decide between the various possible configurations of emitters and detectors, draw lines-of-sight through each pair that you're going to check as shown here:
The left one is more dense in the center, while the right uses a significant number of its lines-of-sight in checking the extreme periphery. Since you're not working with a safety-critical application like a light curtain where you can't afford to miss an object once in a while, and since your objects should be concentrated in the center (and give erroneous results if they hit the sides), I'd suggest the left one.
That said, both will be difficult to manufacture. I still suggest using a rectangular arrangement as shown here:
This diagram describes a top mainboard containing a microcontroller and connector for power, ground, and a pulse to be issued when an object is detected, with daughtercards mounted on right-angle connectors. This creates a 32/5 = 6.4mm spacing between emitter/detector pairs without checking diagonals, upping the count from 5 to 6 or 8 (which would be easy) would allow you to do a simple linear scan.
Consider that the circuits for the emitter and detector are basically identical (and low density/complexity), you could probably make all three of the boards physically identical and simply populate them differently to save money. For the motherboard, an SSOP or SOIC microcontroller on the top of the board, run I/O off both sides to 0.1" holes for a right-angle header. For the daughter cards, put a row of emitter/detector footprints (they're easy enough to find in mechanically identical packages, like the Kingbright APT2012F3C/AA3021P3S pair) and resistors on the bottom, and run the connections back to the headers. A few solder jumpers would suffice to make a board either type as shown in the following schematic, or you could get fancy and make one end of the board a connection for emitters and the other for detectors.
Again, I strongly suggest thinking hard about design for manufacturability at this stage! You don't want to end up with a bunch of components that you can't assemble reliably, especially if you have long lead times as indicated. A little effort invested early on can save a lot of effort later.
Edit #2: Schematic for proposed design
I used an ATtiny40 in this design, there are a variety of controllers which could be used. Sorry for the mess of nets around the outside, I'm trying out a neat new online editor (click the image to open it) which doesn't yet have busses.
Split the touch area...
Split your copper touch area into two parts that are interdigitated. Then it's very easy. If the user touches the pads there will be a current path between the halves. Otherwise not. The resistance can be quite high for a "dry" finger (~10k Ohm), so use an amplifier to ensure reliable operation. A simple single-transistor type is sufficient.
...like one of these!
Related Topic
- Electronic – Which sensor to use for detecting nylon string vibration
- Electronic – Miniature flow sensor for detecting breath movement
- Electronic – Choice of sensor for detecting touch (on/off)
- Which optical sensor for detecting moving paper
- Electronic – Looking for the name of this optical sensor detecting beam interruption
Best Answer
My first thought was conductive thread too...
There are a lot of people who do embedded circuits into clothing that might provide some insights. Wearable Computing yielded some solid search results for me. Lilypad Arduinos get stitched into clothes with conductive thread, looking at those designs online might get your further down the rabbit hole.
I've seen a few designs out in the webiverse for winter gloves that insert conductive thread patches into the finger tips to make capacitive touch screens work for folks.
I'd think that heading in a similar direction might meet your needs.
A few links which may trigger some ideas/answers:
http://www.media.mit.edu/wearables/
http://hlt.media.mit.edu/?p=1283
http://cabinet-of-wonders.blogspot.com/2007/12/lilypads-and-wearable-electronics.html
http://www.instructables.com/id/Making-A-Glove-Work-With-A-Touch-Screen/
http://en.wikipedia.org/wiki/E-textiles
http://cabinet-of-wonders.blogspot.com/2007/12/lilypads-and-wearable-electronics.html