Sunday, January 13, 2019

A Look Back

Many years ago, when I was around 11 years old, I embarked on my first real DIY project. This was before any drones, 3D printing, or anything else. My cousin, two years older than me, had come to the U.S from India. It was the middle of summer and both of were extremely bored. After seeing a video from the Make Magazine Youtube channel about a compressed air rocket, we decided to try and build it (many other DIY Youtube channels have done this same project since). The design seemed simple enough - a PVC pipe air chamber with a bicycle tire valve using a sprinkler pipe electronic valve controller to release the air pressure and a small projectile. Using the video as a guide, my cousin and I took a trip to our local Home Depot and purchased everything we needed. Our PVC pipes weren't the same size as those in the video, but we figured that the whole thing would be fine. We also found some scrap wood to construct a structure around the PVC components to support the whole thing. Building the frame and installing the valve controller were the easy parts of the project, but adding the bicycle tire valve and actually switching the valve controller on and off were some of the challenges we encountered. I had an old bike tire that I used to get the valve. It took some time to find a proper adhesive to make the tire valve-PVC connection airtight. We settled on using JB Weld to secure the tire valve to the PVC pipe after drilling a hole. Next, we focused on controlling the sprinkler valve. There were no switches or anything else included in the box, so we had to improvise. After searching the garage for some time, we found an old light switch and decided to use it. To power the whole circuit, we used a 9V battery. Wiring the whole setup took a while, as I didn't have a soldering iron (and I didn't know how to solder) and I wasn't too familiar with electronics at the time. After making sure the PVC was airtight and the valve controller functioned correctly, my cousin and I worked on making a projectile. We carved a wooden dowel into a torpedo-like shape and sanded it a bit. Some duct tape was added to the mid-section to make sure that it fit snugly into the top of the PVC launching pipe. To fill the air chamber up, we simply hooked up a bike pump to the tire valve and pumped until the pressure was around 60 psi. Surprisingly, the first time we launched the projectile, everything went as planned. The wooden rocket shot up extremely fast, maybe to around 100-200 feet. This project really motivated me to try others and was essentially my introduction to the DIY space. I actually made a video about this compressed air rocket around the time I built it. Click here to watch it (keep in mind that it was filmed on an iPhone 4 and edited on iMovie by an 11 year old). 

Sunday, November 11, 2018

Drone Update

From previous posts, you may be aware that I started building my own quadcopter a while ago. Since then, I have made several improvements. For many years, I've always wanted my own DJI camera drone for taking videos and just general cinematography. However, these drones are incredibly expensive, unless you buy the new DJI Spark, which still starts at $500. The Spark is a good drone, but I feel that its capabilities are limited by its size and performance. Because of these reasons, I decided to build my own drone, centered around cinematography, basically my version of a DJI Phantom. I started with by upgrading the frame on my existing drone to a bigger 500mm frame with more room for camera equipment. It also has landing gears that are far more stable and stronger than those from my old frame. To improve the camera capabilities, I bought a 3-axis gimbal (same type on DJI Phantom) to replace my 2-axis one. This means that the camera I use will now be stabilized on the pitch, roll and yaw axes. Overall, it provides smoother video to get me closer to that DJI level. Another significant upgrade that I made was with my flight controller. When I started this drone, I was still a beginner builder, and I used the KK2 board to start. While this flight controller is fairly cheap and good for beginners, its technology is outdated and isn't very customizable. Because of these factors, I switched to the far more advanced Naze board. These boards are very popular nowadays, mainly being used on high-performance racing quads. Naze boards are compatible with a computer software called Betaflight, which allows for lots of customization regarding self-level, motor speeds, orientation, and many other things. It allows me to tune the self-leveling feature of the board so that my quad can still maintain a stable position in wind to improve the quality of the video recording. To make the drone easier to fly, I've also added an FPV (First Person View) system. This essentially allows me to see what the drone is seeing by wearing VR-like goggles. The camera on my quad both records and transmits video to my goggles. In the future, I hope to add things such as a GPS system, so that my drone can stay even more stable in the air and possibly do autonomous flights. I have attached pictures of my drone and some sample footage that I took with it here. 







Saturday, July 28, 2018

Embry-Riddle Drone Summer Camp

Flying drones for fun is great, but they have so much more potential than most people think. Instead of using drones as toys, there are many practical uses. Adding autonomy to drones can allow for new possibilities, such as land surveying or package delivery. Tasks that used to be otherwise strenuous or boring for regular drone pilots can now be accomplished with a lot more ease. Last week, I attended a drone summer camp at Embry-Riddle Aeronautical University. Embry-Riddle is one of the best aeronautical universities in the U.S and even the world. They offer a variety of degrees focused in aviation, engineering, and cyber-security. During this camp, the members in my camp group built and flew autonomous quadcopters along with some DJI Phantoms/Inspires and RC airplanes. We also spent some time in the classroom with the UAS (Unmanned Aerial Systems) professor. UAS focuses on the systems around and inside unmanned aerial vehicles. For the autonomous quadcopters, we used the f450 frame along with 1000kv motors + 30a ESCs and a 2200mah battery. To add autonomy, we used the Pixhawk Flight Controller running an open-source software known as Ardupilot with a GPS/Compass. The flight controller was able to be programmed using a software called Mission Planner. In this program, you can create a flight plan with waypoints, change the altitude/speed of the drone, disarm/arm, and do many other things. Besides a few friends and I, most of the other people in our group had little to no experience with building drones. We decided to split up and help the others build their quads. I felt that this particular experience was very beneficial, as it improved and refined my building skills through teaching. After the building was complete, we tested the motors and made sure everything was working correctly. We went out to the RC field and programmed a flight plan to all of our drones. I was surprised to see that all the drones followed their routes without any problems and flew well. At this point in the camp, we still had a few more days left to fly, as our professors had underestimated the time it would take for us to build the drones. We spent the rest of the camp flying RC planes and DJI drones. I didn't have much experience with flying RC planes prior to going to this camp, but I was able to learn and improve my RC plane flying skills a lot. On the last day of camp, most people in our group flew DJI Phantom 4s at the same time in formation and patterns while my friend and I flew/controlled the camera on a DJI Inspire to get some video of the other drones flying. The Inspire requires two pilots: one to fly the drone, and one to operate the camera gimbal. Although the actual building and flying of the quadcopters in this summer camp was a bit too simple for my skill level, I still enjoyed it. I did learn some new things about autonomous quads, UAS, and flying RC airplanes. See photos and videos here.

Tuesday, July 10, 2018

Bluetooth Battery Monitor Using WICED Board

My electric skateboard so far has been great. The performance and battery life is better than I originally expected. However, there is one issue that bothers me: checking the battery voltage quickly. Right now, I have to take out a multimeter, open the enclosure on the bottom of the board, and measure the voltage. To solve this problem, I thought of making a Bluetooth-based battery monitor. I recently got an internship at a company in Silicon Valley called Cypress Semiconductors. One of their specialties is in WiFi and Bluetooth chips for devices such as game consoles, phones, smart home appliances and much more. They make Raspberry Pi-like boards aimed to help developers that can be programmed using a custom SDK. The particular board that I used is part of their WICED line of devices, and is called the BCM94343W_AVN. This product line focuses on connectivity, mainly Wi-Fi and Bluetooth. My particular board includes both Bluetooth Low Energy and WiFi, and is normally used for IOT (Internet of Things) applications. As the first main project for my internship, I decided to use this board to make a Bluetooth voltage monitor for my skateboard. I envisioned somehow measuring the skateboard battery voltage and sending that data to app on my phone so I could easily monitor the voltage. First, I focused on measuring the voltage. After some research, I found a feature built into the board that was called ADC, which allows any power source up to 3.3V to be connected to the board via the GPIO pins and measured. I found some code for the ADC online that worked with an Arduino board, so I changed the code a bit to work with my board and tested it with a AA battery (max of 1.5V). The problem was that the battery in the skateboard has a much higher voltage, around 12.5V fully charged. So I did some research and found out that there was something that could solve my problem known as a voltage divider circuit. Basically, two resistors, one higher impedance than the other, are used to bring down the voltage of a source to a manageable level. Then, you do some calculations to find out how much the voltage was divided by the resistors and use that data in your code to find the actual voltage of the source. I used a voltage divider calculator online to do my calculations. My skateboard is made up of two 3s batteries, each having a max voltage of around 12.5V when fully charged, and I only wanted to measure one of the batteries. In the voltage divider calculator, I used 13V as my input voltage to be on the safe side, and 3.3V as my output voltage, as that is what the max ADC voltage of the board was. There are no specific values to the impedance of the resistors that you need to use in a voltage divider circuit, but I settled on an 18K and 4.7K resistor, as that is what I could find in the company workshop. Next, I wrote some code to factor in the voltage divider circuit and everything worked properly. Finally, I had to find a way to send this voltage to my phone. Fortunately for me, Cypress makes an app that is designed for testing these Bluetooth boards. They also provide starter code that is compatible with this app. Once I modified their starter code a bit by adding my voltage measurer code and doing some small fixes, I was able to receive the battery voltage on my phone through the Cypress-made app. I put the board into the enclosure on the skateboard and did some soldering and tidying up with all the wires. The board, which needs 5V 2A for power, is powered by the skateboard batteries through a LiPo to USB converter that I bought online. However, there are still a few issues. For some reason, I couldn't get the Cypress app to display the voltage in a decimal format, so for example, 12.5 volts shows up as 125. Secondly, the voltage doesn't update as you ride unless you restart the whole system. In the end, it probably would've been easier to use an Arduino, but this project helped me get familiar with the WICED system and SDK. Click this to see my the voltage measuring code.

Sunday, May 13, 2018

TechCrunch Sessions 2018: Robotics

If you haven't heard of it before, TechCrunch is a fairly popular news outlet and organization based in Silicon Valley that is mainly focused on technology. Every year, they hold an event devoted to robotics. CEOs of major robotics companies and industry experts speak on panels and show off their new technology. This was my first time attending a TechCrunch Robotics event, and it definitely won't be my last. As I was looking through the event's agenda, I became particularly excited when I saw that Boston Dynamics (the company that makes the kinda creepy robot dog thing: robot dog video) was going to be demoing their new robot, and that Skydio's (company that makes the also kinda creepy autonomous drone: autonomous drone video) CEO was going to be talking about the company's latest drone. The event was presentation-based, focused on a panel of speakers that usually consisted of CEOs of robotics companies or industry experts. There were also various booths outside the presentation theater where the companies could demo their products and advertise. There were many different subjects that were talked about, from artificial intelligence powered robots in agriculture to self-driving cars (event videos). Some of the discussions that I found pretty interesting were about self driving big rigs and then of course, Skydio's autonomous drone. Starting with the big rigs, a company called Embark wants to use self-driving technology only for the long and boring highway part of a trucking haul, and then let a human driver start and finish the job for a few miles. I think this is a brilliant idea, because the truckers need to be present to deliver the goods, but don't want the stress of driving for many hours on the highway. The CEO of Embark explained that the company won't actually be stealing jobs, because there is a shortage of truck drivers right now in the U.S. Next, Skydio's CEO talked about what went into the technology of the autonomous system used in the company's latest drone, the Skydio R1. The CEO of Skydio mentioned that he began flying RC model airplanes at a young age and became interested in the hobby. As an MIT student, he worked on a project that used a lidar system and several cameras to autonomously fly a model airplane around a parking garage. From there, he brought together a team to apply the same idea to a quadcopter. Over many years, the company developed AI software and a camera system that would allow the drone to not only avoid obstacles, but track a person and follow them at high speeds. The Skydio R1 that came out recently has 13 cameras that allow the drone to basically be "uncrashable" in conjunction with the incredible AI processing software. I found this talk inspiring, because I enjoy flying my custom-made drones that looks just like one of Skydio's early prototypes, and I could see myself being interested in this field of work in the future. There were plenty of other interesting discussions, but I would probably write a whole novel about all of them. I hope to attend this event next year, and can't wait to see everything that will be there. See some photos and videos that I took here. If you are interested in that autonomous drone, check out Casey Neistat's video about it here.






Sunday, April 29, 2018

Robogames 2018

This year, I competed in a combat robot competition called Robogames. If you are familiar with the show "BattleBots", Robogames is essentially the same thing. There are many different events, such as combat, hockey, autonomous or even things like robotic bar tending. I participated in the Junior League one pound combat category. In this event, your team has to build a robot less than a pound that will face others in a boxing-style combat arena with a dual-elimination tournament setup. I did this same event last year, and lost both my games. I pretty much built my robot the night before the competition and it didn't turn out too well. This year, I wanted to do a lot more planning and not procrastinate as much. I thought my design from last year, a horizontal spinning drum attached to the front of the robot, was decent, and I decided to stick with it. My friend and I formed a team and started researching. I saw a video by YouTuber Robert Cowan (link here) that seemed to match perfectly with the design I had in mind. I messaged Robert for the chassis and weapon files so that I could modify them for my particular components. I planned to 3D print the chassis and weapon, but would've liked to CNC the weapon out of steel or titanium if I was able to gain access to proper machinery. For electronics, I used the same parts from last year, with a quadcopter motor powering the weapon and Fingertech brushed motors and ESCs feeding power to the wheels. After modifying the chassis and weapon to fit the components, my friend and I 3D printed them in my engineering class at school. We printed duplicates of each so that we would have back-ups if anything broke during the competition. In Robert's design, he uses a plastic called Garolite G10 that is screwed onto the top and bottom of his chassis to cover and protect the internals. I went to my local Tap Plastics store and purchased some high-impact resistant acrylic plastic instead of Garolite G10, as it wasn't available. In school, we used the laser cutter in our engineering class to cut the acrylic to our specifications (again, we cut multiple plates so that we would have replacements for the competition). Finally, we assembled all the parts together. We used a skateboard bearing and a bolt to hold the drum into the chassis, and the motor was simply press-fit into the 3D printed weapon. After soldering and installing all the parts, we added some hot glue to strengthen the electrical connections. Next, we weighed the robot and found that we still had about 100g to spare. At that moment, it was the day before the competition, so we decided not to add any weight. We tested the robot and were pleasantly surprised at the strength of the 3D printed weapon and chassis. At the competition, we realized that we could've improved our design a bit. There were six screws that held the acrylic plates to the chassis, and were a pain to remove when we wanted to change the battery or fix something. Unfortunately, in the first fight, the weapon motor seemed to be stuck and not spin up very fast or at all. After the fight, I realized the battery we used, a 2S LiPo, could not sustain that constant spinning of the weapon for the full 3 minutes of fighting. This was the main issue for why our robot lost the first fight. Luckily, I had brought a larger 3S LiPo, and it barely fit the chassis. Also, it left about 20g of weight to spare. Thinking about it now, we should've used this battery from the very beginning, not just as a backup. I used the 2S LiPo batteries in the first match since I had only one 3S, and four 2S LiPo batteries, meaning I wouldn’t have to charge during the competiton. In the next fight (using the 3S), the robot worked properly, but we still lost. In this fight, the opponent had a robot shaped almost like a dustpan, with a very thin lower lip that was able to go underneath the spinning drum, essentially making it useless. This fight exposed another flaw of our design. However, all the other robots in this competition didn't have this dustpan design, and I think our robot would've competed better against any of the other bots. Next year, I plan to compete again in Robogames, but revise my design a lot more. I still do believe that the spinning drum is a great weapon, because it keeps the rotational forces balanced across the width of robot chassis, and it can flip/destroy other robots pretty easily. My revisions for next year's design would be to make the weapon out of metal, some how reduce the risk of failing against dustpan style robots, and make sure to use 3S batteries. See photos of the event






here.

Thursday, April 12, 2018

FPV and How to Get Started

FPV. It stands for First Person View. In other words, a camera on the front of your drone streams video live to VR-like goggles that you wear. Instead of flying the drone by a line of sight, you fly the drone using this video feed. FPV lets you do more acrobatic maneuvers and basically fly the drone better (because you see what the drone sees). Although I have been flying drones for a while now, none of mine have used FPV. I wanted to explore it without spending much money in order to see what it is like. I had heard of the Tiny-Whoop concept before, and I was interested in it. The Tiny-Whoop style quad is basically a cheap micro quadcopter that you can buy for around $35 to $50 that you add a camera to. Also, you need to buy a pair of FPV goggles in order to complete the setup. My friend was selling his micro quad for $40, so I bought it. Also, you need a transmitter (remote control) that is compatible with the quadcopter. Another friend was selling a compatible remote control (Spektrum DX5e) for $20, so I purchased that as well. Next, I bought a small FPV camera and cheap goggles from Banggood.com. Once all the parts arrived, I soldered the camera power wires to 5V output on the quadcopter board in order to power it. Finally, I plugged the quad into my computer and opened Cleanflight, which is a configuration utility for quadcopters. I made sure the accelerometer was working and that the propellers were all spinning in the right directions. I also assigned the switches on my transmitter to do various actions, such as arm the quad or put it into self-level mode. Once the batteries and FPV goggles were charged, I fired everything up and tested it. I was surprised about how easy the whole FPV experience was. Besides Cleanflight there isn't much configuration, and the only slightly skilled task is the simple soldering for the camera. After flying this quad for a few weeks, I am in love with the whole concept, and plan to do more projects that incorporate FPV. Not only does it make you a better pilot, but it is also a lot of fun to try and avoid obstacles or do tough maneuvers around the house. This quad is very durable due to its replaceable plastic frame that encircles the propellers, and since it can be flow easily indoors, it is something to do when you cannot fly your bigger quads outside. See photos here.