$20 Sip-and-Puff Mouse From E-Cig And 3D Printing

At Hackaday, we think the highest form of hacking is hacking for good. Sure, it’s fun to build robots and gadgets, and universal remotes. But it is even better to create things that make people’s lives better. In that spirit, we enjoyed seeing the Assistive Tech Challenge over on Thingiverse that ended last month. The winner was [0_o] who used 3D printing and an Arduino to produce a mouth-operated mouse for under $20.

sip-sensor-from-ecigInstructions on Thingiverse can be spotty, but [0_o] did an excellent job of laying out what you need to buy and how to assemble it. One of the most interesting parts of the build is the blow sensor. [0_o] tore apart a $5 electronic cigarette and used the sensor within. The mouthpiece is moved like a joystick to actuate the cursor, and the user blows into it for the mouse clicks. Perhaps not a true sip-and-puff system but it made us wonder what other uses you might find for these sensors.

You can see a video about the mouse after the break. These kinds of projects have the power to make someone’s life better and what could be better than that?

Continue reading “$20 Sip-and-Puff Mouse From E-Cig And 3D Printing”

Reading Smart Cards From A PLC (with A Little Arduino Help)

If you’ve spent any time on a factory or plant floor, it is a good bet you’ve run into PLCs (Programmable Logic Controllers). These are rugged computers that do simple control and monitoring functions, usually using ladder logic to set their programs. [plc4u] wanted to connect a smart card reader to an Allen Bradley PLC, so he turned to an Arduino to act as a go-between.

The Arduino talks to a USB card reader using a USB host shield. Then it communicates with the PLC using an RS232 link and the DF1 protocol that most Allen Bradley PLCs understand. You may not need a smart card, but once you know how to communicate between an Arduino and the PLC, you could do many different projects that leverage other I/O devices and code available on the Arduino and connects to existing PLC installations. Just remember that you’ll probably need to ruggedize the Arduino a bit to survive and be safe to the same level as a PLC (which might include a NEMA enclosure or even an explosion-proof box).

Continue reading “Reading Smart Cards From A PLC (with A Little Arduino Help)”

Code Craft – Embedding C++: Templates

The language C++ is big. There is no doubting that. One reason C++ is big is to allow flexibility in the technique used to solve a problem. If you have a really small system you can stick to procedural code encapsulated by classes. A project with a number of similar but slightly different entities might be best addressed through inheritance and polymorphism.

A third technique is using generics, which are implemented in C++ using templates. Templates have some similarities with #define macros but they are a great deal safer. The compiler does not see the code inserted by a macro until after it has been inserted into the source. If the code is bad the error messages can be very confusing since all the developer sees is the macro name. A template is checked for basic syntax errors by the compiler when it is first seen, and again later when the code is instantiated. That first step eliminates a lot of confusion since error messages appear at the location of the problem.

Continue reading “Code Craft – Embedding C++: Templates”

Ball Balancing Arduino-Style

If you have a good sense of balance, you can ride a unicycle or get on TV doing tricks with ladders. We don’t know if [Hanna Yatco] has a good sense of balance or not, but we do know her Arduino does. Her build uses the ubiquitous HC-SR04 SONAR sensor and a servo.

This is a great use for a servo since a standard servo motor without modifications only moves through part of a circle, and that’s all that’s needed for this project. A PID algorithm measures the distance to the ball and raises or lowers a beam to try to get the ball to the center.

Continue reading “Ball Balancing Arduino-Style”

Encryption For Arduino With Spritz

Hackaday.io user [Abderraouf] has written an implementation of the new(ish) Spritz cipher and hash for Arduino. While we’re not big enough crypto-nerds to assess the security of the code, it looks like it’s going to be pretty handy.

Spritz itself is a neat cipher. Instead of taking in fixed blocks of data and operating on them, it allows you to process it in (almost) whatever chunks it comes in naturally, and then extract out the encrypted results piecewise. It works both as a two-way cipher and as a one-way hash function. It looks like Spritz is a one-stop-shop for all of your encryption needs, and now you can run it on your Arduino.

In case you are afraid of new implementations of new ciphers (and you should be), Spritz’s pedigree should help to put you at ease: it was developed by [Ron Rivest] to be a successor to his RC4 algorithm, and it incorporates a lot of the lessons learned about that algorithm over the past. This doesn’t exclude subtle flaws in the implementation of the library (no offence, [Abderraouf]!) or your work downstream, but at least the underlying algorithm seems to be the real deal.

[Abderraouf] links it in his writeup, but just for completeness, here’s the Spritz paper (PDF). What crypto libraries do you currently use for Arduino or microcontroller projects? We’ve been fans of XXTEA for ages, but more because it’s simple and small than because it’s secure. Spritz may be simple enough to implement easily, and still more secure. Sweet.

Robot Listens To Commands–Literally

Where you might see a can, [Adam Kumpf] sees a robot. [Adam’s] robot (named [Canny]) doesn’t move around, but it does have expressive eyebrows, multicolored eyes, and a speaker for a mouth. What makes it interesting, though, is the fact that it receives audio commands via the headphones it wears. You can see [Canny] in action in the video below.

The headphones couple audio tones to [Canny’s] microphone using AFSK (audio frequency shift keying). [Canny] uses an opamp to bring the microphone level up and then uses a 567 PLL IC to decode the audio tones. [Adam] selected two clever frequencies for the mark and space (12345 Hz and 9876 Hz). In addition to being numerically entertaining, the frequencies are far enough apart to be easy to detect, pass through the headphones with no problem, and are not harmonically related.

Continue reading “Robot Listens To Commands–Literally”

Impressive NFC Controlled Infinity Mirror Table Cuts No Corners

If you’re looking to add a bit of the future to your living room, you might want to look at this tutorial to build a very professional infinity mirror table.

It’s an IKEA RAMVIK coffee table, modified to include RGB LEDs and a one-way mirror for that ever-so-awesome infinity effect. And technically, you only have to cut one hole in the table.

By placing a large mirror underneath the glass, wrapping the inner edge with a strip of RGB LEDs and coating the original glass top with a reflective car tint, it’s a pretty simple hack that results in a very polished product — not something that can be said for most of our projects!  But to make it even better, [Pierre] added an NFC chip under the table, allowing you to control the color with just a tap.

Continue reading “Impressive NFC Controlled Infinity Mirror Table Cuts No Corners”