MIT Robots Fight With Lightsabers

Students of the MIT Robotics Lab decided to have some fun this holiday season with the big release of Star Wars. They built a lightsaber wielding delta-bot, and some very interesting hip-mounted lightsaber robot arms, akin to General Grievous.

First up in the video though is their Jedi Training robot, which is a variation of the delta-bot robot we’re all familiar with thanks to 3D printers. With a lightsaber mounted on top, it’s not too fast, but has a large range of motion to allow you to practice your lightsaber form. They call it the Triple Scissor Extender — and as you can imagine, it was built for something completely different. You can check out the designer’s personal blog here, though he doesn’t have any info on this particular project — yet.

Second is a robot they designed for a project called Supernumerary Robotic Limbs (SRL), which is literally designed to give you extra robotic arms — it was the next logical step to give them lightsabers…

Continue reading “MIT Robots Fight With Lightsabers”

Hacklet 89 – Star Wars Projects

Star Wars is an inspirational force to be reckoned with. Few movie franchises have quite so many fans creating everything from elaborate cosplay outfits to fully functional robots. At the 2015 Hackaday SuperCon, former R2D2 driver Grant Imahara mentioned that LucasArts used to maintain a fleet of robots to be deployed at events. Once the execs realized hacker, maker, and hobbyist robots are now more advanced than the machines they built for the actual films, they mothballed the fleet. If you see R2 at a Star Wars event this season, it’s probably an enthusiast behind the controls. This week’s Hacklet is dedicated to the best Star Wars projects on Hackaday.io!

targetshootWe start with [Nathan Gray] and Star Wars Nerf Targets. [Nathan] needed a Star Wars themed game for an event for the kids, and he needed it fast. [Nathan] built a Nerf shooting gallery game with a Star Wars twist. The idea is to shoot the bad guys with Nerf darts. Targets have two sides, so you never can be sure if you’ll see a storm trooper or a friendly Wookie. Hits are detected by piezoelectric disks on each target. A control panel starts the game, keeps score, and plays some great sound effects. An Arduino compatible Teensy 2.0 keeps everything running smoothly. [Nathan] reports that the game was a hit with the kids, and everyone else at the party. Even Grandma had to give the Star Wars Nerf Targets game a try!

 

vaporatorNext up is Hackaday’s own [Brian Benchoff] with The Hackaday Prize Moisture Vaporator. The 2015 Hackaday Prize promo video called for something space related. Since Southern California has plenty of desert around, a moisture vaporator straight out of Tatooine was just what the doctor ordered. [Brian], [Matt], [Rich] and [Alek] handled most of the construction at the Hackaday Hackerspace in Pasadena. Final assembly was a team effort out in the field. The basic frame of the vaporator consisted of 1 x 3 lumber joined with pocket screws. An iron pipe served as the spine. [Brian] added plenty of greebles to give the vaporator just the right look. The result makes us long for a trip to Toshi Station to pick up some power converters.

life-signs[Davedarko] is up next with Towani Lifesign Wristdevice – Star Wars Ewoks. This was one of [Dave’s] earliest projects on Hackday.io, way down at project #616. He originally built it for the Sci-Fi contest we held in 2014. The Towani family was in the Ewoks movies, which were lesser known spinoffs of the original Star Wars films. The wristbands showing the family’s vitals were featured a few times in the movies. [Dave’s] version is more than a movie prop, it actually works. He’s using an open hardware pulse sensor along with an Arduino Mini to display status on a trio of LEDs.

bb8Finally, we have [Enrico] with Our own BB-8 droid. BB-8 made a splash when he rolled out on stage during Star Wars Celebration. Everyone wondered how the original was done. We’ve since found out that the BB-8 uses Sphero’s technology to get around. However, many of the movie scenes were done with good old-fashioned puppeteer work. [Enrico] is building his own version of BB-8 using holonomic wheels inside the sphere, with a magnetically attached head. He’s planning to 3D print the major parts of his droid. So far, [Enrico] has started testing with magnets. A few printed plastic parts from his R2D2 build have been standing in for the BB-8 shell.

If you want to see more Star Wars projects, check out our new Star Wars project list! If I missed your project due to a great disturbance in the force, don’t be a nerf herder! Just drop me a message on Hackaday.io. That’s it for this week’s Hacklet. As always, see you next week. Same hack time, same hack channel, bringing you the best of Hackaday.io! May the force be with you.

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”

Bouncing Radio Off Of Airplanes

Amateur radio operators are always trying some new stunt or other. It’s like they’ve got something to prove. Take Aircraft scatter for instance: the idea is to extend your radio’s range by bouncing it directionally off of overhead airplanes.

Radio signals travel in straight lines, which is a bummer because the Earth (despite what you’ve heard) is round. Inevitably, if you want to talk to someone far enough away, they’re over a hill. We’ve covered various oddball propagation methods recently, so if you don’t know about moonbounce, you’ve got some background reading to do. But airplane scatter was new to us.

Actually pulling it off requires knowing where the airplanes are, of course. To do so, you could simply look up the aircraft in your target area on the web, using something like FlightRadar24, but where’s the fun in that? There’s also the possibility of tracking local aircraft yourself using RTL-SDR if you’re feeling hard core.

The rest is just details. Hams [Rex Moncur (VK7MO)] and [David Smith (VK3HZ)], for instance, got 10 GHz signals to skip off airplanes over 842 km (PDF). If you’re an old-school ham operator, you’re double-checking the “gigahertz”, but it’s not a mistake. It’s tremendously impressive that these guys got a link over such a long distance using only 10 watts — but note that they’re doing it with highly directive dishes, and telescopes to aim them.

Not to discourage you from trying this at home, but there are all sorts of difficulties that you’ll encounter when you do. Airplanes moving perpendicular to the path between sender and receiver will Doppler-shift the signal, and there’s still quite a chunk of atmosphere to get the signal through. Finally, although airplanes look pretty big when they’re on the ground, they’re actually tiny when they’re up in the sky at 35,000 ft and 500 miles away; you’re bouncing your signal off of a small target.

The good news? People like [W3SZ] are sharing their well-documented results, and at least it’s 20dB easier than bouncing signals off the moon!

Thanks [Martin] for the tip!

The rust language logo being branded onto a microcontroller housing

Programming With Rust

Do hardware hackers need a new programming language? Your first answer might be no, but hold off a bit until you hear about a new language called Rust before you decide for sure.

We all know real hackers use assembly language to program CPUs directly, right? Well, most of us don’t do as much assembly language as we used to do. Languages like C can generate tight, predictable code and are easier to manage.

Although some people use more abstract languages in some embedded systems, it is no secret that for real-time systems, device driver development, and other similar tasks, you want a language that doesn’t obscure underlying details or generate code that’s difficult to reason about (like, for example, garbage collection). It is possible to use special techniques (like the Real-Time Java Specification) to help languages, but in the general case a lean language is still what most programmers reach for when you have to program bare metal.

Even C++, which is very popular, obscures some details if you use things like virtual functions (a controversial subject) although it is workable. It is attractive to get the benefit of modern programming tools even if it does conceal some of the underlying code more than straight C.

About Rust

That’s where Rust comes in. I could describe what Rust attempts to achieve, but it is probably easier to just quote the first part of the Rust documentation:

Rust is a systems programming language focused on three goals: safety, speed, and concurrency. It maintains these goals without having a garbage collector, making it a useful language for a number of use cases other languages aren’t good at: embedding in other languages, programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems. It improves on current languages targeting this space by having a number of compile-time safety checks that produce no runtime overhead, while eliminating all data races. Rust also aims to achieve ‘zero-cost abstractions’ even though some of these abstractions feel like those of a high-level language. Even then, Rust still allows precise control like a low-level language would.

Continue reading “Programming With Rust”

A Tiny Servo Motor Controller

If you’re building a moving thing with a microcontroller, you’ll probably want to throw a servo controller in the mix. Driving a servo or two with a microcontroller takes away valuable cycles that just babysit the servo, making sure all the PWM signals are in sync. The thing is, most servo controllers are a massive overkill, and you don’t need that much to control a few servos over a UART. The proof of this is an attiny13 servo controller over on hackaday.io.

[arief] developed his tiny servo controller around one of the tiniest microcontrollers – the ATtiny13. This chip has just 1kB of Flash and 64 Bytes of RAM, but that’s enough to keep a few servos going and listen in to a UART for commands to drive the servo.

The construction of this servo controller board is simple enough – just a single sided board, microcontroller, and a few headers, caps, and resistors. Commands are sent to the ATtiny through a half duplex UART we covered before, with servos responding to simple serial commands.

If you’re building a robot army, this is the board to make. You’re going to need a high-powered controller to take over the world, but there’s no need to bog down that controller by babysitting a few servos.