The Pan-Tilt controller (the device on the left) is made up of 2 servos. These servos are controlled by a Particle Photon. Even though the Particle Photon is Wi-Fi enabled, I'm not using it in this demo yet. The Photon is hooked up to an HC-05 module configured as a Slave Bluetooth device.
The device on the right hand side is the remote controller. This device is made up of another Particle Photon. This Photon gets analog signals from the two potentiometers (the Pan and Tilt controls) and the Photon calculates the position the servos needs to be rotated at and transmits this data using another HC-05 Bluetooth device configured as a Bluetooth Master (this is the device that initiates the initial Bluetooth connection).
Improvements I had to make
The initial project used the inclinometer on my phone and Bluetooth connection from the phone to the Pan-Tilt controller to control the Pan-Tilt. By simply tilting the phone up or down (pitch) the tilt servo would move. Or tilting the phone side to side (roll) the pan servo would move. As cool as this looked, it wasn't practical for my use since it implied you would have to hold the phone in a steady position once you've achieved the desired position.
So, I switched over to using a separate device (instead of a phone) as the remote controller, that used potentiometers instead. This works really well and feels surreal. Twisting a pair of knobs in one place and seeing something move somewhere else. And once you've achieved the desired position, it just stays there until you decide otherwise. I thought about using quadrature encoders but felt those would be better suited for controlling stepper motors instead where one could step the motor at 1/16 step for fine grained control. That project is planned!
The Pan-Tilt controller is powered by a 5V 5Amp power supply. That is, the servos, the Photon and the HC-05 are all powered by this power supply. The servos I'm using are high-torque servos (Hs-5685HM) and thus could draw a lot more current than any microcontroller can deliver.
Comments