I had a project requiring a sound-activated device for operating the shutter on my Canon EOS R7 camera, in order to do this I came up with a fairly simple circuit. It was based on one I'd used previously for a clap switch, where two claps within specific time-frames would toggle a microcontroller output. This circuit was much simpler and didn't require a microcontroller, as it only had to respond to a single burst of sound. It consisted of two NPN transistors, two resistors, a 4N25 optocoupler, a 1N4148 diode, a 74HC14 hex Schmitt-trigger inverter and an electret microphone.
Having built it up on a breadboard, wired it to the remote control socket on my camera, and checked that it actually works, I then wanted to turn it into a PCB; which is pretty much my usual process. Creating a PCB of a prototyped circuit makes it much more absolute, and there's no longer the luxury of being able to rearrange components to alter the way it functions. For this reason, before I start layout out a PCB, I'll invest time thinking about what additional features might be worth including, and try to imagine what possible uses the device may be suitable for in the future.
This is often how my very low component count project escalates into something significantly more expensive to build, and requiring considerably more soldering! So the device should have a couple of buttons, one for operating the focus and the other for the shutter. It seems sensible to include a second optocoupler, so the focus could be controlled at the same time as the shutter. Seeing as this was a sound activated device, a sensitivity potentiometer would be required, and also a delay potentiometer for controlling how long the shutter circuit remains active having been triggered.
I added the additional components required for these features, and then remembered the FOBOEM-8S4 868MHz RF module I'd seen on the RF Solutions website. Adding an RF module would allow me to operate the camera via remote control - which would be nice! Canon make a remote control, the BR-E1, but it's over £45, the FOBOEM-8S4 - consisting of the receiver module and a four button remote - is only £30, so it was the obvious choice, despite the minor inconvenience of having to plug the receiver into the camera to use it. Canon's BR-E1 communicates with the camera directly via Bluetooth and has a range of around five metres. The range of the 868MHz RF module is up to 150 metres, in ideal conditions, so there are pros and cons to both.
The FOBOEM-8S4 receiver has four digital outputs which can be set to momentary or latched operation by tying a pin to ground or VCC. It also has a serial data output, which if I was using a microcontroller would be an ideal way of interfacing the RF module using only a single pin. But I was determined not to resort to using a microcontroller in this project, as it simply wasn't necessary. The only thing I was unsure about was how long the outputs of the RF module remained in a high state having been activated by the remote control.
In previous projects, such as the BDSM RF pager project I used the expensive (and now discontinued) AM-RX9-433P AM superheterodyne receiver module. With these modules there's a delay once an output has been made active, remaining in a high state for several-hundred milliseconds, despite only a brief press on the transmitter. Having had this experience, I wondered if the FOBOEM-8S4 receiver would have a similar delay, which if connected directly via diodes to the optocouplers controlling the shutter and focus may result in them being operated for a longer duration than desired.
To overcome this possibility, I added two RC circuits that would deliver a very brief pulse to the optocouplers, regardless of how long the receiver outputs remained active. This is the purpose of components R7,R8,R9,C4 which drive the focus optocoupler via Schmitt trigger inverter U1E, and R10,R11,R12,C5 driving the shutter optocoupler via U1F.
I designed the PCB before I had the FOBOEM-8S4 RF module to test, so this additional circuitry was somewhat precautionary. It turned out the RF module has no humanly discernable delay in response to the transmitter buttons changing state. In fact, I was impressed by how responsive it was, it's a huge improvement over the rather dated AM-RX9-433P receiver.
I was also surprised by the range I could achieve, despite the receiver lacking an antenna. I was yet to solder a makeshift coil of copper wire to the designated pad on the PCB, a task I've decided to skip for now, given the range is more than adequate for my needs - I can always add this later if necessary. I'll definitely use the FOBOEM-8S4 in future projects requiring responsive and reliable RF remote control.
The 20kΩ sensitivity potentiometer R16 (in combination with 2.2kΩ R3) supplies and limits the DC current to the electret microphone's internal JFET. The resulting voltage drop across R16+R3 sets the microphone's DC bias voltage (between 0.4 - 0.6 volts), and the audio signal appears as a small AC variation around this bias point.
When sound waves act upon the electret microphone's diaphragm, the internal JFET modulates the current through R16+R3, producing corresponding voltage fluctuations around the bias voltage. When a sufficiently large negative-going excursion occurs, it momentarily reduces the base voltage of Q1, turning it off and triggering the remaining circuitry, described as follows...
When the voltage at the base of Q1 falls below 580 millivolts it turns off, stopping the flow of current from R1 passing via the collector-emitter path of Q1 to ground. As the base of Q2 is also connected to the collector of Q1, the turning off of Q1 results in Q2 being turned on, as its base can now draw current via R1. This allows current to flow through R2 via the collector-emitter path of Q2 to ground, whilst pulling the input of the Schmitt trigger inverter U1D to ground also, causing its output on pin 8 to go high.
When the output of U1D goes high, current passes through diode D1, charging the 1uF capacitor C1, and turning the outputs of U1A/B/C low, thus powering the active components via low-side switching. When the output of U1D returns back to a low state, D1 prevents C1 from rapidly discharging. C1 is now slowly discharged by the 1MΩ 'duration' potentiometer R17, allowing the triggered state to be maintained from anywhere between zero to 990ms.
The diodes D2,D3,D4,D5 form an OR-gate arrangement, whereby either the sound activated trigger or RF remote can independently operate the associated optocoupler(s).
I purchased two leads for connecting the remote PCB to the camera's remote control socket: A two metre cable with 2.5mm stereo jacks at either end, and a three metre extension cable with 2.5mm stereo jack at one end, and socket at the other. This way I can use the remote with the shorter cable, but have the option of extending to five metres if necessary; which is far easier than having one five metre cable to deal with and/or trip over!