Momentary switch to Bluetooth Answered
I'd like to make a number of smallish (say 0.75x1x2 inches) battery-powered Bluetooth boxes each of which connects to a momentary switch, and sends an RFCOMM or HID signal via Bluetooth on depression and another on release, and which will to communicate with an Android device. Because I want to make several of these, I want something super cheap and super simple to make.
(The purpose is to make a simple wireless touch detection system for foil and epee fencing. Without on-target detection, it's not going to be great, but it will be an improvement over refereeing fully dry bouts, since at least one will have proper impact and lockout timing.)
Here are options I've been thinking about:
1. One thing that would *almost* do the job is to buy one of those $3-5 ebay Bluetooth phone camera remotes, and just wire my switch to it. The only problem is that according to the ads I've seen, these Bluetooth phone camera remotes go to sleep in 2-10 minutes when paired (exact timing seems to depend on the model), and I would really rather avoid this (the 10 minutes is almost acceptable). If anybody knows of a way of keeping them paired and awake for a longer period of time (say, 15 minutes or permanently), I would love to hear. This would be the cheapest and simplest solution, and it comes with a case and battery (some units are even USB chargeable).
2. On the other extreme of the price range, I happen to have some extra Brainlink modules with an atxmega and an RN-42 module inside, and it wouldn't take long to customize the firmware to do the job. But the modules sell for $39 (though sometimes on sale for $20), and that seems overkill for something so simple. And they are a touch larger than I like (about 3 inches diameter, and an awkward shape).
3. Another option might be to use a cheap serial Bluetooth module without additional hardware, and wire the switch directly to CTS. Unfortunately, I don't think the cheap HC-06 modules support CTS, though I think the HC-07 does support it (but I don't know if I can access it as it's probably not one of the pins on the header). Moreover, there are two unanswered questions on Stackexchange on how to access CTS/RTS status from Android, so this might require using a laptop as the base station (which isn't ideal).
4. A very cheap microcontroller with a UART (or just bit-banging) plus a cheap Bluetooth module. This increases the complexity of the project, but might be the way to go. More specific recommendations are welcome, as I have no experience with the hardware side of dealing with a microcontroller (on the software side, I've spent a fair amount of time tweaking the firmware of the Brainlink unit).