Posts | Comments

Planet Arduino

Archive for the ‘joystick’ Category

There was a time when building realistic simulations of vehicles was the stuff of NASA and big corporations. Today, many people have sophisticated virtual cockpits or race cars that they use with high-resolution screens or even virtual reality gear. If you think about it, a virtual car isn’t that hard to pull off. All you really need is a steering wheel, a few pedals, and a gear shifter. Sure, you can build fans to simulate the wind and put haptics in your seat, but really the input devices alone get you most of the way there. [Oli] decided he wanted a quick and easy USB gear shifter so he took a trip to the hardware store, picked up an arcade joystick, and tied it all together with an Arduino Leonardo. The finished product that you can see in the video below cost about $30 and took less than six hours to build.

The Leonardo, of course, has the ability to act like a USB human interface device (HID) so it can emulate a mouse or a keyboard or a joystick. That comes in handy for this project, as you would expect. The computer simply has to read the four joystick buttons and then decide which gear matches which buttons. For example up and to the left is first gear, while 4th gear is only the down button depressed. A custom-cut wooden shifter plate gives you the typical H pattern you expect from a stick shift.

Of course, the joystick doesn’t have a long handle like a true stick shift, so [Oli] added some extensions. In addition, a real shifter doesn’t require you to hold it in position as a joystick would. To rectify this, the shifter plate has magnets that grab the stick and hold it. They aren’t strong enough that you can’t move the stick, but they are strong enough to keep it from moving on its own.

We noticed that the design doesn’t allow for a clutch, so it isn’t quite the same as driving a real stick. However, [Oli] mentions several upgrades he has in mind and a clutch is one of them. Some haptics would be a cool addition so could feel the gears grind if you didn’t do the shift correctly.

The last shifter we saw like this was 3D printed. It is getting harder to find a car in the US with a manual transmission, but [Kristina Panos] is definitely a fan.

First the robots took our jobs, then they came for our video games. This dystopian future is brought to you by [Little French Kev] who designed this adorable 3D-printed robot arm to interface with an Xbox One controller joystick. He shows it off in the video after the break, controlling a ball-balancing physics demonstration written in Unity.

Hats off to him on the quality of the design. There are two parts that nestle the knob of the thumbstick from either side. He mates those pieces with each other using screws, firmly hugging the stick. Bearings are used at the joints for smooth action of the two servo motors that control the arm. The base of the robotic appendage is zip-tied to the controller itself.

The build targets experimentation with machine learning. Since the computer can control the arm via an Arduino, and the computer has access to metrics of what’s happening in the virtual environment, it’s a perfect for training a neural network. Are you thinking what we’re thinking? This is the beginning of hardware speed-running your favorite video games like [SethBling] did for Super Mario World half a decade ago. It will be more impressive since this would be done by automating the mechanical bit of the controller rather than operating purely in the software realm. You’ll just need to do your own hack to implement button control.

We would love to be a fly on the wall Christmas morning to see [Wilksyonreddit]’s kid tear the paper off of this adult-level busy box. Can you imagine the unbridled glee? It should certainly make the arduous six-month build worth the trouble. Here’s hoping the walls are sturdy, because we predict they will be bounced off of.

This gift that keeps on giving has an Arduino MEGA clone inside and a couple of shift registers to deal with all those buttons and switches. In addition to all the buttons, switches, and the number pad, there are two 3D-printed touch sensor pads that can detect little fingers up to four inches away. Although he’s already built a few games and activities for it, [Wilksy] posted this in r/duino looking for more ideas. There’s a lot to work with here on baby’s first nuclear missile launch console, both input- and output-wise. We humbly suggest 4D Simon, though we must admit to fantasizing about MIDI controllers.

Hidden inside this Christmas present is an Easter egg we think you’ll appreciate. Enter the right code, and the box becomes a treasure trove of Back to the Future sound effects and audio clips. Video’s after the break, McFly.

This box would make a great Kerbal Space Program controller, too, like this one.

 

 

One of our favorite things about the rise of hobbyist development ecosystems such as the Arduino is that it’s now possible to make a MIDI controller out of almost anything, as long as you have the the shields and the dedication. We’re glad that [James Bruton] takes the occasional break from making robots to detour into instrument making, because his latest creation turns it up to 11.

This awesome guitar uses a barcode scanner to play notes, and various arcade controls to manipulate those notes. The barcodes themselves scan as ASCII values, and their equivalent integers are sent to an external MIDI device. This futuristic axe is built on an Arduino Mega, with a USB shield for the barcode scanner, and a MIDI shield on top that [James] connects to various synths in the video after the break.

In between shooting barcodes, the right hand also controls octave shifting and changing MIDI channels with the joystick, and doing pitch-bends with the rotary encoder. The array of arcade buttons on the bottom neck let him switch between single player for monophonic synths, and multiplayer for polys. The other three buttons are press-and-scan programmable single-note sounders that assist in chord-making and noodling.

We particularly dig the construction, which is a combination of 20/20 and 3D printed boxes. [James] found some angled PVC to serve as fretboards for the four necks, and a nice backgrounds for bar codes.The only thing we would change is the native beep of the barcode scanner — either silence it forever or make it mutable, because it doesn’t jive with every note. It might be nice to get the gun to scan continuously so [James] doesn’t get trigger finger. Or better yet, build the scanner into a glove.

Want to do something more useful with that barcode scanner in your parts bin? Use it to manage your household inventory. But first, reacquaint yourself with the history of the humble barcode as presented by [Adam Fabio].

Thanks for the tip, [baldpower]!

It’s wasn’t so long ago that RC transmitters, at least ones worth owning, were expensive pieces of gear. Even more recently than that, the idea of an RC transmitter running an open source firmware would have been considered a pipe dream. Yet today buying cheap imported transmitters and flashing a community developed firmware (if it didn’t come with it pre-installed to begin with) is common place. It’s not much of a stretch to say we’re currently in the “Golden Age” of hobby RC transmitters.

But what if even cheap hardware running customizable software isn’t enough? What if you want to take it to the next level? In that case, [Electronoobs] has an Arduino powered RC transmitter with your name on it. But this is no scrap of protoboard with a couple of cheap joysticks on it, though he has made one of those too. The goal of this build was for it to look and perform as professional as possible while remaining within the hobbyist’s capabilities. The final product probably won’t be winning any design awards, but it’s still an impressive demonstration of what the individual hacker and maker can pull off today with the incredible technology we have access to.

So what goes into this homebrew radio control system? Inside the back panel [Electronoobs] mounted the batteries, charging module, and the voltage regulator which steps the battery voltage down to the 3.3 V required to drive the rest of the transmitter’s electronics. On the flip side there’s an Arduino Nano, an NRF24 module, and an OLED display. Finally we have an assortment of switches, buttons, potentiometers, and two very nice looking JH-D202X-R2 joysticks for user input.

As you might have guessed, building your own transmitter means building your own receiver as well. Unfortunately you won’t be able to bind your existing RC vehicles to this radio, but since the receiver side is no more complicated than another Arduino Nano and NRF24 module, it shouldn’t be hard to adapt them if you were so inclined.

Low-cost consumer RC transmitters can be something of a mixed bag. There are some surprisingly decent options out there, but it’s not a huge surprise that hackers are interested in just spinning up their own versions either.

The view from America has long seen French women as synonymous with thin and/or beautiful. France is well-known for culinary skill and delights, and yet many of its female inhabitants seem to view eating heartily as passé. At a recent workshop devoted to creating DIY amusements, [Niklas Roy] and [Kati Hyyppä] built an electro-mechanical sushi-eating game starring Barbie, American icon of the feminine ideal. The goal of the game is to feed her well and inspire a happy relationship with food.

Built in just three days, J’ai faim! (translation: I’m hungry!) lets the player satiate Barbie one randomly lit piece of sushi at a time. Each piece has a companion LED mounted beneath the surface that’s connected in series to the one on the game board. Qualifying sushi are determined by a photocell strapped to the underside of Barbie’s tongue, which detects light from the hidden LED. Players must race against the clock to eat each piece, taking Barbie up the satisfaction meter from ‘starving’ to ‘well-fed’. Gobble an unlit piece, and the score goes down.

The game is controlled with a lovely pink lollipop of a joystick, which was the main inspiration for the game. Players move her head with left and right, and pull down to engage the solenoid that pushes her comically long tongue out of her button-nosed face. Barbie’s brain is an Arduino Uno, which also controls the stepper motor that moves her head.

[Niklas] and [Kati] wound up using cardboard end stops inside the box instead of trying to count the rapidly changing steps as she swivels around. The first motor they used was too weak to move her head. The second one worked, but the game’s popularity combined with the end stops did a number on the gears after a day or so. Click past the break to sink your teeth into the demo video.

Barbie can do more than teach young girls healthy eating habits. She can also teach them about cryptography.

[Carson] didn’t know how to use an accelerometer until he wired one up to a Teensy and put it all in a hat. The result is a joystick that will probably cause you neck problems if you play video games for very long. You can see a video of how the device came to be and how it works, below.

We liked the approach of building up the circuit and testing it before integrating it with the hat. He used a small breadboard with half the Teensy pins hanging off. That seems to work, although we’d be worried about something shorting or floating pins causing issues. Of course, if you drove the disconnected pins as outputs or inputs with pullups that might not be a big deal.

A lot of the video is focused more upon the setup of the custom controller for some specific games, but it did seem to work well. We couldn’t help but be envious of anyone who can move their neck that much without aches and pains.

The controller didn’t seem very practical, if we’re honest, although he did get a little better at using it by the end of the video. It was a fun way to experiment with an accelerometer, however it would probably be nice to add a battery and some wireless communication so that you aren’t trailing a cable.

The code is available via Pastebin. About the biggest takeaway from that was the need to program a dead zone so that tiny movements don’t turn into control inputs.

If you are more interested in how these accelerometers work — which is quite interesting — [Bill Hammack] has just the video for that. If moving your head isn’t really your cup of tea, you can use the same ideas for gesture control, as well.

There are plenty of PC joysticks out there, but that didn’t stop [dizekat] from building his own. Most joysticks mechanically potentiometers or encoders to measure position. Only a few high-end models use Hall effect sensors. That’s the route [dizekat] took.

Hall effect sensors are non-contact devices which measure magnetic fields. They can be used to measure the position and orientation of a magnet. That’s exactly how [dizekat] is using a trio of sensors in his design. The core of the joystick is a universal joint from an old R/C car. The center section of the joint (called a spider) has two one millimeter thick disc magnets glued to it. The Hall sensors themselves are mounted in the universal itself. [Dizekat] used a small piece of a chopstick to hold the sensors in position while he found the zero point and glued them in. A third Hall effect sensor is used to measure a throttle stick positioned on the side of the box.

An Arduino micro reads the sensors and converts the analog signal to USB.  The Arduino Joystick Library by [Matthew Heironimus] formats the data into something a PC can understand.

While this is definitely a rough work in progress, we’re excited by how much [dizekat] has accomplished with simple hand tools and glue. You don’t need a 3D printer, laser cutter, and a CNC to pull off an awesome hack!

If you think Hall effect sensors are just for joysticks, you’d be wrong – they work as cameras for imaging magnetic fields too!

A robot assistant would make the lives of many much easier. Luckily, it’s possible to make one of your own with few fancy materials. The [circuito.io] team demonstrates this by building a robot arm out of recyclables!

With the exception of the electronics — an Arduino, a trio of servo motors, and a joystick — the arm is made almost completely out of salvaged recyclables: scrap wood, a plastic bottle, bits of plastic string and a spring. Oh, and — demonstrating yet another use for those multi-talented tubers — a potato acts as a counterweight.

Instead of using screws or glue, these hackers used string made from a plastic bottle as a form of heat shrink wrap to bind the parts of the arm together. The gripper has only one pivoting claw for greater strength, and the spring snaps it open once released. Behold: your tea-bag dunking assistant.


Code for the project is available to download from their site. Given this straightforward tutorial, it’s hard to find a reason NOT to embark on building your first robot arm — if you haven’t already begun.

We at Hackaday love seeing projects that strive to reuse materials in inventive ways. That said, you needn’t rely on a shiny new Arduino for this robot arm. If you have an aging palm pilot kicking around, that will also do the trick.


Filed under: Arduino Hacks, hardware, robots hacks

[Nicolas Berger] submits his six degree of freedom mouse project. He hopes to do things like control a robot arm or fly an alien mothership.

We thought the construction was really neat; suspending a wooden ball in the middle of three retractable key rings. By moving the ball around you can control the motion of a cube displayed on the computer. We first thought this was done by encoders or potentiometers measuring the amount of string coming out of the key fobs. However, what’s actually happening is a little bit cleverer.

[Nicolas] has joined each string with its own 2 axis joystick from Adafruit. He had some issues with these at first because the potentiometers in the joysticks weren’t linear, but he replaced them with a different module and got the expected output. He takes the angle values from each string, and a Python program numerically translates the output from the mouse into something the computer likes. The code is available on his GitHub. A video of the completed mouse is after the break.


Filed under: Arduino Hacks, peripherals hacks


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook