In this post, I will talk about the completed unit on the drone side and show a demo of the remote operated laser pointer in action. The development continues on from the second part of this series.
Here are some pictures of the unit I created. This was mounted on a single lego brick and then attached to the drone via a PGYTECH Tello Adapter.
The whole unit is constructed over a yellow lego brick. I used a 3mm black acrylic sheet and some industrial glue to shape the structure. There is also the use of a cylindrical acrylic rod to support the structure. I learnt that I needed more power to support the RC relay and Laser diode simultaneously. The CR2032/CR2025 3V Vertical Mounting Coin Battery Holders proved an excellent option giving me a total of 12 V. These were stuck one over the other with some industrial glue. The bottom two cells are wired to drive the RC relay circuit. I placed a slider switch for power off/on function. If connected directly to the power supply, the RC relay draws up a little current for powering the signal reception circuit.
The top two coin batteries (CR2032), provide 6V DC supply to the Red laser diode. I put in a 100 Ohm resistor to protect the diode. You’ll also notice that I swapped my previous red laser for one of these.
Here is the demo of the unit in action!
Now, that the Drone end has been taken care of, I will next focus on the processing end. This is the Raspberry Pi and the Intel Neural compute stick 2. What I hope to achieve is to stream the video feed from the Tello Drone to the Raspberry Pi, that also controls the flight of the drone via Python code. Do inferences on the stream and detect target images. If found, then light up the laser pointer on the physical image. I’ll show how in my next post or two.
Here is a closer look at both the transmitter and receiver. I’ve included some pictures of the internals of the transmitter unit as well. We are only temporarily going to use it, as I will explain further. The unit is tiny and light and just what I was looking for related with this project.
Next, I connected all the pieces together so that I could trigger a transmit event that lights up a test green LED and another to switch it off. I haven’t used the red laser diode for testing in this case, as I need to work on a compact circuit that would be able to power both the RC relay and the laser diode. More to come in my next blog post on this.
The distance between the Transmission assembly and the Reception assembly could be an amazing 160m in ideal conditions as this youtube video shows. Here is another video with a successful range test of over 350m with some modifications to the hardware, such as adding longer antennae. The Reception assembly has two circuits with their own power sources. One circuit powers the wireless remote control switch and the other powers the green LED.
The pypi python site has a project for sending and receiving 433/315MHz LPD/SRD signals with generic low-cost GPIO RF modules on a Raspberry Pi. There are two script files that are of use. Click on the links to go to the source code that’s written in python.
Finally, as usual, I’ve recorded a demo of this project in action. Here’s the video:
Now with the RC relay, I can switch the LED on/off from python code. Once I sort out the power circuit issue, it will be possible to ‘build’ the final assembly of the remote controlled laser pointer. I’ll then mount this assembly on my RYZE tello drone. Then will do some tests on that. The most important test would be to check for the stability of the flight of the aircraft with the final assembly mounted on it. And of course, to check whether the laser pointer lights up while the drone is in flight.
Once these basic tests pass, it would be time to focus on capturing live video from the RYZE tello drone onto the Raspberry Pi and doing some object inference / detection using the Intel Movidius Neural compute stick 2 for deep learning . Based on finding certain objects, I would have the code switch the laser that’s mounted on the drone to ON status followed by off. This is really where the fun begins.
I will demonstrate this in action in my next set of posts in this series. Stay tuned!
Like it or not, Internet of Things (IoT) is going to be all more prevalent in the world around us. I wanted to explore how things could become smart, indicate events to humans in innovative ways.
I have this idea of a small camera drone, such as the RYZE Tello that I’ve been playing around with for a while being able to fly around and recognize objects. When it does, let’s say a picture of a cat, then there should be some way for the drone to indicate a positive identification. One inexpensive way of doing this could be a laser pointer mounted on top of the drone that could light up and cast a beam on the object. The object would light up with a red dot, positively indicating to the casual observer that the drone has honed in on the object in the actual physical world.
Such a setup would need several key components:
A drone with a camera that is able to stream images or video, such as the RYZE Tello. I showed in an earlier article that it is possible to control the flight of the drone through a program running on a Raspberry pi device. It is also possible to stream images or video to the pi for processing.
A remote-controlled laser beaming device that could be controlled programmatically.
I will blog on the end to end development of this project and will upload videos of the implementation in action. As a first step, I’ve begun with a connected device. The laser beaming device itself has been sourced from a cheap keychain laser pointer.
Using a hacksaw and a pair of pliers, I stripped opened the aluminium canister shell to reveal the glorious miniature electronics inside. Using a soldering iron, I removed the two LEDs. However, I left the switch pots on, since it would very tricky to remove them given the tiny size of the PCB. The laser beam diode is the cylinder-like unit at the top. The covering connects to the positive (+4.5 V) and negative to the lead just below. In the unit, the LR 44 button cells go into the circuit through the spring at the other end.
Fantastic! I have the laser pointer. Next, I need to wire up a few components.
Several parts are needed for this project. Let’s look at the most important components.
One channel relay board – This is a mechanical relay switch that can close or open a circuit as it receives an input signal from the Raspberry Pi.
Button coin cell battery socket holder – That’s a long name for a unit that can house 2 LR 44/AG 13 button cells to give a combined voltage feed of around 3 V. For this project, I would be using two of them.
Plexi glass sheets – These are amazing to work with to create custom housing to hold the electronics. In this case, I’m using a bit of this to act as separators. A hook cutter makes it easy to work with these.
Connections are fairly straight forward. Let me start with the right side of the relay. You’ll see that I took 4 LR44 batteries stacked together with two coin cell battery socket holders to get a tiny power pack supplying +6 V approx. This power pack will be important when mounting on the drone later in the project. The horse carving is meant to simulate the object onto which the laser beam would be projected.
The relay wiring on the left side is very similar to how it is described in this you tube video by PiddlerInTheRoot. Here you will get to see the setup in action. I had to replace the carved horse with a black cardboard box to show the laser beam in a clearer way.
As I needed around 4.5 V for the laser diode, I added a few resistors to step down the voltage to a safe operating level. Using this handy voltage divider calculator, that gave me 220 Ohms connected to +ve, followed by 1 K Ohm resister to -ve. Here is the python code that switches on and off the laser pointer diode circuit.
import RPi.GPIO as GPIO
channel = 4
# GPIO setup
GPIO.output(pin, GPIO.HIGH) # Turn laser on
GPIO.output(pin, GPIO.LOW) # Turn laser off
if __name__ == '__main__':
So that is the progress over a weekend. Using VNC Viewer it is possible to login to the Raspberry pi from a laptop, tablet and even a mobile phone. Once in, the python script above can be executed and the laser pointer can be observed to shine a beam and stop. The script could also be written to call an API on the web periodically, and when the API returns a value of interest, the program could set the laser to turn on. This has plenty of practical applications, such as a silent alarm. Let’s say the laser unit is pointed to the front of a room, where a development team is facing. The program loop checks if a build has failed on a CI/CD server. If it is the case, shine the beam on…the whole team sees it on the wall and gets alerted that the build has broken.
As mentioned at the start of this blog, I’m going to use the laser pointer for the drone to indicate visually whether it has detected an object of interest by shining a laser beam on the object.
More to come as I move on to the next steps. Stay tuned!