Monday, March 24, 2014 - 12:01Embeded Sieve of Eratosthenes: Hunting Primes on ARM
I ended up with just enough time over the weekend to pull together a quick project. I implemented the Sieve-of-Eratosthenes on an ARM chip.
If you haven’t heard of the Sieve of Eratosthenes then you really need to work your way through Project Euler. That’s where I first learned about this method of finding prime numbers. You begin with a list of all numbers, find a prime, then remove all multiples of that prime from the list. The real trick with doing it on a microcontroller is to figure out how to store a large list of numbers in a limited space. The gist of my method was to use a boolean array (I call it a bit-packed array but that may be the wrong way of saying it). The details are found in my project linked at the top.
‘Why?’ is almost always the wrong question to ask around here. But in this case, I did this because I wanted to try out the Bit Banding functionality of the ARM core. These chips have alias addresses that map to a single bit in the SRAM and also some of the peripheral registers. This allows read or write access for a single bit using a single instruction. Turns out that one side effect of 32-bit architecture is having addresses to burn.
Filed under: ARM
Monday, March 24, 2014 - 09:00Mechanical Iris Will Make You Want a Laser Cutter Even More
Mechanical irises are very intricately designed mechanisms that are mesmerizing to see in action — and if you have a laser cutter, you could make one in less than 10 minutes.
Our “Teacher of Science”, Instructables’ user [NTT] has revised a previous Instructables design on a mechanical iris to improve it. The original design used three layers of components and dowel pins for every joint. What [NTT] has done is reduced this to two layers, and eliminated half of the pins required by designing clever circular cutouts. The result is a very slick mechanical iris that is very easy and quick to build — provided you have the tools.
Stick around to see the original iris open and close — unfortunately there’s no video of the new design — but we think you can imagine the differences.
Or alternatively you could 3D print a version of it!
No laser cutter, or 3D printer? We feel your pain. Luckily there is also a cardboard version of it you can make without any fancy tools!
Monday, March 24, 2014 - 06:00Monitoring your Gas Consumption with a JeeNode and a nRF24L01+
[Sven337] just blogged about a gas consumption monitoring setup he finished not long ago. As his gas meter was located outside his apartment and nowhere near any electrical outlet, a battery-powered platform that could wirelessly send the current consumption data to his Raspberry Pi was required. His final solution therefore consists of a JeeNode coupled with the well known nRF24L01+ wireless transmitter, powered by 3 supposedly dead alkaline batteries.
[Sven337] carefully looked at the different techniques available to read the data from his meter. At first he had thought of using a reflective sensor to detect the number 6 which (in France at least) is designed to reflect light very well. He then finally settled for a magnetic based solution, as the Actaris G4 gas meter has a small depression intended for magnetic sensors. The PCB you see in the picture above therefore has a reed sensor and a debug LED. The four wires go to a plastic enclosure containing the JeeNode, a couple of LEDs and a reset switch. Using another nRF24L01, the Raspberry Pi finally receives the pulse count and reports it to an eeePC which takes care of the storage and graphing.
Monday, March 24, 2014 - 03:00Humble Beginnings of a Pick and Place Machine
[Pete's] invented a product called an AIR Patch Cable designed to interface with an airplane’s intercom, and is looking to manufacture and assemble them himself — unfortunately, the circuit boards are tiny, and SMD components aren’t exactly the easiest to install. So he decided to build a pick and place machine to do it for him!
It’s not finished yet, but [Pete] has reached a major milestone — he’s finished the base CNC machine aspect of it. He opted for a kit build for the major mechanical components, the Shapeoko 2 — its a solid design and if you decided to make something from scratch it’d probably cost much more and take a lot longer.
From there he began selecting his electronics individually. He’s chosen the Big Easy Driver by Sparkfun to control his stepper motors, which supports a maximum size of NEMA 17 steppers, so he bought five of those too. To control it all, he’s using LinuxCNC which is an excellent choice — and if you’re not crazy about Linux, you can actually download Ubuntu 10.04 with LinuxCNC pre-installed for you to make it super easy — you’ll just need an old dedicated PC to use.
Once everything was setup, he wrote a quick program to control his future pick and place machine — he strapped a pen onto the Z-axis and it scratched out its first word: “Gangsta”. Cause you know, G-Code. Right? Yeah. Anyway, we’re quite excited to see how this progresses.
To see a pick & place machine that’s already functioning, check out this beautiful piece of work!
Filed under: cnc hacks
Monday, March 24, 2014 - 00:01Hackaday Links: March 23, 2014
[Jack] sent us a link to a Metropolitan Museum of Art video showing off a mechanized desk that plays music and has a ton of hidden compartments. Furniture makers of yore built hidden compartments in furniture all the time. After all, there weren’t credit cards back in the day and you had to keep important documents, cash, and everything else on hand. What strikes us is that this mates woodworking of the highest caliber with precision mechanics.
Before you get rid of that old box spring, ask yourself if you need to store dimensional goods. If you rip off the outer fabric, the network of wire inside makes a reasonable lumber rack.
And since we’re talking trash, we enjoyed seeing this water bottle wire spool minder which [Daniel] sent our way.
You know those portable DVD players you can hang from a headrest to entertain the kids on long trips? Well [John's] broke, and like chasing the dragon, once you’re hooked on watching videos during car trips there’s no going back. Luckily he was able to throw a Raspberry Pi at the problem. He now has a portable OpenElec XBMC device controlled via a smartphone.
[Jaromir] posted some breakout board footprints that you can use. It’s not the footprints that impress us, but the idea of using them to fill up board space when spinning a new PCB. [Thanks Sarah]
LEGO Gachapon. Need we say more? Okay, truth be told we had to look it up too; Wikipedia says it’s spelled Gashapon. These are coin-operated machines that dispense toys inside of plastic capsules. This one’s made of LEGO and it’s awesome.
[Mikhail] actually built his own ballast resistors for some HeNe laser tubes. This is a bit easier than it might sound at first, as they are much lower power than the tubes used in cutters. But none-the-less an interesting, and successful, experiment.
Sunday, March 23, 2014 - 21:00This Machine Sucks Balls
The best career choice anyone could ever make – aside from the richest astronaut to ever win the Super Bowl – is the designer of the kinetic art installations found in science centers that roll billiard balls along tracks, around loops, and through conveyors in a perpetual display of physics and mechanics. [Niklas Roy] isn’t quite at that level yet, but he has come up with a new twist on an old idea: a machine that literally sucks balls from a ball pit into transparent tubes, sending them whizzing around the installation space.
The installation consists of eighty meters of plastic tubing suspended in the staircase of Potocki Palace in Kraków. Electronically, the installation is extremely simple; a PIR sensor turns on a vacuum cleaner whenever someone is in the ball pit. This sucks balls up through a hose, around the space, and into a bin suspended over the pit. Pull a lever, and the balls stored in the bin are dispensed onto the person vacuuming up thousands of balls below.
Image source, with video below.
Filed under: misc hacks
Sunday, March 23, 2014 - 18:00Say Watt? A Talking Multimeter?
After a request from one of his friends, [Mastro Gippo] managed to put together a talking multimeter to be used by blind persons working in electronics. He wanted a feature-rich meter that had serial output, and recalling this Hackaday article from a few years back led him to find a DT-4000ZC on eBay, which has serial output on a 3.5mm jack. (Though, he actually recommends this knockoff version which comes with excellent documentation).
It turns out there aren’t many talking meter options available other than this expensive one and a couple of discontinued alternatives. [Mastro Gippo] needed to start from scratch with the voice synthesizer, which proved to be as easy as recording a bunch of numbers and packing them onto an SD card to be read by an Arduino running the SimpleSDAudio library.
He found a small, battery-powered external speaker used for rocking out with music on cell phones and hooked it up to the build, stuffing all the electronics into an aluminum case. Stick around after the jump for a quick video of the finished product!
Filed under: tool hacks
Sunday, March 23, 2014 - 15:00A Hexacopter with FPV
[Robert's] been hard at work becoming a hexacopter expert over the past two years, and he’s offered up a retrospective of his multi rotor build experience since he first clicked the “buy” button on Hobbyking. He’s come a long way from his first build, which used inexpensive carbon rods and 3D-printed parts for a frame, supported by scrap wood and hot glue. It met its end in his car; exposed to direct sunlight, the 3D-printed components melted.
The latest iteration—seen above on the right—is a complete redesign, with a laser-cut frame that dramatically reduced the overall weight and new “Donkey” motors off Hobbyking. It’s strong enough to lift a 1.6kg (3.5lbs) stuffed animal suspended from a rope! Most recently [Robert] has worked out streaming first-person video after fitting a camera to the hexacopter via a 3D-printed attachment and pairing the experience with Zeiss Cinemizer 3D glasses. He still has some bugs to work out, namely screws loosening from vibrations and adding a HUD to the display so he’ll know when the battery levels are low. You can see the poor teddy bear getting hanged along with some other videos, including the first-person video flight, after the break.
Filed under: toy hacks
Sunday, March 23, 2014 - 12:00DIY CNC Dust Collection Really Sucks!
CNC Routers are great. If you’ve ever used one you know this but you also know that they will cover the machine and everything around it with a layer of dust. It is certainly possible to use a shop vac to suck up the dust coming from the router, however, the only problem with that is the shop vac’s filter will clog with dust and lose suction, defeating the intent of your vac system.
[Mike Douglas] was ready to step up his CNC game and decided to make his own dust separator. This design is extremely simple and only uses a couple 5 gallon buckets, a few PVC fittings and pieces of wood. To keep the cost down and the style up, the accompanying ‘shop-vac’ is also made from 5 gallon bucket with a vacuum lid. The project is well documented so head over to his site and check out the build process.
A dust separator does exactly what its name implies, it separates the dust and debris from the air before entering the vacuum. The following diagram shows how it works: First, a vacuum creates low-pressure inside the dust separator. That low-pressure draws the dust-filled air into the dust separator. The inlet tube directs the incoming air tangent to the circular chamber. Large debris falls quickly down past the baffle and into the collection chamber. The dust enters and is thrown against the walls of the separator as it spins around. While the dust is traveling around the circumference of the separator, gravity pulls it down into the collection chamber. The now much-cleaner air then travels up through the outlet to the vacuum.
Now that we have a dust separator doing its job, would you want to stand beside your CNC machine holding the vacuum hose collecting the newly created dust? Probably not. Neither did [Gerg], and that is why he made a dust shoe for his ShopBot. It is made from scrap polycarbonate that was kicking around the shop. There are two main components of the design, the top part that attaches to the router and the bottom part that has the skirt. The bottom piece attaches to the top with magnets which allows the skirt to be removed quickly so that the tool bit can be changed easily. And in case you want to make your own dust shoe, [Gerg] has made the dxf files available.
Sunday, March 23, 2014 - 09:00Learning Assembly with a Web Based Assembler
Very few people know assembly. [Luto] seeks to make learning assembly just a little bit easier with his “fully functional web-based assembler development environment, including a real assembler, emulator and debugger.”
These days, you can be a microcontroller expert without knowing a thing about assembly. While you don’t NEED to know assembly, it actually can help you understand quite a bit about embedded programming and how your C code actually works. Writing a small part of your code in assembly can reduce code size and speed things up quite a bit. It also can result in some very cool projects, such as using Java to program microcontrollers.
With high quality example code, it is very easy to get started learning assembly. The emulator consists of a microcontroller with 32 registers, hooked up to three LEDs, two buttons, and a potentiometer. This is way better than painfully learning assembly on real hardware. Be sure to check out the online demo! Being able to step through each line of code and clearly see the result help make assembly easier to use and understand. It would be great to see this kind of tool widely adopted in engineering programs.
Have you used assembly in any of your projects? Let us know how it went and why you choose to use assembly
Filed under: Microcontrollers
Sunday, March 23, 2014 - 06:05Hackaday At MakeDC
Last Wednesday, our Hackaday travels took us to the Washington, DC area for a visit to NOVA Labs near Dulles and a yet-to-be opened Metro stop. Also on our itinerary was a visit to MakeDC, an informal get together for people around the nation’s capitol to show off their latest projects and builds.
The highlight of the evening was a pair of talks from [Julian] and [Taylor] on a project they did for work: a social cooler, or a locked box holding cool drinks that will only open when enough people send a text to a certain number. We’ve got [Julian]‘s talk on video, but despite our fancy new camera gear for this sorta thing, [Taylor]‘s demo of what an Electric Imp can do was lost to the digital wastes.
Aside from [Julian]‘s talk on APIs and [Taylor]‘s talk on the Electric Imp, there were a few impromptu presentations from the attendees. One of the most thorough was the duo from Shiny & Jackal Cosplay, crafters of EVA foam and LEDs. Truth be told, Hackaday doesn’t see many of these ‘softer’, cosplay and prop making builds in the tip line, and that’s a shame; the amount of skill that goes into these costumes is at least as equal as a woodsmith that can build fine furniture using only hand tools.
Perhaps a little premature, but TechShop is opening a new location in Arlington, VA at the end of the month. The GM [Addam Hall] was there scoping out the hacks and letting the attendees know there’s going to be a huge, awesome shop that’s down town in Crystal City. Close enough to public transportation, anyway, because anyone who drives in DC is certifiable.
The last item of note isn’t a build yet, but it’s shaping up to be pretty cool. It’s BRWRY – pronounced, ‘brewery’ – and will be a semi-automated beer making machine. Robots and beer, what can’t you love?
We’d like to thank [Zach], [Julian], [Taylor], and all the other guys from iStrategyLabs for putting together a nice evening of hanging out, drinking beer, eating pizza, and talking about what you’ve built. We had a great time, and we’re looking forward to the next one, as well as any other similar get together in other cities.
Filed under: Featured
Sunday, March 23, 2014 - 03:00Home Made Resin Based 3D Printer is Incredible
Resin based 3D printers (SLA) are the next big thing, and while they may seem daunting at first, in some ways they are actually simpler than FDM machines with less moving parts! Loosely following an Instructable, [Dan Beaven] has just finished putting together his own home-made 3D DLP Printer, and it’s bloody brilliant.
He owes a lot of thanks to [Tristram Budel] and his incredibly detailed Instructables guide on building a 3D DLP printer, but [Dan] has also added quite a bit of his own flair to the build. Most notably is his method of separating layers from the vat of resin — most designs tilt the bed slightly to counter the suction forces, but his slides the vat back and forth along the Y-axis, which seems to work extremely well.
The printer is built out of 1″ T-slot aluminum and has a NEMA 17 motor that provides the Y-axis movement along two linear rods for the vat. The Z-axis stage uses a NEMA 23 motor and has a whopping 14″ of travel. Combined with a 104mm x 204mm build plate, this thing can print some decently sized parts!
To cure the resin, he’s using a 1080p DLP projector with no modifications. To conserve space, it is mounted at a 90 degree angle, and uses a small mirror to reflect the image onto the build plate inside of the vat. To pump the resin in and out of the vat, he’s using an industrial peristaltic pump he bought off eBay — a word to the wise, it needs to be flushed with isopropyl alcohol after each use! He learned the hard way…
For more info on printing in resin, don’t forget to check out our column on 3D Printering: You Want UV Resin?
Filed under: 3d Printer hacks
Sunday, March 23, 2014 - 00:00Bitbanging USB On Low Power ARMs
With the Adafruit Trinket, the Digispark, and some very clever work with the smallest microcontroller Atmel offers, it looks like the ‘in’ thing to do for embedded software developers is to bitbang the USB protocol on hardware that shouldn’t support it. There are a lot of very small ARM chips out there without USB support, so it was only a matter of time before someone was able to bitbang USB on the ARM Cortex M0+.
The board above is based on an Energy Micro EFM32ZG, a very small 24-pin QFN device with up to 32 kB of Flash and 17 GPIOs. As with all the bitbanged USB hacks, the differential data lines are attached directly to the microcontroller. A 24 MHz crystal is needed, but the team behind the project is working on using the internal RC oscillator instead.
The code is portable with minimal changes between other manufacturer’s Cortex M0+ chips, and with a little work, this could become a very, very cheap USB-programmable ARM dev board, something the community could certainly use.
Saturday, March 22, 2014 - 21:00Drilling Into a Laptop: Extreme Hinge Repair
What is it with laptop companies spending millions on design and aesthetics… and then using a cheap hinge design that is almost guaranteed to break? After [Peter Zotov] spent hours trying to find a replacement online, he decided to take matters into his own hands with this slightly unorthodox hinge repair.
The problems lies in the design of the hinge mounting to the lid. First, they’re using a non-standard screw sizes, slightly larger than an M2. Second, it’s threaded into cast aluminum — and to make matters worse, it doesn’t even look like there is sufficient thread engagement! A good rule of thumb is about 2 times thread diameter for aluminum — 1-1.5 times for steel. And it’s not just ASUS doing this, we’ve seen numerous laptops of different brands where the hinge goes after a year or two — what happened to cyclic stress tests?
Anyway, [Peter] decided to drill out the existing threads to allow for larger bolts. He threw his precious laptop up onto his CNC mill (a drill press would do just fine), and popped larger holes straight through the lid. This allowed him to put three standard M2 screws in place with a nut and washer. We admit it’s not the most elegant solution, but it’s saved him from getting a new laptop just because of planned corporate obsolescence.
Filed under: laptops hacks
Saturday, March 22, 2014 - 18:00Build Your Own Radio Clock Transmitter
Deep in the Colorado foothills, there are two radio transmitters that control the time on millions of clocks all across North America. It’s WWVB, the NIST time signal radio station that sends the time from several atomic clocks over the airwaves to radio controlled clocks across the continent. You might think replicating a 70 kW, multi-million dollar radio transmitter to set your own clock might be out of reach, but with a single ATtiny45, just about everything is possible.
Even though WWVB has enough power to set clocks in LA, New York, and the far reaches of Canada, even a pitifully underpowered transmitter – such as a microcontroller with a long wire attached to a pin PWMing at 60kHz – will be more than enough to overpower the official signal and set a custom time on a WWVB-controlled clock. This signal must be modulated, of course, and the most common radio controlled clocks use an extremely simple amplitude modulation that can be easily replicated by changing the duty cycle of the carrier. After that, it’s a simple matter of encoding the time signal.
The end result of this build is an extremely small one-chip device that can change the time of any remote-controlled clock. We can guess this would be useful if your radio controlled clock isn’t receiving a signal for some reason, but the fact that April 1st is just a few days away gives us a much, much better idea.
Saturday, March 22, 2014 - 15:00Hackerspace Tour: Xerocraft In Tucson, Arizona
While we try to get out to as many hackerspaces as possible, we can’t be everywhere. Not wanting to wait for a Hackaday compatriot to roll through their dusty town, the folks over at Xerocraft in Tucson, Arizona sent in their own video tour of their space.
We’ve seen the Xerocraft space before when [Caleb] rolled through town on his south-west tour a few years ago. Since then, a lot has changed; they have a new, larger, and cleaner space a few miles north of the old one. There’s also a huge increase in the number of tools. While the old space had all the usual metalworking tools, the new space has a much improved wood shop and more 3D printers than anyone can shake a stick at.
From the video, it looks like a great space, and from their blog it looks like they’ve got some really cool projects under their belt. If you’re a member of a hackerspace, we’re always looking for some tour videos. Be sure to send them in so you can share your space with the rest of the Hackaday readership.
Filed under: Hackerspaces
Saturday, March 22, 2014 - 12:01It’s Not 2015 Yet But Marty and His Hoverboard Are Already Here!
Okay now this is seriously awesome. [Rodger Cleye] has made a real working Hoverboard.
You guys might remember the recent [Tony Hawk] and [Christopher Lloyd] viral Hoverboard hoax video… Well, this isn’t that. Nope, not even close. It’s real.
The Hoverboard is a quadrotor on steroids — it features four 1200W brushless motors driving 12″ props, a massive 13.4Ah 5S Li-Po battery, and a [Marty McFly] mannequin wearing the classic red vest. He’s counter-balanced [Marty] and the battery around the rotors which makes for a surprisingly smooth flight. It even has a run-time of over 5 minutes, thanks to a whopping 83% efficiency using the 12″ props.
[Rodger] designed and simulated the entire system in eCalc before construction — He had first attempted a bi-copter design, but opted for the tried and true quad-rotor instead. The frame is made of 1/2″ PVC pipe to conserve the mass budget, but altogether it still weighs an unbelievable 20lbs! How close are we to being able to give toddlers the ability to fly?
Just take a look at the following video — we’re seriously impressed.
This has gotta be one of the biggest home-made quads we’ve seen so far. Mind you the Spruce Goose of quadrotors is still a bit bigger…
Filed under: drone hacks
Saturday, March 22, 2014 - 09:01Crafternoon: Forget Potatoes, We’re Making Stamps with Lasers
Let’s take a brief interlude to discuss your beautiful eyeballs. Keep them safe, okay? If you’re going to play with lasers, be smart and protect yourself according to the wattage and wavelength. Alright, back to business.
[Jens] started by making a stencil from a photo using this tutorial. He added a frame and supports around his face to keep everything where it should be. [Jens] then turned to Inkscape to generate the g-code using the laser plugin and then proceeded to cut his countenance into EVA foam.
After gluing the foam to a wood backing, he cut off the supports. Now it’s ready to stamp. You could use a brayer if you have one or maybe your wife’s rolling pin to apply whatever ink or paint you want to use. [Jens] loaded up his stamp with a sponge.
Filed under: laser hacks
Saturday, March 22, 2014 - 06:01Open Source SwitchMote Promises Easy Home Automation
[Felix Rusu] is fast becoming a big name in home automation with his clever Moteino systems. His latest is called the SwitchMote which is a super easy way to upgrade your light switches for home automation, and he’s just released the source!
The SwitchMote is a drop in wireless light switch which lets you control a standard AC load, limited to 100W at this time. It uses a solid state relay (SSR) to perform the switching, but like any project involving mains electricity… MAKE SURE YOU KNOW WHAT YOU’RE DOING!
It makes use of a Moteino (duh) which is a wireless Arduino clone that operates over RF. We’ve seen it used before to control a Keurig coffee maker, operate a garage door over the internet, and even text you when your sump pump fails and your basement is about to flood!
Excited? Take a look at his GitHub repository, and check out how it works in the following video.
Did we mention you can program it wirelessly as well?
Saturday, March 22, 2014 - 03:01Need to Reference the US Constitution Fast? How’s 6 Seconds Sound?
Well, unless you know exactly what you’re referencing it’s going to take you a lot longer, but this clever serial receipt printer hack will let you print the whole darn thing in just 6 seconds!
Commissioned by [Jeff Goldenson] for his LABRARY.bike (quite literally a pop-up library on a bike), it was actually shown off at SXSW Interactive — did anyone see it in person? The artist-hacker who created it is [Thibault Brevet], the guy who brought us the DRM chair that only works 8 times before it falls to pieces.
Anyway, this cool and rather suspicious looking tube with a serial cord hanging out contains an Arduino, a max232 chip and a small Li-Po battery. The Arduino communicates with the printer through the max232 chip by converting the TTL signal to RS-232. It has a single button on top, which when it is connected to the printer will send out the US Constitution over the serial interface via ESC/p language.
Did we mention how fast it is?
Receipt printers are a lot of fun once you figure out how to communicate with them. After that you’ll be wasting receipt paper like no tomorrow with this extremely wasteful (but awesome) printer based video game!