How Store Anti-Theft Alarms Work: Magnetostriction

Now that’s uncanny. Two days before [Ben Krasnow] of the Applied Science YouTube blog posted this video on anti-theft tags that use magnetostriction, we wrote a blog post about a firm that’s using inverse-magnetostriction to generate electricity. Strange synchronicity!

[Ben] takes apart those rectangular plastic security tags that end up embarrassing everyone when the sales people forget to demagnetize them before you leave the store. Inside are two metal strips. One strip gets magnetized and demagnetized, and the other is magnetostrictive — meaning it changes length ever so slightly in the presence of a magnetic field.

A sender coil hits the magnetostrictive strip with a pulsed signal at the strip’s resonant frequency, around 58kHz. The strip expands and contracts along with the sender’s magnetic field. When the sender’s pulse stops, the strip keeps vibrating for a tiny bit of time, emitting an AC magnetic field that’s picked up by the detector. You’re busted.

The final wrinkle is the magnetizable metal strip inside the tag. When it’s not magnetized at all, or magnetized too strongly, the magnetostrictive strip doesn’t respond as much to the sender’s field. When the bias magnet is magnetized just right, the other strip rings like it’s supposed to. Which is why they “demagnetize” the strips at checkout.

We haven’t even spoiled [Ben]’s explanation. He does an amazing job of investigating all of this. He even measures these small strips changing their length by ten parts per million. It’s a great bit of low-tech measurement that ends up being right on the money and deserves the top spot in your “to watch” list.

And now that magenetostriction is in our collective unconscious, what’s the next place we’ll see it pop up?

Continue reading “How Store Anti-Theft Alarms Work: Magnetostriction”

Conjuring Capacitive Touch Sensors From Paper And Aluminum Foil

Stumbling around YouTube, we found what has to be the lowest-tech method of producing a touchpad to make a capacitive touch keyboard, and we just had to share it with you. If you’re afraid of spoilers, skip down to the video below the break now.

[James Eckert] got his hands on a Freescale MPR121 capacitive touch sensor. The chip in question speaks I2C and senses up to twelve simultaneous capacitive sense electrodes; break-out boards are available in all of the usual places. It’s a sweet little part.

So [James] had to make a twelve-key capacitive keyboard on the quick. He printed out a key template on paper — something that he does often in his woodwork — and spray-glued aluminum foil on the back side. The video doesn’t say how many hours he spent with the razor blade tracing it all out, but the result is a paper, foil, and packing tape keyboard that seems to work just fine.

A pin-header was affixed to the foil with conductive paint and more tape. If you’ve ever tried soldering directly to aluminum foil, you’d know why. (And if you’ve got any other good tips for connecting electrically to aluminum foil, we’d love to hear them.)

Continue reading “Conjuring Capacitive Touch Sensors From Paper And Aluminum Foil”

KiCad 4.0 Is Released

If you’re a KiCad user, as many of us here at Hackaday are, you’ll be elated to hear that KiCad 4.0 has just been released! If you’re not yet a KiCad user, or if you’ve given it a shot in the past, now’s probably a good time to give it a try. (Or maybe wait until the inevitable 4.0.1 bugfix version comes out.)

If you’ve been using the old “stable” version of KiCad (from May 2013!), you’ve got a lot of catching-up to do.

The official part footprint libraries changed their format sometime in 2014, and are all now hosted on GitHub in separate “.pretty” folders for modularity and ease of updating. Unfortunately, this means that you’ll need to be a little careful with your projects until you’ve switched all the parts over. The blow is softened by a “component rescue helper” but you’re still going to need to be careful if you’re still using old schematics with the new version.

The most interesting change, from a basic PCB-layout perspective, is the push-and-shove router. We’re looking for a new demo video online, but this one from earlier this year will have to do for now. We’ve been using various “unstable” builds of KiCad for the last two years just because of this feature, so it’s awesome to see it out in an actual release. The push-and-shove router still has some quirks, and doesn’t have all the functionality of the original routers, though, so we often find ourselves switching back and forth. But when you need the push-and-shove feature, it’s awesome.

If you’re doing a board where timing is critical, KiCad 4.0 has a bunch of differential trace and trace-length tuning options that are something far beyond the last release. The 3D board rendering has also greatly improved.

Indeed, there are so many improvements that have been made over the last two and a half years, that everybody we know has been using the nightly development builds of KiCad instead of the old stable version. If you’ve been doing the same, version 4.0 may not have all that much new for you. But if you’re new to KiCad, now’s a great time to jump in.

We’ve covered KiCad hacks before, and have another article on KiCad add-on utilities in the pipeline as we write this. For beginners, [Chris Gammell]’s tutorial video series is still relevant, and is a must-watch.

Thanks [LC] for the newsworthy tip!

ESP8266 BASIC WiFi Thermostat Is Child’s Play

If you’ve read any of our posts in the last couple years, you’ll have noted that our community is stoked about bringing the Internet to their devices on the cheap with the ESP8266 modules. Why? This forum post that details making a WiFi thermostat really brings the point home: it’s so easy and cheap to build Internet-enabled devices that you almost can’t resist.

When the ESP8266 first came out, there very little documentation, much less code support. Since then Espressif’s SDK has improved, the NodeMCU project brought Lua support, and there’s even Arduino support. Most recently, BASIC has been added to the ESP stable, and that really lowers the barriers to creating a simple WiFi widget, like the thermostat example here that uses a Dallas DS18B20 temperature sensor and an LED as a stand-in for the heater element.

The hardware for this project, a re-build of this demo code from the ESP8266 BASIC docs, is nothing more than a few off-the-shelf parts soldered together. No schematic required.

What makes the project work behind the scenes is some clever code-reuse by [Rotohammer] on the ESP8266 forums. Essentially, he wrapped the Arduino’s one-wire library, giving it simple BASIC bindings. Then all that’s left for the BASIC coder is to read the value and print it out to a webpage.

There’s all sorts of details swept under the rug here, and those of you out there who are used to bare-metal programming will surely huff and puff. But there’s a time for building your own injection-molder to make DIY Lego bricks, and there’s a time to just put blocks together. This project, and the BASIC interpreter that made it possible, demonstrate how much joy someone can get from just putting the parts together.

Streaming Video On An Apple IIc

Some of the projects we feature solve a problem. Others just demonstrate that they can be done. We’re guessing that it’s the latter that motivated [Joshua Bell] to write a VNC client for an Apple IIc. To fully appreciate how insane this is, have a look at the video below the break.

There’s more than one thing amazing about this hack. Somehow, [Joshua]’s VNC program runs entirely in the memory of an Apple IIc, as he demonstrates at the beginning of the video by downloading all of the code into the Apple over a serial cable. After the initial bootstrap, he runs the code and you see (in full four-color splendour!) a low-res Windows XP appear on the IIc.

2440964467_decb0daf10_oWhat’s more incredible, but is unfortunately not demonstrated in the video, is that he appears to have not just mirrored the PC’s screen on the Apple, but has actually managed to get a one-frame-per-second bi-directional VNC working at 115,200 baud. In this snapshot from his flickr gallery, he appears to be playing Karateka on the IIc and watching it on his laptop.

If you’ve got a IIc kicking around, and you want to show it yet more new tricks, don’t neglect this browser written for the Apple IIc. Or if you’ve only got an Apple IIc+ and you’re totally ticked off that the beep is different from that of the IIc, you can always go on an epic reverse-engineering quest to “repair” it.

Continue reading “Streaming Video On An Apple IIc”

Physics You’ve Never Heard Of Provides Power From Waves

“In the future, we’ll be generating a significant fraction of our electricity from harnessing the waves!” People have been saying this for decades, and wave-generated electricity is not a significant fraction of an ant’s poop. It’d be fantastic if this could change.

If you believe the owners of Oscilla Power, the main failing of traditional wave-power generators is that they’ve got too many moving parts. Literally. Metal mechanical parts and their seals and so on are beaten down by sun and salt and surf over time, so it’s expensive to maintain most of the generator designs, and they’re just not worth it.

Oscilla’s generator, on the other hand, has basically no moving parts because it’s based on magnetostriction, or rather on inverse magnetostriction, the Villari effect. Which brings us to the physics.

Magnetostriction_by_ZureksMagnetostriction is the property that magnetic materials can shrink or expand just a little bit when put in a magnetic field. The Villari effect (which sounds much cooler than “inverse magnetostriction”) is the opposite: magnetic materials get more or less magnetic when they’re squeezed.

mpv-shot0001So to make a generator, you put two permanent magnets on either end, and wind coils around magnetostrictive metal bars that are inside the field of the permanent magnets. Squeeze and stretch the bars repeatedly and the net magnetic field inside the coils changes, and you’re generating electricity. Who knew?

Right now, according to The Economist Magazine’s writeup on Oscilla, the price per watt isn’t quite competitive with other renewable energy sources, but it’s looking close. With some more research, maybe we’ll be getting some of our renewable energy from squeezing ferrous bars.

And while we’re on the topic, check out this recent article on magnets, and how they work.

Metalab Bypasses IR Remote With Audio Circuit

Infra-red (IR) remotes are great, unless you’re in a hackerspace that’s full of crazy blinking lights and random IR emissions of all kinds. Then, they’re just unreliable. Some smart folks at Metalab in Vienna, Austria cut out the IR middle-man with a couple transistors and some audio software. They call the project HDMI Whisperer, and it’s a cute hack.

Metalab’s AV system has a web-frontend so that nobody ever has to stand up unless they want to. They bought an incredibly cheap 5-to-1 HDMI Switch to switch between displaying multiple video streams. But how to connect the switch to the Raspberry Pi server?

Fortunately, the particular switch has a remote-mounted IR receiver that connects to the main unit through a stereo audio jack. Plugging this sensor into a laptop and running Audacity while pressing the buttons on the remote got them audio files that play the remote’s codes. Simply playing these back out of the Raspberry Pi’s audio out and into the switch’s IR input through a tiny transistor circuit does the trick. Now they have a networked five-way HDMI switch for $10.

Given the low data rates of most IR remotes, we could imagine using the same trick for devices that have built-in IR receivers as well. Simply clip out the IR receiver and solder in a couple wires and then inject your “audio” signal directly.

But IR hacks are loads of fun. We’ve seen a bunch here, from the classic camera shutter-release hack to a more general tutorials on cloning IR signals with Arduinos.

Thanks [overflo] for the tip!