Posts | Comments

Planet Arduino

Archive for the ‘arduino hacks’ Category

We’re digging these daisy-chainable encoders built by [fattore.saimon]. Each module consists of a rotary encoder attached to a PCB with a PIC16F15386 on the back. As we’ve covered in the past, the Microchip released their feature-rich PIC16 microprocessor just this year, and it’s great to see them start to crop up in projects. With 4 address jumpers on the back of each PCB, [fattore.saimon] is able to connect up to 16 of the encoders on the bus. The modules also have male and female plugs so he can connect them physically as well, to simplify wiring. Each module also has a PWMable bicolor LED for keeping track of each encoder’s setting.

If you’re interested in making your own you can buy the PCBs from Tindie or download the project files from the creator’s GitHub, including an Arduino library.

We love encoders here on Hackaday — building DIY encoders, as well as using them in projects like this precision cutting jig. And definitely read our colleague [Al]’s great piece on encoders.

Filed under: Arduino Hacks

Quick Charge, Qualcomm’s power delivery over USB technology, was introduced in 2013 and has evolved over several versions offering increasing levels of power transfer. The current version — QCv3.0 — offers 18 W power at voltage levels between 3.6 V to 20 V.  Moreover, connected devices can negotiate and request any voltage between these two limits in 200 mV steps. After some tinkering, [Vincent Deconinck] succeeded in turning a Quick Charge 3.0 charger into a variable voltage power supply.

His blog post is a great introduction and walk through of the Quick Charge ecosystem. [Vincent] was motivated after reading about [Septillion] and [Hugatry]’s work on coaxing a QCv2.0 charger into a variable voltage source which could output either 5 V, 9 V or 12 V. He built upon their work and added QCv3.0 features to create a new QC3Control library.

To come to grips with what happens under the hood, he first obtained several QC2 and QC3 chargers, hooked them up to an Arduino, and ran the QC2Control library to see how they respond. There were some unexpected results; every time a 5 V handshake request was exchanged during QC mode, the chargers reset, their outputs dropped to 0 V and then settled back to a fixed 5 V output. After that, a fresh handshake was needed to revert to QC mode. Digging deeper, he learned that the Quick Charge system relies on specific control voltages being detected on the D+ and D- terminals of the USB port to determine mode and output voltage. These control voltages are generated using resistor networks connected to the microcontroller GPIO pins. After building a fresh resistor network designed to more closely produce the recommended control voltages, and then optimizing it further to use just two micro-controller pins, he was able to get it to work as expected. Armed with all of this information, he then proceeded to design the QC3Control library, available for download on GitHub.

Thanks to his new library and a dual output QC3 charger, he was able to generate the Jolly Wrencher on his Rigol, by getting the Arduino to quickly make voltage change requests.

Filed under: Arduino Hacks, hardware

When you’re sick or have a headache, you tend to see things a bit differently. An ill-feeling human will display a cognitive bias and expect the world to punish them further. The same is true of honey bees. They are intelligent creatures that exhibit a variety of life skills, such as decision-making and learning.

It was proven back in 2011 that honey bees will make more pessimistic decisions after being shaken in a way that simulates an attack by varroa destructor mites. The bees were trained to associate a reward of sugar-water with a particular odor and to associate foul-tasting punishment water with another odor—that of formic acid, a common treatment against varroa mites. When a third stimulus created by mixing the two odors was presented, the experimenters found that the aggravated bees were more likely to expect the bad odor. Sure enough, they kept their tongues in their mouths when they smelled the third odor. All the bees that weren’t shaken looked forward to sucking down a bit of sugar-water.

So, how does one judge a honey bee’s response? Whenever their antennae come in contact with something appetizing, they stick out their proboscis involuntarily to have a taste. This is called proboscis extension reflex (PER), and it’s the ingrained, day-one behavior that leads them to suck the nectar out of flower blossoms and regurgitate it to make honey.

[LJohann] is a behavioral biologist who wanted to test the effects of varroa mite treatment on bee-havior by itself, without agitating the bees. He built a testing apparatus to pump odors toward bees and judge their response which is shown in a few brief demo videos after the break. This device enables [LJohann] to restrain a bee, tantalize its antennae with sucrose, and pump a stimulus odor at its face on the cue of an LED and piezo buzzer. A fan mounted behind the bee helps clear the air of the previous scents. We especially like the use of a servo to swing the tube in and out of the bee’s face between tests.

[LJohann] and his colleagues concluded that the varroa mite treatment by itself does not make the bees pessimistic. This is great news for concerned apiarists who might be skeptical about using formic acid in the fight against the honey bee’s worst predator. Check out the brief demo videos after the break.

Hackaday has long been abuzz about bees whether they produce honey or not. We’ve covered many kinds of sweet projects like intelligent hives, remote hive weight monitoring, and man-made bee nest alternatives.

Filed under: Arduino Hacks

Sometimes we see projects whose name describes very well what is being achieved, without conveying the extra useful dimension they also deliver. So it is with [Prasanth KS]’s Windows PC Lock/Unlock Using RFID. On the face of it this is a project for unlocking a Windows PC, but when you sit down and read through it you discover a rather useful primer for complete RFID newbies on how to put together an RFID project. Even the target doesn’t do it justice, there is no reason why this couldn’t be used with any other of the popular PC operating systems besides Windows.

The project takes an MRFC-522 RFID module and explains how to interface it to an Arduino. In this case the Arduino in question is an Arduino Pro Micro chosen for its ability to be a USB host. The supplied code behaves as a keyboard, sending the keystroke sequence to the computer required to unlock it. The whole is mounted in what seems to be a 3D printed enclosure, and for ease of use the guts of the RFID tag have been mounted in a ring.

As we said above though, the point of this project stretches beyond a mere PC unlocker. Any straightforward RFID task could use this as a basis, and if USB is not a requirement then it could easily use a more run-of-the-mill Arduino. If you’re an RFID newbie, give it a read.

Plenty of RFID projects have made it here before, such as this door lock. And we’ve had another tag in a ring, too.

Filed under: Arduino Hacks, The Hackaday Prize

If Dorothy from The Wizard of Oz were to wake up in 2017, with her magic Ruby Slippers on her feet, she’d probably believe she had woken up in a magical world. But modern folks will need a little more magic to impress them. Like Clicking your heels thrice to get home with these Uber ruby slippers. [Hannah Joshua] was tasked by her employer to build a quirky maker project. She got an idea when a friend complained about having trouble hailing a cab at the end of a hard day at work.

[Hannah] started with ruby colored slippers with a platform toe and high heels to allow space to stuff in all the magic dust, err, electronic bits. The initial plan was to use an Arduino with a GSM/GPS shield but that would have needed a separate SIM card and data plan for the shoes. Instead, she opted for the 1Sheeld which connects to a smart phone over Bluetooth. The 1Sheeld gets access to all of the smart phone’s sensors including the GPS as well as the data connection. The Arduino and 1Sheeld are put in a cavity carved out in the toe section. The 9 V battery goes inside another cavity in the heel, where an activation switch is also installed. Three LED’s indicate when the shoe is active, the cab request is accepted, and when the cab is on its way.

The code is basic since this one of her first Arduino projects, but it gets the job done. It sends an http request to Uber’s API to request a cab. The destination is hard-coded, so the slippers only allow you to get from your current location to whatever destination is programmed. The GitHub repository provides code, as well as some additional information on construction. [Hannah] has also added notes explaining some of the design choices and things to take care about if you plan to build one of these magic slippers.

We covered the 1Sheeld when it was introduced several years back, and if you get your hands on one, try building this Hand Waving Door Unlocker.


Filed under: Arduino Hacks

When it comes to building a neural network to simulate complex behavior, Arduino isn’t exactly the first platform that springs to mind. But when your goal is to model the behavior of an organism with only a handful of neurons, the constraints presented by an Arduino start to make sense.

It may be the most important non-segmented worm you’ve never heard of, but Caenorhabditis elegans, mercifully abbreviated C. elegans, is an important model organism for neurobiology, having had its entire nervous system mapped in 2012. [Nathan Griffith] used this “connectome” to simulate a subset of the diminutive nematode’s behaviors, specifically movements toward attractants and away from obstacles. Riding atop a small robot chassis, the Arduino sends signals to the motors when the model determines it’s time to fire the virtual worm’s muscles. An ultrasonic sensor stands in for the “nose touch” neurons of the real worm, and when the model is not busy avoiding a touch, it’s actively seeking something to eat using the “chemotaxis” behavior. The model is up on GitHub and [Nathan] hopes it provides an approachable platform for would-be neuroroboticists.

This isn’t the first time someone has modeled the nematode’s connectome in silico, but kudos to [Nathan] for accomplishing it within the constraints an Arduino presents.

Filed under: Arduino Hacks, misc hacks

There are some debates that split the world down the middle. Serious stuff: M&Ms, or Smarties*? Yes, the two chocolate beans may bear a superficial resemblance to each other, but you’re either a Smartie lover, or an M&M lover. No compromises.

[Maximusvo] has sensibly dodged all questions of brand loyalty in his text if not in his images even though it’s obvious what kind of confectionery he’s working with in his candy vending machine. The hard-shell chocolates are loaded into a hopper, from which a colourful cascade is released onto a scale. When the desired weight has been accumulated, it is tipped into a drawer for the hungry recipient.

Behind it all is an Arduino with a motor to release the beans, a load cell to weigh them, and an LCD display to give a status report. A motor vibrates the chute to ensure they move down it, but as can be seen in the video demo below the break it’s not doing an entirely successful job. There is an external buzzer to indicate delivery, and aside from the wooden construction of the machine there are 3D printed parts in the scale.

Most of the vending machines we’ve shown you have involved not Smarties or M&Ms, but cans of soda. Perhaps your high school locker can house one, or failing that you’d like to raid someone else’s machine.

*European chocolate Smarties, that is, not American candy sweets.

Filed under: Arduino Hacks

[Johan Beyers] built an elegantly simple Dog Speedometer project that uses a POV display to display a running dog’s speed without the benefit of an accelerometer. Using an Arduino (looks like it might be a D-love) and a line of 5 LEDs, [Johan] built a dirt-simple POV — 39 lines of code — that times out the flashes so that an immobile viewer sees the dog’s speed. How do you know your pup’s loping speed? That’s the beauty of this project.

Instead of putting all of the LEDs in a line, they are arranged in a V-shape. Because of this spatial offset, the patterns flashed out only “look right” at the right speed. Each number is flashed at a different speed, so you just look for the least distorted numeral.

[Johan]’s code does only what it needs to get the job done. The character data are stored in arrays that are played back directly to the pins of PORTD — avoiding most of the usual Arduino-style complexity with pin definitions and other foolery.

POV displays can be leveraged to add pizzazz to any project — this CD-ROM POV clock and this wind-powered POV weather station come to mind.

Filed under: Arduino Hacks

Do jumper wires pulling out of your Uno have you pulling your hair out? Is troubleshooting loose jumpers making you lose your mind?  Are your projects backing up because of all the time you’ve lost keeping jumper wires secure in your Arduino Uno? Then you need the all new Ardunio Strain Relief Enclosure!

[Jeremy Cook] has had it with loose jumpers pulling out of his Uno, so he designed a case that not only secures the Arduino; it also keeps those dastardly jumper wires from pulling out at the most inconvenient times.

Composed of 3/4 inch thick MDF and 1/8 inch thick polycarbonate, the Arduino Strain Relief enclosure is sure to be a hit for every hacker’s work bench. [Jeremy] used a CNC router to cut the enclosure and top. The plastic top is secured to the MDF base via four 4-40 screws. Interestingly – he applied super glue to the screw holes in the MDF before tapping them. We’ll have to try this trick on our next project!

Filed under: Arduino Hacks

[Ash] built Moo-Bot, a robot cow scarecrow to enter the competition at a local scarecrow festival. We’re not sure if Moo-bot will win the competition, but it sure is a winning hack for us. [Ash]’s blog is peppered with delightful prose and tons of pictures, making this an easy to build project for anyone with access to basic carpentry and electronics tools. One of the festival’s theme was “Out of this World” for space and sci-fi scarecrows. When [Ash] heard his 3-year old son sing “hey diddle diddle, the cat and the fiddle…”, he immediately thought of building a cow jumping over the moon scarecrow. And since he had not seen any interactive scarecrows at earlier festivals, he decided to give his jumping cow a lively character.

Construction of the Moo-Bot is broken up in to three parts. The skeleton is built from lumber slabs and planks. The insides are then gutted with all of the electronics. Finally, the whole cow is skinned using sheet metal and finished off with greebles to add detailing such as ears, legs, spots and nostrils. And since it is installed in the open, its skin also doubles up to help Moo-bot stay dry on the insides when it rains. To make Moo-Bot easy to transport from barn to launchpad, it’s broken up in to three modules — the body, the head and the mounting post with the moon.

Moo-Bot has an Arduino brain which wakes up when the push button on its mouth is pressed. Its two OLED screen eyes open up, and the MP3 player sends bovine sounding audio clips to a large sound box. The Arduino also triggers some lights around the Moon. Juice for running the whole show comes from a bank of eight, large type “D” cells wired to provide 6 V — enough to keep Moo-Bot fed for at least a couple of months.

Check out the video after the break to hear Moo-bot tell some cow jokes – it’s pretty funny. We’re rooting for it to win the competition — Go Moo-bot.

If you’re hungry for more scarecrows, this isn’t the first we’ve seen.

Filed under: Arduino Hacks, robots 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