Posts | Comments

Planet Arduino

Archive for the ‘joystick’ Category

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

[Gr4yhound] has been rocking out on his recently completed synth guitar. The guitar was built mostly from scratch using an Arduino, some harvested drum pads, and some ribbon potentiometers. The video below shows that not only does it sound good, but [Gr4yhound] obviously knows how to play it.

The physical portion of the build consists of two main components. The body of the guitar is made from a chunk of pine that was routed out by [Gr4yhound’s] own home-made CNC. Three circles were routed out to make room for the harvested Yamaha drum pads, some wiring, and a joystick shield. The other main component is the guitar neck. This was actually a Squire Affinity Strat neck with the frets removed.

For the electronics, [Gr4yhound] has released a series of schematics on Imgur. Three SoftPot membrane potentiometers were added to the neck to simulate strings. This setup allows [Gr4yhound] to adjust the finger position after the note has already been started. This results in a sliding sound that you can’t easily emulate on a keyboard. The three drum pads act as touch sensors for each of the three strings. [Gr4yhound] is able to play each string simultaneously, forming harmonies.

The joystick shield allows [Gr4yhound] to add additional effects to the overall sound. In one of his demo videos you can see him using the joystick to add an effect. An Arduino Micro acts as the primary controller and transmits the musical notes as MIDI commands. [Gr4yhound] is using a commercial MIDI to USB converter in order to play the music on a computer. The converter also allows him to power the Arduino via USB, eliminating the need for batteries.

[Thanks Wybren]


Filed under: Arduino Hacks, musical hacks
Apr
25

The joystick that changed a life and could help many more

aids, arduino, joystick, Kids, leonardo, muscular dystrophy, videogames Commenti disabilitati su The joystick that changed a life and could help many more 

joystick

Robert Book is a tinkerer by nature and works at Silicon Valley Bank with Ian McCutcheon, a geek by nature. One day they were talking and Robert shared his big problem: his son Jerry, who suffers from Muscular Dystrophy, couldn’t use a keyboard anymore but loved to play computer games. Jerry could only be able to use a mouse with his right hand and very limited abilities in his left.

After a chat they realized that if they put their heads together they could make something that might enable him to play the different computer games with more ease and enjoyment.
Ian knew that Arduino Leonardo has a great capability, it can emulate a keyboard and a mouse and soon they came up with the first release of an augmented joystick making Jerry much happier. This collaboration became a great story  you can watch in the video below and it’s going to make even more people happy thanks to the shared code to build the joystick yourself.

 

Gen
22

Gaming system inside an Atari joystick

arduino hacks, ardweeny, atari, joystick, pocket, pong Commenti disabilitati su Gaming system inside an Atari joystick 

gaming-system-inside-an-atari-controller

This original Atari controller is pretty small (take a look at that RCA cable for a sense of scale). Despite it’s size, [Kyle Brinkerhoff] managed to fit a complete gaming system inside the controller. This Pocket Sized Atari is a follow-up to another project he did called ArduPong which let him play Pong using a joystick and an Arduino. This rendition takes the external project box from that build and moves everything into one tight little package.

In the video after the break [Kyle] gives us a tour of the internals. The Arduino board he went with is an Ardweeny which is no bigger than the ATmega328 footprint so it can be easily mounted off to one side. The joystick internals have been replaced with the analog stick module from a PlayStation controller. That is where the button came from as well. Just connect this to a 9V battery and the composite video input of a TV and you’re ready to do some gaming!

Now if you just want that retro look for your Xbox Live games check out this Xbox 360 controller in an Atari joystick.


Filed under: arduino hacks
Mag
20

Part review – Sparkfun/LBE Thumb Joystick

arduino, joystick, part review, sparkfun, thumb, thumb controller, tronixstuff Commenti disabilitati su Part review – Sparkfun/LBE Thumb Joystick 

Hello readers

Today we examine an inexpensive yet fascinating little input device – the thumb joystick. Many people would recognise this as similar to the joystick in various types of gaming consoles, and they would be right. Let’s have a look:

In the image above the joystick has been soldered into the matching breakout board. Unless you are making your own PCBs, you will want the breakout board:

The joystick consists of two 10k variable resistors, spring-loaded with centre return; also a SPST button that is activated by pushing down on the joystick.

In order to use this joystick, we need an idea of the values that it can return. I have done this in three ways:

First of all, I connected a multimeter and measured the resistance of each axis. For the vertical axis, dead centre was 3.77k ohms, maximum up was 4.7k, with a maximum of 5.9k between centre and maximum – very odd. The vertical minimum was 83 ohms. For the horizontal, dead centre was  around 3.73k ohms, full left was 4.78k, via 5.38k; full right was 180 ohms without any odd high values in between. However, those values didn’t feel right.

Secondly,  I have recorded a visual representation of the horizontal and vertical axes’ effect on the supply voltage, using my little oscilloscope. With regards to the following two video clips, the supply voltage is 5V; the ‘scope display is set to 1V/division, with 0V at the bottom of the screen.

The horizontal axis:

and the vertical axis:

Finally, I connected the horizontal and vertical output to  analog inputs on my arduino, and used analogRead() to see how the joystick returned analogRead() values. The following video clip demonstrates this using an LCD to display the values. Furthermore, here is the sketch used for the following demonstration: demo sketch.pdf

It would seem that there is a lot of ‘dead area’… postions where there is no change in reading, where one would assume there to be a change. Again, this can be programmed out in your sketch by a little calibration and measurement.

Now we know what values it returns, we can start to understand how to control things. When it comes to use the joystick in your own projects, it would pay to recreate a measurement circuit and note down the values your joystick returns; in order to be able to calibrate your software to use the joystick appropriately you may need to compensate for the hardware irregularities of the joystick.

Overall however, it is an interesting and easy product to integrate into your projects. This post today is just an introduction, later on the joysticks will be used in other projects and so on.

High resolution photos are available on flickr.

As always, thank you for reading and I look forward to your comments and so on. Please subscribe using one of the methods at the top-right of this web page to receive updates on new posts. Or join our new Google Group.




  • 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