Posts with «arduino hacks» label

Laser Cutter Alignment Mod Skips Beam Combiner

A lot of the DIY laser engravers and cutters we cover here on Hackaday are made with laser diodes salvaged from Blu-ray drives and projectors, which are visible lasers in the 400 – 450nm range (appearing as violet or blue). Unfortunately there is an upper limit in terms of power on visible diode lasers, most builds max out at 5W or so. If you need more power than that, you’ll likely find yourself looking at gas laser cutters like the K40. While the K40 is a great starting point if you’re looking to get into “real” lasers, it’s a very different beast from the homebrew builds using visible lasers.

With a gas laser the beam itself is invisible, making it much more difficult to align or do test runs. One solution is to add a visible laser to the K40 which can be used to verify alignment, but making sure it’s traveling down the same path as the primary laser usually requires an expensive beam combiner. Looking to avoid this cost, [gafu] wanted to see if it was possible to simply move the visible laser into the path of the primary beam mechanically.

An adjustable microswitch detects when the lid has been opened.

In the setup that [gafu] has come up with, a cheap laser module (the type from a handheld laser pointer) is moved into the path of the primary laser on an arm that’s actuated by a simple hobby servo. To prevent the primary and visible lasers from firing at the same time, an Arduino is used to control the servo given the current state of the K40’s lid. If the lid of the K40 is open, the primary laser is shutoff and the visible laser is rotated into position so the operator can see where the primary laser’s beam would be hitting. Once the lid is closed, the visible laser rotates out of the way and the primary is powered back up.

Running the cutting or engraving job with the lid of the K40 machine open now let’s [gafu] watch a “dry run” of the entire operation with the visible laser before finally committing to blasting the target with the full power beam.

We’ve covered many hacks and modifications for everyone’s favorite entry-level CO2 laser cutter. From replacing the controller to making it bigger, K40 owners certainly seem like a creative bunch.


Filed under: Arduino Hacks, hardware, Laser Hacks

The Internet of Blast Gates

There’s nothing quite like building out a shop filled with tools, but even that enviable task has a lot of boring work that goes into it. You’ve got to run power, you’ve got to build benches, and you need to build a dust collection system. That last one is usually just fitting a bunch of pipe and tubes together and adding in a few blast gates to direct the sucking of your dust collection system to various tools around the shop.

For most shops with a handful of tools and dust collection ports, manually opening and closing each blast gate is an annoying if necessary task. What if all of this was automated, though? That’s what [Bob] over on I Like To Make Stuff did. He automated his dust collection system. When a tool turns on, so does the vacuum, and the right blast gate opens up automatically.

The first part of this build is exactly what you would expect for installing a dust collection system in a shop. The main line is PVC sewer pipe tied to the rafters. Yes, this pipe is grounded, and s otherwise not very interesting at all. The real fun comes with the bits of electronics. [Bob] modified standard blast gates to be servo-actuated. Each individual tool was wired up to a current sensor at the plug, and all of this was connected to an Arduino. With a big ‘ol relay attached to the dust collection system, the only thing standing in the way of complete automation was a bit of code.

This project is a continuation of [Bob]’s earlier Arduinofication of his dust collection system where all the blast gates were controlled by servos, an Arduino, and a numeric keypad. That’s an exceptionally functional system that gets around the whole ‘leaning over a machine to open a gate’ problem, but it’s still not idiot-proof – someone has to press a button to open a gate. This new system is, for the most part, completely automatic and doesn’t really require any thought on the part of the operator. It’s neat stuff, and a great application of cheap Arduinos to make shop life a bit easier.


Filed under: Arduino Hacks, Tool Hacks

Gesture Control for Lunch Money

[Dimitris Platis] wanted to add gesture control to his PC. You’d think that would be expensive, but by combining a diminutive Arduino, a breakout board with a gesture controller, and an interconnect PCB, he managed to pull it off for about $7. That doesn’t include the optional 3D-printed case and we think you could omit the interconnect board if you don’t mind some wires and further cut costs. [Dimitris] calls it Nevma, and you can see how the device works in the video below.

The heart of the project is a sensor that measures light and motion. The chip and the breakout board are just a couple of bucks if you order them from China. You can find them in the US if you don’t mind spending a little bit more. The device has an I2C interface, and [Dimitris] uses a tiny Mini SS Micro for the USB interface and the CPU.

The sensor chip is made for the mobile phone market and can also sense proximity. From its data sheet:

Gesture detection utilizes four directional photodiodes to sense reflected IR energy… The architecture of the the gesture engine features automatic activation (based on proximity engine results), ambient light subtraction, cross-talk cancellation, dual 8-bit data converters, power saving inter-conversion delay, 32-dataset FIFO, and interrupt-driven I2C communications.

That seems like a lot of power for a few bucks. Sparkfun has a library (and a matching board) and [Dimitris] uses it. The library is released as beerware. In particular, the documentation says: “The code is beerware; if you see me (or any other SparkFun employee) at the local, and you’ve found our code helpful, please buy us a round!”

We really like Nevma. You don’t have to hold any device in your hand. It also looks slicker than the solutions we’ve seen (and even created) using SONAR.


Filed under: Arduino Hacks

Modified Uke Keeps the Beat with a Solenoid

A classic one-man band generally features a stringed instrument or two, a harmonica in a hands-free holder, and some kind of percussion, usually a bass drum worn like a backpack and maybe some cymbals between the knees. The musician might also knock or tap the sound-boards of stringed instruments percussively with their strumming hand, which is something classical and flamenco guitarists can pull off with surprising range.

The musician usually has to manipulate each instrument manually. When it comes to percussion, [JimRD] has another idea: keep the beat by pounding the soundboard with a solenoid. He built a simple Arduino-driven MOSFET circuit to deliver knocks of variable BPM to the sound-board of a ukulele. A 10kΩ pot controls the meter and beat frequency, and the sound is picked up by a mic on the bridge. So far, it does 3/4 and 4/4 time, but [JimRD] has made the code freely available for expansion. Somebody make it do 5/4, because we’d love to hear [JimRD]  play “Take Five“.

He didn’t do this to his good uke, mind you—it’s an old beater that he didn’t mind drilling and gluing. We were a bit skeptical at first, but the resonance sweetens the electromechanical knock of the solenoid slug. That, and [JimRD] has some pretty good chops. Ax your way past the break to give it a listen.

Got a cheap ukulele but don’t know how to play it? If you make flames shoot out from the headstock, that won’t matter as much. No ukes? Just print one.


Filed under: Arduino Hacks, Musical Hacks

Modernizing a 170 year old Antique Grandfather Clock

Frankly, we let out a yelp of despair when we read this in the tip line “Antique Grandfather clock with Arduino insides“! But before you too roll your eyes, groan, or post snark, do check out [David Henshaw]’s amazing blog post on how he spent almost eight months working on the conversion.

Before you jump to any conclusions about his credentials, we must point out that [David] is an ace hacker who has been building electronic clocks for a long time. In this project, he takes the antique grandfather clock from 1847, and puts inside it a new movement built from Meccano pieces, stepper motors, hall sensors, LEDs, an Arduino and lots of breadboard and jumper wires while making sure that it still looks and sounds as close to the original as possible.

He starts off by building a custom electro-mechanical clock movement, and since he’s planning as he progresses, meccano, breadboard and jumper wires were the way to go. Hot glue helps preserve sanity by keeping all the jumper wires in place. To interface with all of the peripherals in the clock, he decided to use a bank of shift registers driven from a regular Arduino Uno. The more expensive DS3231 RTC module ensures better accuracy compared to the cheaper DS1307 or similar clones. A bank of RGB LEDs acts as an annunciator panel inside the clock to help provide various status indications. The mechanical movement itself went through several iterations to get the time display working with a smooth movement of the hands. Besides displaying time, [David] also added a moon phase indicator dial. A five-rod chime is struck using a stepper motor driven cam and a separate solenoid is used to pull and release three chime hammers simultaneously to generate the loud gong sounds.

And here’s the amazing part – he did all of this before laying his hands on the actual grandfather clock – which was shipped to him in California from an antique clock specialist in England and took two months to arrive. [David] ordered just the clock housing, dial/face and external parts, with none of the original inner mechanism. Once he received it, his custom clock-work assembly needed some more tweaking to get all the positions right for the various hands and dials. A clock like this without its typical “ticktock” sound would be pretty lame, so [David] used a pair of solenoids to provide the sound effect, with each one being turned on for a different duration to produce the characteristic ticktock.

At the end of eight months, the result – christened Judge – was pretty satisfying. Check the video below to judge the Judge for yourself. If you would like to see some more of [David]’s clockwork, check out Dottie the Flip Dot Clock and A Reel to Reel Clock.


Filed under: Arduino Hacks, clock hacks

Roll Your Own Arduino PWM

Most projects are built on abstractions. After all, few of us can create our own wire, our own transistors, or our own integrated circuits. A few months ago, [Julian Ilett] found a problem using the Arduino library for PWM. Recently, he revisited the issue and used his own PWM code to fix the problem. You can watch the video below.

Of course, neither the Arduino library nor [Julian’s] code is actually producing PWM. The Atmel CPU’s hardware is doing the work. The Arduino library gives you a wrapper called analogWrite — especially handy if you are not using an Atmel CPU where the same abstraction will do the same work. The issue arose when [Julian] broke the abstraction to invert the PWM output.

The video does a good job of framing the issue. Setting the PWM hardware to zero still causes a one tick output to occur. That is, the actual count is the count you supply plus one. That’s great on the high end where 255 is treated as 256 out of 256. But at the low end, a zero counterintuitively gives you 1/256. The Arduino library authors elected to detect that edge case and just force the output pin to go low in that case. When inverted, however, the pin still goes low when it ought to go high. You can see the source code responsible, below.

pinMode(pin, OUTPUT);
if (val == 0)
  {
  digitalWrite(pin, LOW);
  }
else if (val == 255)
  {
  digitalWrite(pin, HIGH);
  }
else
{ ...

Oddly, the 255 case appears to be superfluous in the normal case but is also backward if you invert the output. In all fairness, the Arduino library doesn’t provide you a way to invert the output, so you’ve already broken the abstraction and that’s why this isn’t technically a bug in the library.

[Julian’s] code is quite simple. There’s initial set up of the TCCR1A and TCCR1B registers along with ICR1. The DDRB register sets the pin as an output. After that, writing to OCR1A and OCR1B set the PWM value. The video explains it all in great detail.

We’ve looked at PWM on FPGAs at least once, and that post gives some background on PWM in any application. We also have our own video from way back in 2011 about PWM.


Filed under: Arduino Hacks
Hack a Day 12 Nov 12:00

Automating a Bowl Feeder with Arduino

Search for “bowl feeder” on Hackaday and you’ll get nothing but automated cat and dog feeders. That’s a shame, because as cool as keeping your pets fed is, vibratory bowl feeders are cooler. If you’ve seen even a few episodes of “How It’s Made” you’re likely to have seen these amazing yet simple devices, used to feed and align small parts for automated assembly. They’re mesmerizing to watch, and if you’ve ever wondered how parts like the tiny pins on a header strip are handled, it’s likely a bowl feeder.

[John] at NYC CNC is building a bowl-feeder with Arduino control, and the video below takes us on a tour of the build. Fair warning that the video is heavy on the CNC aspects of milling the collating outfeed ramp, which is to be expected from [John]’s channel. We find CNC fascinating, but if you’re not so inclined, skip ahead to the last three minutes where [John] discusses control. His outfeed ramp has a slot for an optical sensor to count parts. For safety, the Arduino controls the high-draw bowl feeder through an external relay and stops the parts when the required number have been dispensed.

We know, watching someone use a $20,000 CNC milling station might seem overkill for something that could have been 3D printed, but [John] runs a job shop after all and usually takes on big industrial jobs. Or small ones, like these neat color-infill machine badges.


Filed under: Arduino Hacks, misc hacks, tool hacks

Stop Motion with the Time Glove

What do you get when you put an ultra-bright LED in the palm of a glove, and strobe it controlled by an accelerometer? A Time Control Glove! In creator [MadGyver]’s own words, it’s “just a stroboscope with frequency adjustment” but the effect is where all the fun is.

The Time Control Glove uses the stroboscopic effect, which many of us have seen used in timeless water drop fountains where the strobe rate makes drops appear to change speed, freeze in place, and even change direction. [MadGyver] made the entire assembly portable by putting it into a glove. An on-board accelerometer toggles the strobe in response to a shake, and the frequency is changed by twisting the glove left or right. The immediate visual feedback to the physical motions is great. The whole effect is really striking on the video, which is embedded below.

Schematics and bill of materials are available on GitHub. Brilliant work! And while we’re discussing the stroboscopic effect, find out how it can be used to tune guitar strings.

[via Arduino Blog]


Filed under: Arduino Hacks, how-to, led hacks

Listening for Hand Gestures

[B. Aswinth Raj] wanted to control a VLC player with hand gestures. He turned to two common ultrasonic sensors and Python to do the job. There is also, of course, an Arduino. You can see a video of the results, below.

The Arduino code reads the distance from both sensors — one for the left hand and the other for the right. This allows the device to react to single hand gestures that get closer or further away from one sensor as well as gestures involving both hands. For example, raising your left hand and moving it closer or further away will adjust the volume. The right hand controls rewind and fast forward. Raising both hands will start or stop playback.

Of course, since the Arduino is reading the gestures you could change them to suit you. We might have mounted the sensors further back (or, perhaps, added more sensors) so you could use trigonometry to triangulate the hand’s exact position. Well, perhaps not exact, but you could get an idea of the hand’s motion from right to left as well as forward and backward.

On the host computer side, Python receives serial data from the Arduino and then simulates keystrokes to get the desired result. Of course, this is also highly customizable.

By coincidence, we did a similar project a few years ago using one sensor and the Arduino’s ability to appear like a USB keyboard. We’ve also seen 8 sensors making piano music.


Filed under: Arduino Hacks
Hack a Day 02 Nov 03:00

Add Intuitiveness to OpenSCAD With Encoders

The first time I saw 3D modeling and 3D printing used practically was at a hack day event. We printed simple plastic struts to hold a couple of spring-loaded wires apart. Nothing revolutionary as far as parts go but it was the moment I realized the value of a printer.

Since then, I have used OpenSCAD because that is what I saw the first time but the intuitiveness of other programs led me to develop the OpenVectorKB which allowed the ubiquitous vectors in OpenSCAD to be changed at will while keeping the parametric qualities of the program, and even leveraging them.

All three values in a vector, X, Y, and Z, are modified by twisting encoder knobs. The device acts as a keyboard to

  1. select the relevant value
  2. replace it with an updated value
  3. refresh the display
  4. move the cursor back to the starting point

There is no software to install and it runs off a Teensy-LC so reprogramming it for other programs is possible in any program where rotary encoders may be useful. Additional modes include a mouse, arrow keys, Audacity editing controls, and VLC time searching.

Here’s an article in favor of OpenSCAD and here’s one against it. This article does a good job of explaining OpenSCAD.

[Editor’s note: This is a Hackaday writer’s hack, hence the “I” in place of the usual “we”. We all love custom peripherals though, and a good number of us love OpenSCAD, so you could probably read it either way, but we don’t want to take credit for [Brian]’s work.]


Filed under: 3d Printer hacks, Arduino Hacks