Understanding The Quartz Crystal Resonator

Accurate timing is one of the most basic requirements for so much of the technology we take for granted, yet how many of us pause to consider the component that enables us to have it? The quartz crystal is our go-to standard when we need an affordable, known, and stable clock frequency for our microprocessors and other digital circuits. Perhaps it’s time we took a closer look at it.

The first electronic oscillators at radio frequencies relied on the electrical properties of tuned circuits featuring inductors and capacitors to keep them on-frequency. Tuned circuits are cheap and easy to produce, however their frequency stability is extremely affected by external factors such as temperature and vibration. Thus an RF oscillator using a tuned circuit can drift by many kHz over the period of its operation, and its timing can not be relied upon. Long before accurate timing was needed for computers, the radio transmitters of the 1920s and 1930s needed to stay on frequency, and considerable effort had to be maintained to keep a tuned-circuit transmitter on-target. The quartz crystal was waiting to swoop in and save us this effort.

Continue reading “Understanding The Quartz Crystal Resonator”

Good Penmanship With A 3D Printer

[Chris Mitchell] was going to make his own plotter for doing cursive writing for cards but realized he might be able to use his 3D printer to do the writing instead. But then he couldn’t find any suitable software so he did what you’re supposed to do in this situation, he wrote his own called 3DWriter. He even 3D printed a holder so he could attach a pen to the side of the extruder. When not in use as a plotter he simply retracts the pen tip.

The software is written in C# for Windows and is available on GitHub along with a detailed write-up. He clearly put a lot of thought into what features the software offers. After selecting the font, you type in whatever you want printed and then preview it to make sure it looks good. There’s also a bunch of G-Code settings you can fill in such as bed size, the horizontal and vertical offsets of the pen tip from the extruder tip, drawing speed and so on. There’s even an option to do a dry run with the pen raised so you can make sure it’ll draw on the bed where you expect it to.

The code itself is quite clean and easy to understand. If you’re curious like we were at what information is in the font files and how it’s translated into G-Code then download the source from the GitHub page and have a look. [Chris] settled on a font set called Hershey fonts since they’re primarily stroke based fonts as opposed to outline fonts which are what other programs he’d looked at used.

This makes us think of all those 3D printers with busted extruders we’ve seen collecting dust on hackerspace shelves or simply ones considered obsolete. Using them as a plotter gives them new life — even if just as a fun way to learn about writing code for CNC machines. It makes us wonder what other 2D uses they can be put to… cutting vinyl? laser printing? Ideas anyone?

In any case, have a look at the video below to see it in action as a 2D plotter. As a bonus, you’ll also see line art it drew using an Inkscape plugin.

Continue reading “Good Penmanship With A 3D Printer”

The Electrical Grid Demystified

Our society needs energy, and lots of it. If you’re reading this then the odds are astronomically good that you’re on a computer somewhere using energy, with the power cord plugged into the mysterious “black box” that is the electrical grid. The same is true if you’re reading this on a laptop or phone, which was charged from said black box even though it may not be connected at this moment. No matter where you are, you’re connected to some sort of energy source almost all the time. For almost every one of us, we have power lines leading up to our homes, which presumably connect to a power plant somewhere. This network of power lines, substations, even more power lines, and power plants is colloquially known as the electrical grid which we will be exploring in a series of articles.

While the electrical grid is a little over a century old, humanity has been using various energy sources since the agricultural revolution at least. While it started with animal fat for candles, wind for milling grain, and forests for building civilizations, it moved on to coal and steam during the industrial revolution and has ended up in a huge interconnected network of power lines connected to nuclear, natural gas, coal, solar, and wind sites around the world. Regardless of the energy source, though, there’s one reason that we settled on using electricity as the medium for transporting energy: it’s the easiest way we’ve found to move it from place to place.

Continue reading “The Electrical Grid Demystified”

Servo-Controlled IoT Light Switches

The Internet of Things is fun to play with; there’s all manner of devices to automate and control remotely. It can be sketchy, though — make a mistake when coding your automatic plant watering system and you could flood your house. Make a mistake with a space heater and you could burn it down. Combine these risks with the fact that many people live in rental properties, and it can be a difficult proposition to bring the Internet of Things to your home.

[Suyash] came up with a way around this by building 3D printed light switch covers that add servo control. It’s a great solution that it doesn’t require the modification of any mains wiring, and interfaces with the standard switches in the normal way. It makes it a lot safer this way — there are municipal wiring codes for a reason. This is a great example of what you can do with a 3D printer, above and beyond printing out Yoda heads and keychains.

The backend of things is handled by the venerable ESP8266, with [Suyash]’s custom IoT library known as conduit doing the heavy lifting. The library is a way to quickly build IoT devices with web interfaces, and [Suyash] claims it’s possible to be blinking an LED from the cloud within 5 minutes using the tool.

For another take on an IoT light switch, check out this Hackaday Prize entry from 2016.

Shmoocon 2017: The Ins And Outs Of Manufacturing And Selling Hardware

Every day, we see people building things. Sometimes, useful things. Very rarely, this thing becomes a product, but even then we don’t hear much about the ins and outs of manufacturing a bunch of these things or the economics of actually selling them. This past weekend at Shmoocon, [Conor Patrick] gave the crowd the inside scoop on selling a few hundred two factor authentication tokens. What started as a hobby is now a legitimate business, thanks to good engineering and abusing Amazon’s distribution program.

The product in question is the U2F Zero, an open source U2F token for two-factor authentication. It’s built around the Atmel/Microchip ATECC508A crypto chip and is, by all accounts, secure enough. It’s also cheap at about $0.70 a piece, and the entire build comes to about $3 USD. All of this is hardware, and should be extremely familiar to the regular Hackaday reader. This isn’t the focus of [Conor]’s talk though. The real challenge is how to manufacture and sell these U2F dongles, a topic we looked in on back in September.

The circuit for this U2F key is basically just a crypto chip and a USB microcontroller, each of which needs to be programmed separately and ideally securely. The private key isn’t something [Conor] wants to give to an assembly house, which means he’s programming all these devices himself.

For a run of 1100 units, [Conor] spent $350 on PCB, $3600 for components and assembly, $190 on shipping and tariffs from China, and an additional $500 for packaging on Amazon. That last bit pushed the final price of the U2F key up nearly 30%, and packaging is something you have to watch if you ever want to sell things of your own.

For distribution, [Conor] chose Fulfillment By Amazon. This is fantastically cheap if you’re selling a product that already exists, but of course, [Conor]’s U2F Zero wasn’t already on Amazon. A new product needs brand approval, and Amazon would not initially recognize the U2F Zero brand. The solution to this was for [Conor] to send a letter to himself allowing him to use the U2F Zero brand and forward that letter to the automated Amazon brand bot. Is that stupid? Yes. Did it work? Also yes.

Sales were quiet until [Conor] submitted a tip to Hacker News and sold about 70 U2F Zeros in a day. After that, sales remained relatively steady. The U2F Zero is now a legitimate product. Even though [Conor] isn’t going to get rich by selling a dozen or so U2F keys a day, it’s still an amazing learning experience and we’re glad to have sat in on his story of bootstrapping a product, if only for the great tip on getting around Amazon’s fulfillment policies.

Microfluidics “Frogger” is a Game Changer for DIY Biology


See those blue and green dots in the GIF? Those aren’t pixels on an LCD display. Those are actual drops of liquid moving across a special PCB. The fact that the droplets are being manipulated to play a microfluidics game of “Frogger” only makes OpenDrop v 2.0 even cooler.

Lab biology is mainly an exercise in liquid handling – transferring a little of solution X into some of solution Y with a pipette. Manual pipetting is tedious, error prone, and very low throughput, but automated liquid handling workstations run into the hundreds of thousands of dollars. This makes [Urs Gaudenz]’s “OpenDrop” microfluidics project a potential game changer for the nascent biohacking movement by offering cheap and easy desktop liquid handling.

Details are scarce on the OpenDrop website as to exactly how this works, but diving into the literature cited reveals that the pads on the PCB are driven to high voltages to attract the droplets. The PCB itself is covered with a hydrophobic film – Saran wrap that has been treated with either peanut oil or Rain-X. Moving the droplets is a simple matter of controlling which pads are charged. Splitting drops is possible, as is combining them – witness the “frog” getting run over by the blue car.

There is a lot of cool work being done in microfluidics, and we’re looking forward to see what comes out of this open effort. We’ve covered other open source efforts in microfluidics before, but this one seems so approachable that it’s sure to capture someone’s imagination.

Continue reading “Microfluidics “Frogger” is a Game Changer for DIY Biology”

3D Print Your E-Drum Pads

The concept behind DIY electronic drum kits is fairly simple — small piezoelectric elements are used to generate a voltage when the drumpads are struck. That’s easy enough, but the mechanical design can be a difficult problem to approach. To solve that, [ryo.kosaka.10] decided to design an E-drum pad made with paper & 3D printed parts.

As far as E-drum triggers go, it follows the basic rules — a piezo element used as a trigger with some foam used for damping. For the striking surface, a Tama-brand mesh drum head is used. Being an off-the-shelf drum head, it has a good feel and playability. But the shell is where the creativity really shines through. While the top and bottom parts are 3D printed in the usual way, the main shell of the drum is made with several layers of thick paper laminated together with glue. This creates a surprisingly strong, sturdy shell and is also much faster and less wasteful than waiting for a similar part to 3D print.

To round out the guide, instructions are given on how to wire the piezo triggers up for either a regular E-drum sound module or an Arduino. It’s a nice touch, as those inexperienced with E-drums may not be entirely familiar with how they work – this way, anyone can give the project a try.

Keen for something bigger? Back in 2014 we saw this awesome 5-piece e-drum kit built out of buckets.