There are many types of optocoupler and you chose one based on the requirements of your circuit. My intention was to create a automatic shutter trigger for my Canon camera, so the circuit was a 5V Arduino and a Canon 40D which has about 3.2V on the shutter release connections. Due to the relatively low voltages there are many suitable optocouplers to pick from. I already had a Fairchild 4N26 so this is the one I used.
Optocouplers are digital switches. They work by using an LED emitter paired with a photo detector transistor. This means they can be used to allow one circuit to switch a separate circuit without having any electrical contact between the two. Basically, if you put a current through pins 1 and 2 and light the LED the photo detector transistor detects the light from the LED and allows a current to flow through pins 5 and 4. No current on pins 1 and 2 means current does not pass through pins 5 and 4.
I have been playing with the ESP8266 modules again and had made a small adaptor to enable me to use the ESP8266 on a breadboard. It soon became apparent the adaptor was not the best design as it blocked access to some of the rear connections. This lead me to version 2.
Since I first posted about the HM-10 the firmware has been update several times and some of the commands are no longer supported. Therefore, I decided to redo the guide. For this update I am using modules with firmware 5.40 and 5.47.
Bluetooth / BLE
HM-10 Basic specs
Get Started With the HM-10
Getting an Arduino talking to the HM-10
HM-10 AT Commands: Using the Arduino’s serial monitor to talk to the HM-10
Scanning for other HM-10s
Arduino to Arduino using HM-10s
HM-10: Updating the firmware
The HM-10 is has become a very popular Bluetooth 4 / Bluetooth LE / BLE module for use with the Arduino. In part this is due to the standard UART serial connection it offers that makes it fairly straight forward to connect to an Arduino (The UART layer is a good thing and a bad thing).
The HM-10 is made by Jinan Huamao who make a range of Bluetooth modules including the HM-11 which works in the same way as the HM-10 but in a smaller form factor with less pins broken out.
There are 2 versions of the HM-10; the S version and the C version. There are slight component differences and the HM-10C does not have the pads along the bottom (26 pads instead of 34) but operationally they are the same.