Mouse Emulation With an Analog Joystick and Arduino

another view of arduino joystick circuitMy latest mini-project has been hooking an analog joystick up to an Arduino to make my own joystick computer mouse…plus I have some news… my soldering iron

I got a soldering iron for Christmas! YAY! I desoldered an analog joystick from an old PlayStation 2 controller (see my Tear Down from a while back), and bought a joystick breakout board from SparkFun so I could fit the joystick into a breadboard. I originally made my own breakout board using a PCB etching kit, but it just got messy and I decided to save myself the hassle and just buy one.

This is the breakout board I was making for the joystick. It didn't come out too good.
This is the breakout board I was making for the joystick. It didn’t come out too good, as I drilled the holes too big and the solder ran through.

I practiced using my soldering iron quite a bit over the holidays and I feel like I’m finally getting the hang of it! I soldered the joystick along with some old headers from a furnace board without a hitch!

arduino joystick breakout with controller pad
This is the finished analog joystick soldered to the breakout board.

I then wired it up on the breadboard, along with my Arduino Micro (which can emulate a mouse and keyboard, unlike most of the other Arduino boards), an LED indicator light, a toggle switch, and two pushbuttons to act as right and left click mouse buttons. The toggle switch shuts the mouse on and off, and the LED indicates if it’s on or off. I tested it out on my laptop and my Raspberry Pi, and it works great! Certainly it’s more interesting to use a joystick than a regular mouse!

arduino joystick mouse final circuit
This is the finished circuit.

Check out the software on GitHub Gist here. I had some help from the Arduino website, as well as from Jeremy Blum’s excellent book Exploring Arduino.

analog_joystick_bb
Breadboard schematic of circuit.

Designing a Helicopter

Helicopter 2050_459 AeroFish_Image 1_Hand Drawing_Amanda C
My technical drawing of the helicopter design.

Okay,  okay, so this is kind of an off-topic post. But it does involve engineering design and materials engineering, so I thought I’d share it.

A couple of months ago, I entered a national competition to design an eco-friendly helicopter of the future. I didn’t win, but I wanted to share what I came up with! I had a lot of fun coming up with ideas, and I learned quite a bit about the physics and jargon of helicopters.

I designed my helicopter to be ultralight, entirely self-powered, and sensor-integrated to increase safety and efficiency. I named it the 459 AeroFish because it’s all-terrain and can easily float on water. The 459 part is completely arbitrary though, it was a random number that I thought sounded good.

The best part of my helicopter is that it’s made of aerogel, a super lightweight gel that’s made of 98% air and is one of the world’s best thermal insulators.

Image of Aerogel from Wikipedia

The 459 AeroFish is powered in two different ways. During startup and sustained lengths of travel, the helicopter uses hydrogen fuel, which is zero emissions and can be derived from the environment. Current methods of mining liquid hydrogen are extremely expensive both monetarily and energy-wise, but in the future hydrogen could be easier to obtain as the collection methods improve.Helicopter 2050_459 AeroFish_Image 2_Elevation Views_Amanda C

The 459 AeroFish’s prime power source, though, comes from millions of microscopic nanogenerators embedded in the aerogel skin of the helicopter. These nanogenerators are capable of converting the vibrative energy of wind turbulence into an electric charge that can power the helicopter’s engine. By reducing the aerodynamic drag on the helicopter, the overall energy required to power the helicopter decreases!

The helicopter has an inflatable pontoon, which can be used to land in water. It also has landing struts that can fold in like an airplane’s to further reduce drag during flight.

The following is a detail drawing I did of my helicopter, including a close-up of the nanogenerators.  This and the elevation image above were created using Adobe Photoshop Elements based off of my original hand drawing.

Helicopter 2050_459 AeroFish_Image 3_Multiple views and nanogenerators_Amanda CBelow is the abstract I wrote about the helicopter if you want to read about the details.

The 459 AeroFish is an extremely lightweight aircraft that is able to sustain its own energy source through the use of piezoelectric nanogenerators and hydrogen fuel cells. Intended for human search and rescue, wildlife conservation, and scientific research, especially in aqueous environments, the 459 AeroFish can land competently on both land and water. It has an extremely large non-stop flying range (approx. 1100 km) and it can dock safely in bodies of water for long periods of time with the help of its inflatable pontoons. Scientists can use the helicopter to conduct oceanic and biological research far out on the open sea, as well as in isolated biomes such as wetlands, islands, marshes, and the arctic. The long range also helps first-responders and military units in major disaster areas carry out sustained search and rescue operations.

The 459 AeroFish is constructed out of organic aerogel (an extremely low density substance made of over 99% air), carbon nanotubes, and six composite rotor blades. The 459 AeroFish’s small form factor, lightweight construction, and turbulence reduction due to the nanogenerators make it as aerodynamic as possible. The AeroFish is also equipped with sophisticated sensor integration and an internet-connected computer information system. Sensors located in the front of the body, in the aerogel exterior, and within the moving parts provide information such as the amount of energy being gathered by the nanogenerators, the stress on the rotor blades, and the condition of the engine parts and electrical system. This data, which is projected in 3D on the helicopter’s windshield, helps the pilot (or autopilot) steer the aircraft more efficiently, budget energy, and determine if parts are in need of repair or replacement before they become a problem.

The 459 AeroFish is entirely self-powered. Piezoelectric nanogenerators provide the main source of energy during the flight dynamic. Millions of tiny nanogenerators are embedded into the surface of the aerogel skin of the helicopter, and they convert the mechanical energy of wind turbulence into electrical potential. Because of its conductive properties, the aerogel is able to store the generated electricity. The nanogenerators not only generate electricity, they also reduce the force of wind turbulence on the helicopter, converting kinetic energy into electric potential.

In order to start up and sustain its power over long periods of flight, the 459 AeroFish also is powered by liquid hydrogen fuel. This fuel is stored within the carbon nanotubule hexagonal exoskeleton, so it does not take up space within the helicopter’s engine or main motor system. Alkaline fuel cells located in the rear of the helicopter’s body generate electricity by converting hydrogen and oxygen into pure water. The water can then be dispelled out of the helicopter, used as drinking water by passengers, or be electrolyzed to form more liquid hydrogen fuel.

Besides its sustainable energy system, the 459 AeroFish’s entire outside surface is made from an inexpensive biodegradable substance called safe emulsion agar gel (SEAgel), a type of organic aerogel. This ultra-light material, with a density less than that of air, consists of air-dried agar, a natural material derived from sea algae. SEAgel is even edible, and is easily replaced should the helicopter be surface damaged. The SEAgel aerogel on the AeroFish contains the nanogenerators and stores their electricity. In addition, due to its heat insulative properties, also keeps the temperature inside the helicopter comfortable for the passengers.

The 459 AeroFish is radically different compared to today’s helicopters. It is designed to be extremely lightweight and therefore require less energy overall. Instead of being made from aluminum alloys and steel, the copter consists mainly of aerogel and carbon nanotubes, making it up to six times lighter than contemporary helicopters of a similar size. The extractable landing struts as well as its overall aerodynamic smooth shape reduce in-flight drag even more.  

The biggest advantage of the 459 AeroFish over the conventional helicopters of today is its combination of a few small improvements that make a vast difference in performance. The helicopter’s energy efficiency and energy sustainability make it emissions safe and zero cost to power. The inflatable pontoon and landing strut combination turn it into a versatile land or water aircraft. It’s computer information system and sensor integration make piloting easier, safer, and more efficient.