The Joys Of Shipping From China

A few months ago, news of a new PCB fab service headed up by [Ian] over at Dangerous Prototypes leaked onto the Internet. It’s extremely cheap – $14 USD for a 5cm square board with free worldwide shipping. [Ian] admits the boards aren’t the greatest quality, that’s not the point; the site’s motto is simply, ‘No bull, just crappy PCBs.’

What began as an internal website to handle all of DP’s PCB orders was now on the Internet, and orders were flying in. At first, shipping a few dozen PCBs around the globe every week was easy, but since Dirty PCBs hit the big time, customers rightfully or not, started freaking out because of the oddities of Chinese shipping and logistics companies.

[Ian] is using Espeed Post for all their shipping, and if you’ve ever ordered anything from China off of Ebay, it’s possible you’ve had something shipped through Espeed before. Because of the oddities of shipping, and the fact that Shenzhen and Hong Kong are right next to each other, even the people at Dangerous Prototypes don’t know which countries your PCBs will go through on the trip from the fab house to your front door. This has caused much consternation with DirtyPCB customers that don’t seem to realize they’re getting custom PCBs for under two dollars a board, shipped to them across the world in a week for free. Some people’s children, huh?

Things get significantly, ahem, dirtier, when Chinese holidays are taken into account. China has a lot of them, and they’re long. They’re just wrapping up the National Day holiday, 10 days in the first week of October. Everyone is backlogged, and the China/Hong Kong border is the mess of trucks seen above.

If a holiday isn’t bad enough, the new President of China is cracking down on corruption. 500 officials were fired at the largest land border with Hong Kong, due in no small part to vans full of meth and tons of counterfeit currency. Every package leaving China is inspected individually, and shipping times have exploded.

To deal with this, Dangerous Prototypes has posted a big red warning on the dirtypcb site, but experience in dealing with people on the Internet tells them this won’t be a viable solution. They’re now dealing directly with DHL, and are apparently getting priority clearance through customs. It’s not fun, as DP will now have to figure out how to work with DHL’s API. It’s a lot of work and a lot of trouble, but DP still has a few tricks up their sleeve – they’re working on an online schematic entry and PCB layout site and the extremely interesting DirtyCables – custom cables shipped to your door.

Remote Control For An Elevator

Electric_Imp_elevator_hack_overview

The elevator at [Alex]’s office building has some quirks which make it very inconvenient to everyone in the building. The major problem was that the doors of the elevator at each floor stay locked until someone walks down the hall to hit a button. Obviously this was a hassle, so [Alex] built a controller that can remotely call and unlock the elevator. (Part 2 of the project is located on a separate page.)

The first step was to source the hardware and figure out exactly how the controls for the elevator worked. [Alex] decided to use an Electric Imp for this project, and after getting it connected to the Internet, he realized that he could power it directly off of the elevator’s 10V supply. From there, he used relays to interface the Electric Imp with the “elevator call” and “elevator unlock” buttons inside the elevator’s control panel.

Once the hardware side was completed, it was time to move on to the software side. [Alex] wrote a mobile app for a user interface that can be accessed from anywhere, and also wrote the code for the Electric Imp agent and the code that runs on the Electric Imp itself. Now, a simple tap of a button on a mobile device is enough to call the elevator or unlock it, rather than in the past where someone had to run down a hall to hit the button.

We hope there is some security on the mobile app, otherwise anyone in the world will be able to call the elevator and turn it into a passenger-less useless machine!

Ask Hackaday: What Are Invariant Representations?

Your job is to make a circuit that will illuminate a light bulb when it hears the song “Mary Had a Little Lamb”. So you breadboard a mic, op amp, your favorite microcontroller (and an ADC if needed) and get to work. You will sample the incoming data and compare it to a known template. When you get a match, you light the light. The first step is to make the template. But what to make the template of?

“Hey boss, what style of the song do you want to trigger the light? Is it children singing, piano, what?”

Your boss responds:

“I want the light to shine whenever any version of the song occurs. It could be singing, keyboard, guitar, any musical instrument or voice in any key. And I want it to work even if there’s a lot of ambient noise in the background.”

Uh oh. Your job just got a lot harder. Is it even possible? How do you make templates of every possible version of the song? Stumped, you talk to your friend about your dilemma over lunch, who just so happens to be [Jeff Hawkins] – a guy whose already put a great deal of thought into this very problem.

“Well, the brain solves your puzzle easily.” [Hawkins] says coolly. “Your brain can recall the memory of that song no matter if it’s vocal, instrumental in any key or pitch. And it can pick it out from a lot of noise.”

“Yea, but how does it do that though!” you ask. “The pattern’s of electrical signals entering the brain have to be completely different for different versions of the song, just like the patterns from my ADC. How does the brain store the countless number of templates required to ID the song?”

“Well…” [Hawkins] chuckles. “The brain does not store templates like that”. The brain only remembers the parts of the song that doesn’t change, or are invariant. The brain forms what we call invariant representations of real world data.”

Eureka! Your riddle has been solved. You need to construct an algorithm that stores only the parts of the song that doesn’t change. These parts will be the same in all versions – vocal or instrumental in any key. It will be these invariant, unchanging parts of the song that you will look for to trigger the light. But how do you implement this in silicon?

Continue reading “Ask Hackaday: What Are Invariant Representations?”

New To The Store: Teensy 3.1

New today in the Hackaday Store is the Teensy 3.1. This development board blows away most others in its class. The board plays nicely with the Arduino IDE, but embedded developers who are hardcore enough have the option of bare metal programming for the Coretex-M4 chip.

Why would we say this blows most others away? In our minds, the 64k of RAM and 72 MHz clock speed place this far outside of what you would normally see hanging out in the Arduino ecosystem. That may be changing with new players like the Edison, but the Teensy 3.1 doesn’t require a host board and comes in just under $20 compared to the Edison’s $50 price tag.

[Paul Stoffregen], the developer of the Teensy, is a hacker’s hacker and is known to be found round these parts. All year [Paul] has been developing an Audio Library that takes advantage of the Teensy 3.1’s powerful processor (including its DMA features; we’ve been pestering him to write an article for us on that topic). We covered the library back in September and are stocking the audio add-on board in the store as well. Quite frankly, the quality of sound that this puts out is astonishing. If you’re working on a project that calls for playback of recorded sound this is one of the least-complicated ways to get there.

Reverse Engineering Altium Files

Several times in the last few weeks, I’ve heard people say, ‘this will be the last PCB I design in Eagle.’ That’s bad news for CadSoft, but if there’s one thing Eagle has done right, its their switch to an XML file format. Now anyone can write their own design tools for Eagle without mucking about with binary files.

Not all EDA softwares are created equally, and a lot of vendors use binary file formats as a way to keep their market share. Altium is one of the worst offenders, but by diving into the binary files it’s possible to reverse engineer these proprietary file formats into something nearly human-readable.

[dstanko.au]’s first step towards using an Altium file with his own tools was opening it up with a hex editor. Yeah, this is as raw as it can possibly get, but simply by scrolling through the file, he was able to find some interesting bits hanging around the file. It turns out, Altium uses something called a Compound Document File, similar to what Office uses for Word and PowerPoint files, to store all the information. Looking through the lens of this file format, [dstanko.au] found all the content was held in a stream called ‘FileHeader’, everything was an array of strings (yeah, everything is in text), and lines of text are separated by ‘|’ in name=value pairs.

With a little bit of code, [dstanko] managed to dump all these text records into a pseudo plain text format, then convert everything into JSON. You can check out all the code here.

[Peter] And The Amazing Technicolor Phone Wire Bracelet

When a job left him with some extra phone wire, [Peter] didn’t toss it in the scrap pile. He broke out the casting resin and made an awesome bracelet (Imgur link). [Peter] is becoming quite an accomplished jeweler! When we last checked in on him, he was making rings out of colored pencils.

Casting the wire in resin was as simple as building a square form, placing the wires, then filling the form with appropriate amounts of epoxy and hardener. Once the epoxy cured, [Peter] drilled out the center with a sharp Forstner bit. A band saw brought the corners of the block closer to a cylinder.

From there it was over to the lathe, where [Peter] used a jam chuck to hold the bracelet in place. Once he shaped the bracelet [Peter] started wet sanding. It took Lots and lots of sanding both inside and out to finish the bracelet. The result is a mirror smooth finish, with bits of insulation bright copper just popping out of the resin.

One might think that the bracelet would be rough with all that copper, but [Peter] mentions on his Reddit Thread that it feels like plastic, though the bits of copper were “very pokey” before sanding. We’d recommend tossing on a clear coating to protect the exposed copper. Worn on a wrist, all that exposed metal would start oxidizing in no time.

This hack gives us lots of ideas for casting wearable circuits. Some WS2812’s and a teensy would make for a pretty flashy setup! Got an idea for a project? Tell us about in the comments, or post it up on Hackaday.io!

Continue reading “[Peter] And The Amazing Technicolor Phone Wire Bracelet”

Digital “Crystal” Breathes New Life Into Old Radio

[Bill Meara] of the Soldersmoke Podcast has a nice old Drake 2B radio, and wanted to use it for the 12 meter amateur band. These old radios normally make switching tuning bands easy — you just swap out one frequency crystal for another and you’re set.

Only [Bill] didn’t have the 21 MHz crystal that he needed. No problem, because he had a junk crystal, a hacksaw, and a modern direct-digital synthesis (DDS) chip sitting around. So he takes the donor crystal, cuts it open, and solders the two wires directly from the DDS to the crystal’s pins. Now he’s got a plug-in replacement digital oscillator that doesn’t require modifying the nice old Drake receiver at all. A sweet little trick.

The video’s a little bit long, but the money shot comes in around 5:00.

Now, one might worry about simply plugging a powered circuit (the DDS) in place of a passive element (the crystal), but it seems to work and the proof of the pudding is in the tasting. We wonder how far this digitally-controlled-analog-receiver idea could be extended.