Decoupling Lego Trains Automatically

Lego train sets were introduced almost 50 years ago, and since then, one thing has been constant: the trains connected with magnets. While this is a supremely simple means of connecting locomotives to rolling stock, there is one big disadvantage. Building decouplers – devices that will separate one car from another – is difficult.

Now, with a clever combination of racks, gears, and wedges, trains can disassemble themselves. They can even do it with an Arduino.

wedgeThis decoupler works by effectively wedging cars apart from each other. With a motor from an old Lego Technic set, a few gears, shafts, and a rack, a device can be constructed that fits between the rails of a track that raises into the undercarriage of rolling stock.

Because this rolling stock is moved around with a locomotive, all that’s needed to separate two halves of a train is to move the locomotive forward. Yes, it does mean that the connection with the weakest magnet is disengaged – not necessarily the connection you want to decouple. However, with only one car and a locomotive, there’s only one connection to break. Simple enough.

This Lego decoupler can be further improved with an Arduino, a few ultrasonic sensors, and an IR detector to make a fully automatic decoupling siding for a Lego train layout. You can see all this below operating with a full state machine that perpetually switches rolling stock behind a locomotive.

A great use for Legos.

Continue reading “Decoupling Lego Trains Automatically”

ARM-Based Gesture Remote Control

When we wave our hands at the TV, it doesn’t do anything. You can change that, though, with an ARM processor and a handful of sensors. You can see a video of the project in action below. [Samuele Jackson], [Tue Tran], and [Carden Bagwell] used a gesture sensor, a SONAR sensor, an IR LED, and an IR receiver along with an mBed-enabled ARM processor to do the job.

The receiver allows the device to load IR commands from an existing remote so that the gesture remote will work with most setups. The mBed libraries handle communication with the sensors and the universal remote function. It also provides a simple real-time operating system. That leaves just some simple logic in main.cpp, which is under 250 lines of source code.

Continue reading “ARM-Based Gesture Remote Control”

Turning A Pi Into A PDP

There’s no better way to learn how to program a computer than assembly, and there’s no better way to do assembly than with a bunch of blinkenlights and switches. Therefore, the best way to learn programming is with a PDP-11. It’s a shame these machines are locked up in museums and the garages of very cool people, but you can build your own PDP-11 with a Raspberry Pi and just a few extra components.

[jonatron] built his own simulated version of the PDP-11 with a lot of LEDs, a ton of switches, and a few 16-bit serial to parallel ICs. Of course the coolest part of any blinkenlight simulator are the front panel graphics, and here [jonatron] didn’t skimp. He put those switches and LEDs on a piece of laser cut acrylic with a handsome PDP11 decal. The software comes with a load of compiler warnings and doesn’t run anything except for very simple machine code programs. That’s really all you can do with a bunch of toggle switches and lights, though.

If this project looks familiar, your memory does not deceive you. The PiDP-8/I was an entry in this year’s Hackaday Prize and ended up being one of the top projects in the Best Product category. We ran into [Oscar], the creator of the PiDP-8, a few times this year. The most recent was at the Hackaday SuperConferece where he gave a talk. He’s currently working on a replica of the king of PDPs, the PDP-11/70.

Video below.

Continue reading “Turning A Pi Into A PDP”

Piezoelectric Transformers Are A Thing, Have You Used One?

Cheap piezo buzzers are everywhere. They’re so cheap that they can be used in novelty birthday cards. Applying an alternating voltage across a piezo crystal makes it expand and contract, and fixing this crystal to a metal disk gives the piezo speaker its characteristic tinny sound that is anything but pleasant.

The piezoelectric effect works the other way too, and piezo elements are very useful as vibration sensors. Simply put one of your voltmeter leads on each of the piezo element’s wires and touch the element with your hand or knock it against your bench. You should see a voltage spike on your voltmeter which will change in magnitude with the amount of force you use when touching the element.

This ability to change shape when a voltage is applied and to create a voltage when they’re deformed is the basis of the piezoelectric transformer (PZT). While searching for a high voltage/low current transformer, Hackaday reader [Josh] was surprised to find a piezoelectric solution. He didn’t say whether he decided to use a PZT in his project but he did link us to a decent PDF on the subject.

piezo_transformerIn a PZT, two piezo elements sit next to each other. The primary is made up of multiple thin layers that expand horizontally and press on a single secondary piezo element. The more and the thinner the primary layers, the more force is exerted on the secondary, and the more voltage it develops. There are a few equations involved which you can check out in the PDF linked above that go over this concept in painful detail if you’re into that sort of thing.

If you have never played with piezo element you should add one to your next parts order. They are cheap and easy to experiment with. We have seen piezo elements used in DIY speakers, sonar projects, and even as the sensor for an atomic force microscope, but we have yet to see a piezoelectric transformer in a hack. Surely someone has used one in a project they worked on, leave us a link in the comments if you’re the person we’re talking about.

Raspberry Pi Communication Via LASER

[Nick Touran] wanted to make two Raspberry Pi’s communicate wirelessly. There are lots of options, but [Nick] used a LASER and a photoresistor, along with Morse code. If you don’t find Morse code fancy enough, you could always refer to it as OOK (on/off keying). The circuit uses a common LASER module and an ordinary photoresistor that varies in resistance based on light. A resistor forms a voltage divider with the photoresistor and an external A/D reads the resulting voltage.

The circuit works, but we couldn’t help but notice a few items. Not all photoresistors are as sensitive to the same light wavelengths, so for the maximum range you’d want to pick a particular photoresistor.  While the analog to digital converter is certainly workable, we couldn’t help but wonder if you couldn’t set up the divider to use the inherent threshold of the Raspberry Pi’s input pins for a simpler circuit. Of course, if you used the same technique with an Arduino, you could use the built-in A/D converter, and the A/D converter is probably easier to get working.

Continue reading “Raspberry Pi Communication Via LASER”

Solder More USB Ports To The Raspberry Pi Zero

Slowly, Raspberry Pi Zeros are falling into the hands of everyone who wants one. Quickly, though, it was realized that one USB port wasn’t enough, and having a single USB OTG port was only just the most economical solution. The Pi Zero does have a lot of test points exposed on the back, and [Peter van der Walt] is clever enough to come up with a 4-port hub you can solder directly to the Pi Zero.

[Peter] has a bit of experience with USB ports on the Pi, and the test points available on the bottom of this cheap and wonderful board provide everything you need to break out the single USB OTG port to a USB hub. We’ve seen this done before with a few tenuous solder connections between the Zero and an off-the-shelf USB hub. [Peter]’s build does it by soldering a USB hub directly to the Pi through these test points. It’s the first purpose built bit of hardware designed for the express purpose of giving the Pi four USB ports while only making it a sliver thicker.

The chip [Peter] is using for the build is the TI TUSB2046B, a device that turns a single USB port into a 4-port hub. This is a part that only costs about $2 in quantity, and the USB connectors themselves are only about $0.60 if you want to build a thousand of these solderable USB hubs. Now you see why the Pi Foundation didn’t include a whole host of ports on the Pi Zero, but it does mean you should be able to pick this board up for under $10 when it’s inevitably cloned in China.

[Peter] doesn’t have this board working yet. In fact, he’s only just sent the Gerbers off to the PCB fab. There will be an update once [Peter] gets the boards back and solders up the tiny but tolerable 0603 parts.

How Y Combinator Brings Hardware Startups To Life

The world is more used to software startups than hardware startups. Luke Iseman is here to help. He is the Director of Hardware at Y Combinator and discusses some details that need to be kept in mind when starting up your own hardware company. Take a look at the talk he presented at the 2015 Hackaday SuperConference and then join us after the break to cover a few key points of his discussion.

Continue reading “How Y Combinator Brings Hardware Startups To Life”