Syndicate content Hackaday
Fresh hacks every day
ถูกปรับปรุง 21 min 11 sec ก่อน

What’s So Bad about the Imperial System Anyway?

ศุกร์, 01/13/2017 - 22:01

As a Hackaday writer, you can never predict where the comments of your posts will go. Some posts seem to be ignored, while others have a good steady stream of useful feedback. But sometimes the comment threads just explode, heading off into seemingly uncharted territory only tangentially related to the original post.

Such was the case with [Steven Dufresne]’s recent post about decimal time, where the comments quickly became a heated debate about the relative merits of metric and imperial units. As I read the thread, I recalled any of the numerous and similarly tangential comments on various reddit threads bashing the imperial system, and decided that enough was enough. I find the hate for the imperial system largely unfounded, and so I want to rise to its defense.

Did you measure that room in ‘feet’, or in ‘flip-flops’?

What is a system of units anyway? At its heart, is just a way to measure the world. I could very easily measure the length and width of a room using my feet, toe to heel. Most of us have probably done just that at some point, and despite the inconvenient and potentially painful problem of dealing with fractionalization of your lower appendage, it’s a totally valid if somewhat imprecise method. You could easily pace out the length of the room and replicate that measurement to cut a piece of carpet, for instance. It’s not even that much of a stretch to got to the home center and buy carpet off the roll using your personal units — you might get some strange looks, but you’ll have your personal measuring stick right with you.

The trouble comes when you try to relate your units to someone not in possession of your feet. Try to order carpet online and you’ll run into trouble. So above and beyond simply giving us the tools to measure the world, systems of units need to be standardized so that everyone is measuring the same thing. Expanding trade beyond the dominion where one could refer to the length of the king’s arm and have that make sense to the other party was a big driver of the imperial system first, and then the metric system. And it appears to be one of the big beefs people have regarding the United States’ stubborn insistence on sticking with our feet, gallons, and bushels.

How Ridiculous are We Talking?

The argument that imperial units are based on ridiculous things like the aforementioned king’s arm? That’s not an argument when a meter was originally defined as one 10-millionth of the distance from the north pole to the equator. Even rigorously defined relative to the speed of light or the wavelength of krypton-86 emissions in a vacuum, the meter is based on phenomena that are completely inaccessible to the people who will use is, and unrelated to their daily lives. At least everyone has seen a foot that’s about a foot long.

Doing the conversions between imperial units and SI units is tedious and error prone, they say. Really? Perhaps I’d buy that argument a hundred years ago, or even fifty. But with pervasive technology that can handle millions of mathematical operations a second, there’s not much meat on that bone. I’ll grant you that it’s an extra step that wouldn’t be needed if everyone were on the same system, and that it could lead to rounding errors that would add up to quite a bit of money over lots of transactions. But even then, why is that not seen as an opportunity? Look at financial markets — billions are made every day on the “slop” in currency exchanges. I find it unlikely that someone hasn’t found a way to make money off unit conversions too.

Another point of contention I often see is that imperial units make no sense. Yes, it’s true that we have funny units like gills and hogshead and rods and chains. But so what? Most of the imperial system boils down to a few commonly used units, like feet and gallons and pounds, while the odder units that once supported specialized trades — surveyors had their rods and chains, apothecaries had their drams and grains — are largely deprecated from daily life now.

Deal with It

For the units that remain in common use, the complaint I hear frequently is, “Why should I be forced to remember that there are 5,280 feet in a statute mile? And why is there a different nautical mile? Why are there 12 inches in a foot anyway? A gallon has four quarts, why does that make sense?” And so on. My snappy retort to that is, again, “So what?” If you’re not a daily user of the imperial system, then don’t bother yourself with it. Stick to metric — we don’t care.

If you’re metrified and you’re forced to use imperial units for some reason, then do what a lot of us imperials have to do — deal with it. I’m a scientist by training, and therefore completely comfortable with the SI system. When I did bench work I had to sling around grams, liters, and meters daily. And when I drove home I saw (and largely obeyed) the speed limit signs posted in miles per hour. No problems, no awkward roadside conversations with a police officer explaining that I was still thinking in metric and thought that the 88 on my speedometer was really in km/h and I was really doing 55. If I stopped at the store to pick up a gallon of milk and a couple of pounds of ground beef for dinner, I wasn’t confused, even if I slipped a 2-liter bottle of soda into the order.

At the end of the day, I don’t really see what all the fuss is about. Imperial and metric both have their place, and each system seems to be doing its job just fine. If your argument is that imperial units are inelegant and awkward, even though you’re correct I don’t think that’s enough to sway the imperial holdouts. And if you’re just upset because we’re being stubborn and won’t join the enlightened metric masses, then I think you’re probably going to be upset for a long time to come.

Filed under: Featured, Interest, rants

Crippled Calculator Features Unlocked with Automated Help

ศุกร์, 01/13/2017 - 19:01

[Aguilera Dario] likes his Casio fx-82ES calculator. However, it was missing a few functions, including complex numbers. A Casio fx-991ES has more functions but, of course, costs more. A quick Google revealed that if you press the right buttons, though, you can transform an fx-82ES into an fx-991ES.

Because it is apparently a buffer overflow exploit, the hack involves a lot of keys and once you cycle the power you have to do it again. [Aguilera] realized this would be a good candidate for automation and added a microcontroller to push his buttons. You can see a video of a breadboard version below. He also has a PCB version in the works that should be better integrated.

The automation hardware patches into the button matrix through test pads on the back of the calculator’s PCB. [Aguilera] soldered ribbon cable directly to these pads, then snaked it out through a slot cut into the back of the calculator case where it is terminated with a 0.1″ pin socket. An Arduino Mini is used in the prototype, the next revision will use an ATmega328P on a custom board. The uC interfaces with the button connections using the venerable 4066 chip which is able to act as an analog switch.

The board layout for the PCB version is shown on the project page. There is no word on whether this is meant to be a permanent addition to the calculator, or just plugged in for the exploit and stored away for use the next time power is cycled. Either way, it’s neat to learn about this exploit and a cool challenge to automate it!

If you don’t want to hack up an off-the-shelf calculator, grab some nixie tubes and make your own. Or, if you are short on tubes, try this one.

Filed under: Arduino Hacks

CNC-Telescope With Semi-Nasmyth Mount

ศุกร์, 01/13/2017 - 16:01

[GregO29] had a 10″ GoTo telescope but at 70lbs, it wasn’t really portable. And so he did what any self-respecting CNC enthusiast would do, he put his CNC skills to work to make an 8″ Newtonian reflector, semi-Nasmyth mount telescope of his own design. It also gave him a chance to try out his new Chinese 6040 router/engraver with 800W water-cooled spindle.

What’s all that fancy terminology, you say? “Newtonian reflector” simply means that there’s a large concave mirror at one end that reflects a correspondingly large amount of light from the sky to a smaller mirror which then reflects it toward your eye, preferably along with some means of focusing that light. “Semi-Nasmyth mount” means that the whole thing pivots around the eyepiece so that you can keep your head relatively still (the “semi” is because the eyepiece can also be pivoted, in which case you would have to move your head a bit).

We really like the mechanism he came up with for rotating the telescope in the vertical plane. Look closely at the photo and you’ll see that the telescope is mounted to a pie-shaped piece of wood. The curved outer circumference of that pie-shape has gear teeth on it which he routed out. The mechanism that moves these teeth is a worm screw made from a 1″ spring found at the hardware store that’s on a 3/4″ dowel. Turn the worm screw’s crank and the telescope rotates.

Cutting the telescope mount using the 6040 router/engraver

All the holes in the wood were CNCed out to make it lighter, but also give it a steampunk feel. In true amateur astronomer style, when you look down on all the holes in the two base plates, they depict all the phases of the moon. But for practical purposes, the smaller holes are sized just right for holding his various eyepieces. He mentions that three of the pieces were too big for his router. As the photo here shows, he solved this by cutting half, rotating the work piece by 180 degrees and then cutting the other half.

Hopefully this whets your stargazing appetite. Alternatively you can do what this star tracking telescope project is doing, which is to convert a manual telescope to a motorized one and sending it GOTO commands. If you want to record the images from your telescope you can do it for just 55 cents. [Xobmo] made a mount for attaching his iPhone. Either way, the sky is not the limit.

Filed under: cnc hacks

Retro ZX Spectrum Lives a Spartan Existence

ศุกร์, 01/13/2017 - 13:00

FPGAs (like Xilinx’s Spartan series) are great building blocks. They often remind us of the 100-in-1 electronic kits we used to get as kids. Lots of components you can mix and match to make nearly anything. However, like a bare microcontroller, they usually don’t have much in the way of peripheral devices. So the secret sauce is what components you can surround the chip with.

If you are interested in retro computing, you ought to have a look at the ZX-Uno board. It hosts a Spartan 6 FPGA. They are for sale, but the design is open source and all the info is available if you prefer to roll your own or make modifications. You can see a video of the board in action, below (as explained in the video, the color issues are due to the capture card trying to deal with the non-standard sync rate).

Here are the key specifications:

  • FPGA Xilinx Spartan XC6SLX9-2TQG144C
  • Static Memory 512Kb, AS7C34096A-10TIN
  • 50MHz Oscillator
  • Video output (composite)
  • PS/2 keyboard
  • Stereo audio jack
  • EAR jack connector (for reading cassette tapes)
  • Connectors for JTAG and RGB
  • Slot for SD Cards
  • Expansion port with 3 male pin strips
  • Micro-USB power connector
  • PCB Size: 86×56 mm. (Compatible with Raspberry Pi cases)

In a recent post, we mentioned an Amstrad clone, and at least one commenter pointed out that the ZX Spectrum was more popular. However, with this board, you don’t have to choose. In the downloads section, there are bit streams (FPGA configurations) to let the board emulate several different computers, including several Commodore systems, some Atari systems, the BBC Micro, the ZX81, and more. Of course, the ZX Spectrum is at the top of the list.

If you decide to try one of these, you might need to brush up on your Spanish or keep a link to Google Translate handy. A lot of the surrounding community seems to be Spanish-speaking. But it looks like a nice board for doing any sort of computer platform you could cram into an FPGA.

If you want to learn ZX Spectrum assembly language (and who doesn’t?), we covered a good tutorial awhile back. It might take a USB to PS/2 adapter, but we’d love to see this board used with a keyboard like this one.

Thanks for the tip [Dave].

Filed under: classic hacks, FPGA

X Marks the Clock

ศุกร์, 01/13/2017 - 10:00

There’s no shortage of Arduino-based clocks around. [Mr_fid’s] clock, though, gets a second look because it is very unique looking. Then it gets a third look because it would be very difficult to read for the uninitiated.

The clock uses three Xs made of LEDs. There is one X for the hours (this is a 24-hour clock), another for the minutes, and one for the seconds. The left side of each X represents the tens’ digit of the number, while the right-side is the units.

But wait… even with two segments on each side of the X, that only allows for numbers from 0 to 3 in binary, right? [Mr_fid] uses another dimension–color–to get around that limitation. Although he calls this a binary clock, it is more accurately a binary-coded-decimal (BCD) clock. Red LEDs represent the numbers one to three. Green LEDs are four to six. Two blue segments represent seven to nine. It sounds complicated, but if you watch the video, below, it will make sense.

This isn’t [Mr_fid’s] first clock. He is using a DS1307 real time clock module to make up for the Arduino’s tendency to drift. Even if you aren’t interested in the clock, the mounting of the LEDs with plastic–and the issues he had isolating them from each other–might come in handy in other displays.

We’ve seen a lot of Arduino clocks over the years, including some that talk. We’ve even seen some that qualify as interactive furniture, whatever that is.

Filed under: Arduino Hacks, clock hacks

At Last, An Open Source Electric Vehicle From A Major Manufacturer

ศุกร์, 01/13/2017 - 07:01

There is a rule of thumb to follow when looking at product announcements at the fringes of the motor industry that probably has something in common with crowdfunding campaigns. If the photographs of the product are all renders rather than real prototypes, walk away. It is said that small volume vehicle production is a space that attracts either crooks or dreamers, and parting with your money to either can be a risky business. So when yet another electric vehicle platform makes its debut it’s always worth looking, but too often the rendered images outnumber anything from the real world and you know you’ll never see one on the road.

It is with interest then that we note an exciting announcement made last week at CES, that the French carmaker Renault are to release an open-source vehicle platform. It is called the POM, and it is based upon their existing Twizy electric buggy platform. If this last point causes you to snort with derision because the Twizy is a tiny and not very fast in-line two-seater with awful weather protection better suited to the French Riviera than an American Interstate, remember that the car itself is not the point of this exercise at this stage. Instead the access to the technology will spark fresh innovation in the open electric vehicle sector that will transfer into better systems for more practical open source vehicles in the future. (Incidentally, we’re told by people who’ve tried the Twizy that it can be something of an unexpected gem to drive. It seems the lowish top speed doesn’t matter in the twisties when you have a low centre of gravity and quite impressive acceleration in a tiny machine.)

Partnered with Renault are OSVehicle, ARM, Pilot Automotive, a manufacturer of automotive accessories, and Sensoria, who will be working on wearable accessories. It’s probable that you won’t see many POMs on the road if you don’t live in a territory that already has the Twizy, but it’s certain you’ll see its technological legacy in other vehicles.

We’ve covered plenty of electric cars in the past here at Hackaday, and this isn’t the first one with an open source angle. We’ve had a very nice Mazda-derived ground-up build, and an astounding home-made hub motor.

Filed under: car hacks, slider

Portal Ported To the Apple II

ศุกร์, 01/13/2017 - 04:00

[deater] readily admits they’re a little behind on what’s new in gaming – only having just gotten around to Valve’s 2007 release of Portal. It’s a popular game, but [deater] didn’t want anyone to miss out on the fun – so set about porting Portal to the Apple II.

The port uses the “hires” mode of the Apple II for the flashy graphics that were state of the art around 1980 or so. It’s not a copy of the full game – only the first and last levels, combined with Jonathan Coulton’s now-classic ending theme, Still Alive. As is to be expected, it’s not a wild, fast paced gaming experience, but a cool use of BASIC to put together a fun tribute to a popular franchise.

It’s a little different to the original – portals can be placed anywhere, for example – but it rings true to the original. Source code and a disk image is provided, so you can try it for yourself – even in this online emulator.

We’re looking forward to the sequel so we can use the post title “Portal 2 Ported To The Apple II, Too”, but until then, check out [deater]’s Apple II web server, also in Applesoft BASIC. Video after the break.

Filed under: classic hacks

Sophi Kravitz: State of the IO

ศุกร์, 01/13/2017 - 02:31

At the Hackaday SuperConference in November, Sophi Kravitz had the chance to look back on the past year of Hackaday.io, and what a great year it has been. Hackaday.io now has over 178k members who have published 12.6k projects with about 10% of those being collaborative team projects. But the numbers tell just a small story of the vibrant community Hackaday has.

The Hackaday crew made a trip to the desert to begin 2016. This resulted in the Hackaday Prize video which launched the engineering initiative which wrapped up with the awards ceremony at SuperCon. The video launched the 2016 Hackaday Prize, but not long after there were 80 different locations around the world that got together at the same time for World Create Day. Many of these meetups resulted in entries that joined the 550 projects submitted during the first challenge round of the contest. Of course the final number totaled more than 1000 projects!

Over 80 Locations for Hackaday World Create Day

The Hackaday Community grew its live meetups this year. The Hackaday MakeIt NYC meetup is a monthly gathering founded in 2016. The Hackaday LA meetup continues to flourish, with meetings now held at the freshly opened Supplyframe Design Lab every month.

The social interactions on Hackaday.io continue to grow. The Hacker Channel is the place to start. Interact with your fellow hackers any time you want, and join in the organized Hack Chats like this Friday’s Eagle chat. The Jobs Board is just one year old now and is a great place to find or advertise jobs. And there’s been a ton of community interaction around special projects like the Traveling Hacker Box.


Perhaps one of the most interesting surprises in 2016 was the Square-inch Project. This is a completely community organized contest started by [alpha_ninja]. But like any good idea on Hackaday.io, it didn’t take long to find help with the wildly-popular contest. The challenge was to lay out a meaningful circuit using one-square-inch of PCB. There were nearly 80 entries!

There’s more where that came from. You can try you hand coming up with an algorithmically generated default avatar for users. And an impromptu challenge popped up to give away some ever-elusive SuperCon tickets which itself spawned a second challenge.

The fun and camaraderie of creation continues today with contests like the 1kB Challenge. If you’re not on the IO, you’re missing out!


Filed under: cons, Hackaday Columns

Hack a Whiteboard and Never Lose Screws Again

ศุกร์, 01/13/2017 - 01:01

If you are reading this, it is a fair bet you like to take things apart. Sometimes, you even put them back together. There are two bad moments that can occur when you do this. First, when you get done and there is some stuff left over. That’s usually not good. The other problem is when you are trying to find some little tiny bolt and a washer and you can’t find it. SMD parts are especially easy to lose.

A few months ago, I was browsing through a local store and I saw a  neat idea. It was basically a small whiteboard with lines dividing it into cells. It was magnetic and the idea is you’d put your small loose (and ferrous) parts like screws, bolts, nuts, and resistors on the board. Since it was a marker board, you could make notes about what each cell contained. Great idea! But the thing was about $20 and I thought I could do better than that. As you might guess from the picture, I was successful. I spent about $5, although I had some rare-earth magnets hanging around. If you don’t, strong magnets aren’t that expensive and you can often raid them out of hard drives.

First Attempt

My first attempt was a failure. I went to a local discount store and looked at the cheap whiteboards. Here’s what I found out. What they sell as “magnetic” whiteboards are boards that will hold a magnet. By themselves, they aren’t magnetic. Luckily, I had brought a small bolt into the store to test, so I didn’t buy one and I sort of forgot about it for a few months.


Recently, however, I was about to disassemble something and realized I really wanted something like this to get organized. A trip to the local drugstore netted me a $5 whiteboard with a little marker that attaches with a clip or with a magnet. The thing also came with some sticky tape, some magnetic tape, and a few little weak magnets to grip on it.

My first attempt with the new board was to simply stick some strong magnets to the back of the board. That didn’t work. Turns out the frame has two pieces of cardboard in it. One piece has the thin whiteboard surface glued to it. The two pieces of cardboard were keeping the magnet too far away to be useful.

How you get to the whiteboard surface will probably depend on exactly what you buy. On mine, the frame pulled apart easily at one corner and I just slipped everything out. Be careful, though, because the inner cardboard was glued to the whiteboard surface, I did manage to bend the thin metal surface when I pulled it out. It wasn’t bad though, and it is so thin, it mostly bent back out.

Law of Attraction

Once you have the metal exposed, you can mount magnets on the back and they’ll stick. You could probably also use some magnetic tape (the sticky kind, not the old computer or audio kind). Then you just have to put the cardboard back and reassemble the frame. In my case, I cut up one piece of the cardboard to make shims that went around the edges to hold in the other piece of cardboard. I didn’t think the whole sandwich would go back in with the thickness of the magnets. I used several different kinds, but if I had stuck to the thin ones, that might not have been a problem.

Oops — Should Shop Better

After I was done, I made the mistake of looking on eBay. If you don’t mind shipping them from around them globe, you can get the $20 pad for about $5 anyway. However, what fun is that? With this method, you can make as big or small of a mat as you want. You can customize it as you like, too. I thought about using a dual whiteboard/corkboard so you could stick components into the cork or use pushpins to hold things in bags. Anyway, if being able to buy something means that you’re not allowed to build it, Hackaday would have a lot fewer articles.

Even though we don’t think magnets cure arthritis, we do think they are a little bit magic. Some people even use them to avoid being groped in the shower (assuming, of course, you think that’s a bad thing). Now, I only have to figure out why I have these two extra M3 bolts.



Filed under: Hackaday Columns, tool hacks

Baby’s First Hands-Free Stroller

พฤ, 01/12/2017 - 23:31

So you’ve had your first child. Congratulations; your life will never be the same again. [Dusan] was noticing how the introduction of his children into his life altered it by giving him less time for his hobbies in his home laboratory, and decided to incorporate his children into his hacks. The first one to roll out of his lab is a remote-controlled baby stroller.

After some engineering-style measurements (lots of rounding and estimating), [Dusan] found two motors to drive each of the back wheels on a custom stroller frame. He created a set of wooden gears to transfer power from the specialized motors to the wheels. After some batteries and an Arduino were installed, the stroller was ready to get on the road. At this point, though, [Dusan] had a problem. He had failed to consider the fact that children grow, and the added weight of the child was now too much for his stroller. After some adjustments were made (using a lighter stroller frame), the stroller was eventually able to push his kid around without any problems.

This is an interesting hack that we’re not sure has much utility other than the enjoyment that came from creating it. Although [Dusan]’s kid certainly seems to enjoy cruising around in it within a close distance to its operator. Be sure to check out the video of it in operation below, and don’t forget that babies are a great way to persuade your significant other that you need more tools in your work bench, like a CNC machine for example.

Filed under: wireless hacks

Get Ready for the Great Eclipse of 2017

พฤ, 01/12/2017 - 22:01

On August 21, 2017, the moon will cast its shadow across most of North America, with a narrow path of totality tracing from Oregon to South Carolina. Tens of millions of people will have a chance to see something that the continental US hasn’t seen in ages — a total eclipse of the sun. Will you be ready?

The last time a total solar eclipse visited a significantly populated section of the US was in March of 1970. I remember it well as a four-year-old standing on the sidewalk in front of my house, all worked up about space already in those heady days of the Apollo program, gazing through smoked glass as the moon blotted out the sun for a few minutes. Just watching it was exhilarating, and being able to see it again and capitalize on a lifetime of geekiness to heighten the experience, and to be able to share it with my wife and kids, is exciting beyond words. But I’ve only got eight months to lay my plans!

Where and When

First, the basics. Totality will cross the Pacific coast at 17:15 UTC just north of Depoe Bay, Oregon. It will proceed across southern Idaho into Wyoming – Grand Teton and Yellowstone visitors will have quite a treat – then Nebraska, a tiny corner of Kansas, Missouri, small slivers of Illinois and Kentucky, across Tennessee and a fraction of North Carolina, finally heading out to sea between Charleston and Myrtle Beach, South Carolina at 18:49 UTC. Need to see how close you are to totality and when you can expect the eclipse to start? NASA has put together a handy interactive Google Map for just that purpose.

The Eclipse of 2015. Source: NASA eclipse web site

Your first task is to decide where you’re going to watch events unfold. Assuming you want to witness totality, quite a few major cities are in or very near the path – Salem, Oregon; Boise, Idaho; Lincoln, Nebraska; Kansas City and St. Louis; and Nashville, Tennessee. Viewing opportunities will abound in and around these cities, so it won’t be much of a chore to step outside at the appointed hour. However, I’ve heard that the sight of the moon’s shadow racing across the land is especially exciting if you can get somewhere elevated. So on the 21st you’ll find me sitting on the top of Menan Butte outside of Rexburg, Idaho, watching the shadow approach across the plains to the west.

It’s worth noting that the path of totality east of the Mississippi is within a reasonable day’s drive of about half the population of the United States. If you need to travel to get to totality, you’ll need to think ahead, because you’re going to be competing with a lot of other eclipse watchers in addition to the usual summer travelers. Destination locations, like national parks and major resort areas, are likely to be booked. In fact, it may be too late already — I can’t find a hotel room in Idaho Falls for that weekend to save my life. Looks like we’ll be camping by the side of the road.

How to Observe Eclipse glasses are a must. Source: Sky and Telescope

Once you decide where to be and make the appropriate sacrifices to the weather deity of your choice for clear skies, what are you going to do? Most people will be content with just watching, but no matter where you go there are likely to be a ton of people and a party atmosphere, so be prepared to be sociable.

For direct viewing before totality, you’ll want to think about eye safety. At more populated viewing sites, vendors will no doubt be doing a brisk business selling eclipse glasses at incredible markups, so you might want to order yours ahead, and maybe have a few extras to share with unprepared watchers. A shade 14 welding helmet filter will also do the trick, as will fully exposed and developed black and white photo film, as long as it’s a silver-based film. Pinhole cameras are a good choice too, but you’ll need at least a meter focal length to project a decent image. If you don’t feel like toting a refrigerator box around, projecting the image from a telescope or binoculars onto a screen is a good way to go too.

And don’t forget to bring a flashlight – it’ll be as dark as night for the few minutes that it takes for the moon’s shadow to pass.

Eclipses Aren’t Just for Watching

Hackers and space geeks might not be content to just watch, of course. Personally, I’ll be tending an array of cameras to capture the event, as I suspect many others will. Many ham radio operators will be trying to use daytime ionospheric skip to work long-distance contacts during the eclipse, and there are some coordinated efforts to conduct experiments during the eclipse. Others with a scientific bent and the right resources might choose to replicate Sir Arthur Eddington’s confirmation of Einstein’s General Relativity during a 1919 solar eclipse; the bright star Regulus in the constellation Leo will be close enough to the sun to allow measurement of the gravitational lensing Einstein predicted. And you might even be able to get funding for public outreach efforts to enhance the viewing experience.

No matter how you choose to spend Eclipse Day 2017, enjoy it. If you do happen to miss it, don’t worry — the US gets treated to another total eclipse in 2024.

And if you happen to find yourself on Menan Butte outside of Rexburg, Idaho, come on over and say hi.

Filed under: Current Events, Featured, news, Original Art, slider, solar hacks

Bring Your Palm VII To ShmooCon This Weekend

พฤ, 01/12/2017 - 20:30

We’re not even halfway through January, and already the conference season is upon us. This weekend, Hackaday will be attending Shmoocon at the Hilton in Washington, DC. I’ll be there getting the full report on Russian hackers, reverse engineering, and what the beltway looks like with an ice storm during morning rush hour.

What’s in store for Shmoocon attendees? The schedule looks really cool with talks on something like inline assembly in Python, tools for RF reverse engineering, manufacturing and selling a U2F token, emulating ARM firmware, and so much more. Want to attend Shmoocon? Too bad! Tickets sold out in less than 10 seconds, and we’re totally not going to talk about the BOTS Act at all. If you’re clever you can still pick up a barcode on Craigslist for $300-400, but I wouldn’t recommend that.

As we did last year, Hackaday is going to have a lobbycon with Dunkin Saturday morning at 08:30, although which lobby is still up in the air. Check out the Hackaday Twitter for a few real-time updates. This is a bring-a-hack event, and I’ll be showing off how to add 18dBi of gain to a standard ESP8266 module. Show off what you’re working on and get a donut.

Filed under: cons, Hackaday Columns

Portable RetroPie Builds on the Shoulders of Giants

พฤ, 01/12/2017 - 19:01

For anyone wanting to get that shot of nostalgia without the hassle of finding an NES Classic, the Retropie project is a great starting point. Of course, it’s not too noteworthy to grab a Raspberry Pi, throw a pre-built distribution on it, and plug in an SNES to USB converter. What is noteworthy, however, is building a Retropie that’s portable and that has the quality and polish of the latest build from [fancymenofcornwood].

For starters, the laser cut wood case was custom-made. From there, all of the PCBs were fitted including specific ones to handle each set of buttons (complete sets of D-pads, shoulder buttons, and joysticks) and another for the 5″ HDMI screen. It has stereo speakers and its own headphone jack (to the envy of all new iPhone owners), and is powered from a Raspberry Pi 2 running Retropie 4.1. The battery pack shouldn’t leave you stranded, either, especially not if you grew up playing the Sega Game Gear.

The quality of the build here is outstanding, and its creator made a design choice to make it easily replicable, so if you’ve wanted to play N64 or PS1 games while on the go, this might be what you’ve been waiting for. There are lots of other options for getting some fun from a Retropie going though, from building one into a coffee table to re-purposing that infamous Game Gear.

Obligatory clip of this portable playing Doom is found after the break.

Filed under: handhelds hacks, Raspberry Pi

Old Motor Donates Rotor for Coaxial Wind Vane and Anemometer

พฤ, 01/12/2017 - 16:01

Problem: build a combined anemometer and wind vane where the pivots for both sensors are coaxial. Solution: turn an old universal motor into a step-wise potentiometer for the wind vane, and then pull a few tricks to get the whole thing assembled.

We have to admit that when we first saw [Ajoy Raman]’s Instructables post, we figured that he used a universal motor to generate a voltage from the anemometer. But [Ajoy]’s solution to the coaxial shafts problem is far more interesting than that. A discarded universal motor donated its rotor and bearings. The windings were stripped off the assembly leaving nothing but the commutator. 1kΩ SMD resistors were soldered across adjacent commutator sections to form a series resistance of 22kΩ with taps every 1k, allowing 0 to 2.2V to be read to the ADC of a microcontroller depending on the angle of the vane.

As clever as that is, [Ajoy] still had to pull off the coaxial part, which he did by drilling out the old motor shaft from one end to the other using just a drill press. The anemometer shaft passes through the hole in the shaft and turns a small DC motor to sense wind speed.

There might have been other ways to accomplish this, but given the constraints and the low cost of this solution, our hats are off to [Ajoy]. We’re a little concerned with that motor used for the anemometer, though. It could result in drag when used as a generator. Maybe a better solution would be a Hall-effect sensor to count rotations of a hard drive rotor.

Filed under: misc hacks

SCSI Emulation Of A Rare Peripheral For The Acorn BBC Micro

พฤ, 01/12/2017 - 13:00

Mass storage presents a problem for those involved in the preservation of older computer hardware. While today’s storage devices are cheap and huge by the standards of decades ago their modern interfaces are beyond the ability of most older computers. And what period mass storage hardware remains is likely to be both unreliable after several decades of neglect, and rather expensive if it works due to its rarity.

The Domesday Project 86 team face this particular problem to a greater extent than almost any others in the field, because their storage device is a particularly rare Philips Laser Disc drive. Their solution is the BeebSCSI, a small board with a CPLD and an AVR microcontroller providing host adaptor and SCSI-1 emulation respectively for a modern micro-SD card.

An original BBC Domesday set-up. Regregex [CC BY 3.0], via Wikimedia Commons.1986 saw the 900th anniversary of the Domesday Book, a survey and inventory of his new kingdom commissioned in 1086 by the Norman king of England, William the Conqueror. One of the ways the event was marked in 1986 was the BBC Domesday Project, a collaboration between the BBC, several technology companies including Acorn and Philips, and a huge number of volunteers from the general public and the British school system. Pictures, video, and text were gathered relating to locations all over the country, and the whole was compiled with a not-quite-hypertext interface onto a set of Laser Disc ROMs. The system required the upgraded Master version of the 6502-based BBC Micro, a SCSI interface, and a special Laser Disc player model manufactured by Philips for this project alone. The hardware was expensive, rare, and unreliable, so few of its contributors would have seen it in action and it faded from view to become a cause celebre among digital archivists.

There have been several resurrections of the project over the years, including one from the BBC themselves which you can browse online. What makes this project different from the others is that it strives to present the Domesday experience as it was originally intended to be viewed, on as far as possible the original hardware and with the original BBC Micro interface. Many original parts such as BBC Master systems are relatively easy to source in 2016, but the special Laser Disc player is definitely not. This board replaces that impossible link in the chain, and should allow them to present a glimpse of 1986 in more than just the on-screen information.

If you would like to see an original BBC Domesday Project system, you can find one in action at the National Museum of Computing, at Bletchley Park. Meanwhile we’ve already featured another peripheral from the same stable as this one, the SmallyMouse USB-to-quadrature mouse emulator.

Filed under: classic hacks

This Bike Sonar is Off the Chain

พฤ, 01/12/2017 - 10:00

On paper, bicycling is an excellent form of transportation. Not only are there some obvious health benefits, the impact on the environment is much less than anything not directly powered by a human. But let’s face it: riding a bike can be quite scary in practice, especially along the same roads as cars and trucks. It’s hard to analyze the possible threats looming behind you without a pair of eyes in the back of your head.

[Claire Chen] and [Mark Zhao] have come up with the next best thing—bike sonar. It’s a two-part system that takes information from an ultrasonic rangefinder and uses it to create sound-localized pings in a rider’s ears. The rangefinder is attached to a servo mounted on the seat post. It sweeps back and forth to detect objects within 4 meters, and this information is displayed radar-sweep-style graphic on a TFT screen via a PIC32.

Though the graphic display looks awesome, it’s slow feedback and a bit dangerous to have to look down all the time — the audio feedback is by far the most useful. The bike-side circuits sends angle and distance data over 2.4GHz to another PIC mounted on a helmet. This PIC uses sound localization to create a ping noise that matches the distance and location of whatever is on your tail. The ping volume is relative to the distance of the object, and you just plug headphones into the audio jack to hear them. Bunny-hop your way past the break to check it out.

Thanks for the tip, [Bruce Land]!

Filed under: transportation hacks

Programming the Open-V Open Source CPU on the Web

พฤ, 01/12/2017 - 07:00

You can now program the Open-V on the web, and see the results in real time. The code is compiled in the web IDE and then flashed to a microcontroller which is connected to a live YouTube live stream. It’s pretty neat to flash firmware on a microcontroller thousands of miles away and see the development board blink in response.

We’ve covered the Open-V before, and the crowd funding campaign they have going. The Open-V is an open hardware implementation of the RISC-V standard. And is designed to offer Cortex M0-class capabilities.

This feels like a create way to play around with some real hardware and get a taste of what a future where we can expect Arduino-like boards, open source down to the transistor level.

For a closer look at why open silicon matters, check out [Brian Benchoff’s] hands-on review of the HiFive, an Arduino form-factor board built around an open hardware RISC-V microcontroller.

Filed under: ARM, Microcontrollers

Drones, Swarms At War

พฤ, 01/12/2017 - 04:00

Using drones in areas of conflict is not something new. As commercial drones get easily affordable, we see it all the time in the news, some soldier using a Parrot drone to scout ahead, above trenches or around buildings. That’s a new reality that soldiers have to get used to. It changes the battlefield, especially traditional ground warfare. There is also research in drone swarms, performing tasks in team for some time now. Some of them are really impressive.

And then there’s the U.S. Military Perdix drones. William Roper of the Department of Defense illustrate what exactly their capabilities are:

Due to the complex nature of combat, Perdix are not pre-programmed synchronized individuals, they are a collective organism, sharing one distributed brain for decision-making and adapting to each other like swarms in nature. Because every Perdix communicates and collaborates with every other Perdix, the swarm has no leader and can gracefully adapt to drones entering or exiting the team.

Did we mention they can be released in mid-flight by a F/A 18 Super Hornet? That’s no piece of cake for any drone but Perdix is able to withstand speeds of Mach 0.6 and temperatures of -10 °C during release. In the latest tests conducted, three jets released a massive swarm of 103 Perdix drones, which after deployment communicated with each other and went on a simulated surveillance mission.

The Department of Defense announced the successful Micro-Drone demonstration and presented a video:

Scary stuff… after watching that video there was only one phrase that came to mind: Resistance is Futile.

[via MIT Technology Review]

Filed under: news

Fail of the Week: NASA Edition

พฤ, 01/12/2017 - 02:31

There’s a reason we often use the phrase “It ain’t Rocket Science”. Because real rocket science IS difficult. It is dangerous and complicated, and a lot of things can and do go wrong, often with disastrous consequences. It is imperative that the lessons learned from past failures must be documented and disseminated to prevent future mishaps. This is much easier said than done. There’s a large number of agencies and laboratories working on multiple projects over long periods of time. Which is why NASA has set up NASA Lessons Learned — a central, online database of issues documented by contributors from within NASA as well as other organizations.

The system is managed by a steering committee consisting of members from all NASA centers. Public access is limited to a summary of the original driving event, lessons learned and recommendations. But even this information can be quite useful for common folks. For example, this lesson on Guidance for NASA Selection & Application of DC-DC Converters contains several bits of useful wisdom. Or this one about IC’s being damaged due to capacitor residual discharge during assembly. If you ever need to add a conformal coating to your hardware, check how Glass Cased Components Fractured as a Result of Shrinkage in Coating/Bonding Materials Applied in Excessive Amounts. Finally, something we have all experienced when working with polarized components — Reverse Polarity Concerns With Tantalum Capacitors. Here is a more specific Technical Note on polarized capacitors (pdf): Preventing Incorrect Installation of Polarized Capacitors.

Unfortunately, all of this body of past knowledge is sometimes still not enough to prevent problems. Case in point is a recently discovered issue on the ISS — a completely avoidable power supply mistake. Science payloads attach to the ISS via holders called the ExPRESS logistics carriers. These provide mechanical anchoring, electrical power and data links. Inside the carriers, the power supply meant to supply 28V to the payloads was found to have a few capacitors mounted the other way around. This has forced the payloads to use the 120V supply instead, requiring them to have an additional 120V to 28V converter retrofit. This means modifying the existing hardware and factoring in additional weight, volume, heat, cost and other issues when adding the extra converter. If you’d like to dig into the details, check out this article about NASA’s power supply fail.

Thanks to [Jarek] for tipping us about this.

Filed under: Fail of the Week, roundup

Encoders Spin Us Right Round

พฤ, 01/12/2017 - 01:01

Rotary encoders are great devices. Monitoring just a few pins you can easily and quickly read in rotation and direction of a user input (as well as many other applications). But as with anything, there are caveats. I recently had the chance to dive into some of the benefits and drawbacks of rotary encoders and how to work with them.

I often work with students on different levels of electronic projects. One student project needed a rotary encoder. These come in mechanical and optical variants. In a way, they are very simple devices. In another way, they have some complex nuances. The target board was an ST Nucleo. This particular board has a small ARM processor and can use mbed environment for development and programming. The board itself can take Arduino daughter boards and have additional pins for ST morpho boards (whatever those are).

The mbed system is the ARM’s answer to Arduino. A web-based IDE lets you write C++ code with tons of support libraries. The board looks like a USB drive, so you download the program to this ersatz drive, and the board is programmed. I posted an intro to mbed awhile back with a similar board, so if you want a refresher on that, you might like to read that first.

Reading the Encoder

The encoder we had was on a little PCB that you get when you buy one of those Chinese Arduino 37 sensor kits. (By the way, if you are looking for documentation on those kinds of boards, look here.; in particular, this was a KY-040 module.) The board has power and ground pins, along with three pins. One of the pins is a switch closure to ground when you depress the shaft of the encoder. The other two encode the direction and speed of the shaft rotation. There are three pull-up resistors, one for each output.

I expected to explain how the device worked, and then assist in writing some code with a good example of having to debounce, use pin change interrupts, and obviously throw in some other arcane lore. Turns out that was wholly unnecessary. Well… sort of.

Abstract Reasoning

I forget that the Arduino, mbed, and other similar platforms have a wealth of (often user-contributed) libraries. I did a quick search from the import dialog (see below) and found several likely-looking libraries. The highlighted item (from [Karl Zweimüller]) was updated this year, so I figured it was a safe bet. Pressing the ridiculously large import button near the top right of the screen took care of it.

With the library in the project, the question becomes: how to use it? Luckily, there’s documentation built in. When you navigate your project, some nodes are source code and some are documentation (they look like little blue documents in the navigator). Clicking on the mRotaryEncoder node shows a useful help document (shown below). What else do you need to know?

The Code

Armed with this, there are just a few lines of code to write. This one sets up the encoder:

mRotaryEncoder enc(D7,D8, D4,PullNone);

The D7, D8, and D4 constants define pin numbers (D7 and D8 are the encoder pins and D4 is the switch which I am actually not using). The PullNone prevents the CPU from enabling internal pullup resistors because the board already has them.

Next, we can assign functions that the library will call on certain events. In particular:

void cw() { dutycycle+=0.1; if (dutycycle>1.0) dutycycle=1.0; } void ccw() { dutycycle-=0.1; if (dutycycle<0.0) dutycycle=0.0; }

You may have deduced my clever naming scheme. The cw function handles clockwise motion, and the ccw function handles the reverse. How does the library know what to call? It takes some setup in the program’s main function:

enc.attachROTCW(cw); enc.attachROTCCW(ccw); But Wait a Minute!

Sure, that’s simple. It is a great abstraction that handles a lot of complex issues. But what do you learn doing that? Not much. For all you can tell, the encoder might have a microprocessor on it and is sending data via some serial protocol (which, actually, isn’t a bad idea with as cheap as processors are now).

I decided it wasn’t sufficient to just roll out a canned library. I drug out the scope, and we put the encoder on channel 1 and channel 4 (it is a shame that channel 2 and channel 4 have nearly the same color on the probe rings). Here’s the result of twisting the shaft clockwise and counterclockwise:

The key is to look at the falling edge of the top trace. Note that in the clockwise case (left image), the bottom trace is high at that time. In the counterclockwise case (right image), it is low. You can actually detect on both edges if you like, but for most purposes, this is sufficient and it really is that simple. Watch for the edge, note the other signal’s state, and that tells you the direction. Clearly, the faster the edges come, the faster the shaft is spinning.

This is known as quadrature encoding because the two signals are 90 degrees out of phase.

Bouncy Bouncy

In an ideal world, this would be pretty easy. However, the world is far from ideal. You can see some noise on the signals if you look closely. Let’s zoom in:

You don’t want to take all of those as falling edges! You need some debouncing. Ideally, you’d wait for the signal to go low, wait a bit, make sure it was still low and then react. Then you would not look again for some other time out delay.

This can be tricky because you typically don’t want to poll for the edge. You want to use something like a pin change interrupt that calls your code when a pin changes state.

Since the mbed libraries include the source, it was easy to look at what was really going on. The library doesn’t use an interrupt. It uses a class known as PinDetect (by [Andy Kirkham]) that polls on a timer (by default, every 20mS).

The code doesn’t have any comments, so I added a few to the partial code below:

void isr(void) { int currentState = _in->read(); // get current pin state if ( currentState != _prevState ) { // if the state has changed if ( _samplesTillAssert == 0 ) { // see if that was long enough _prevState = currentState; // remember state for next time _samplesTillHeld = _samplesTillHeldReload; // reset hold time if ( currentState == _assertValue ) // call correct callback _callbackAsserted.call(); else _callbackDeasserted.call(); } else { _samplesTillAssert--; // state held, so keep counting down } } else { _samplesTillAssert = _samplesTillAssertReload; // reset } ...

Remember, this code runs every 20mS. It looks to see if the input changed from last time and makes the appropriate decision.

The actual encoder object is simple given that you have debounced data. Here’s the function PinDetect calls when the main input goes low:

void mRotaryEncoder::fall(void) { // debouncing does PinDetect for us //pinA still low? if (*m_pinA == 0) { if (*m_pinB == 1) { // state of 2nd pin tells us CW or CCW m_position++; rotCWIsr.call(); // notify user code } else { m_position--; rotCCWIsr.call(); // notify user code } rotIsr.call(); // call the isr for rotation; notify user code } }

Naturally, you might not provide all the callbacks, and that’s not a problem. The library has a similar piece of code for the rising edge, as well. You can find the entire library online if you want to browse it without creating a project.

Just to put this all in perspective, I joined the KY-040 encoder module with a KY-016 RGB LED. I selected pins on the Nucleo board, so the LED module will just plug in, but you’ll still need wires for the encoder. You can find the code on the mbed site, and the comments in the code describe the wiring.

The idea is simple. You can use the encoder to set the level of red the LED emits. Push on the shaft of the encoder, and you can control the green level. Another push sets the blue level. Subsequent pushes repeat the cycle. A simple program, but strangely entertaining to dial in strange colors (like pink or aqua). There’s a quick and dirty demo in the video, below.


I often say you don’t have to know how an engine works to drive a car. But the best drives do know. By the same token, it was easy enough to use this library to read the encoder, and if all you want is results, that’s the way to go. After all, all engineering boils down to abstractions. Maybe you understand assembly language. Maybe you can design a CPU at the logic gate level. Maybe even at the device level. But you probably aren’t growing your own silicon crystals, lapping a wafer, and building the device from there. Even then, you are relying on abstractions about how electrons flow and probably a few others.

However, it probably wouldn’t hurt if you had at least a feeling for how each one of those abstractions work. I don’t think letting students avoid understanding how a rotary encoder works is a good thing. Even if you choose to use a library to hide the details, it is good to understand what is really happening under the hood.

By the way, if you are running short on pins, you might be interested in this alternate method which is truly a hack. Meanwhile, I should probably take my own medicine and build my own encoders.

Filed under: ARM, Hackaday Columns, Microcontrollers, Original Art, rants, Skills