For Your Binge-Watching Pleasure: The Clickspring Clock Is Finally Complete

It took as long to make as it takes to gestate a human, but the Clickspring open-frame mechanical clock is finally complete. And the results are spectacular.

If you have even a passing interest in machining, you owe it to yourself to watch the entire 23 episode playlist. The level of craftsmanship that [Chris] displays in every episode, both in terms of the clock build and the production values of his videos is truly something to behold. The clock started as CAD prints glued to brass plates as templates for the scroll saw work that roughed out the frames and gears. Bar stock was turned, parts were threaded and knurled, and gear teeth were cut. Every screw in the clock was custom made and heat-treated to a rich blue that contrasts beautifully with the mirror polish on the brass parts. Each episode has some little tidbit of precision machining that would make the episode worth watching even if you have no interest in clocks. For our money, the best moment comes in episode 10 when the bezel and chapter ring come together with a satisfying click.

We feature a lot of timekeeping projects here, but none can compare to the Clickspring clock. If you’re still not convinced, take a look at some of our earlier coverage, like when we first noticed [Chris]’ channel, or when he fabricated and blued the clock’s hands. We can’t wait for the next Clickspring project, and we know what we’re watching tonight.

Posted in brass, Clickspring, clock, clock hacks, clockmaking, heat treating, lathe, machining, mill, misc hacks, steel, timepiece | Leave a comment

The Internet of Tampons

At the 2016 Hackaday Superconference, Amanda Brief and Jacob McEntire gave a talk on what they’ve been working on for the past few years. It’s My.Flow, the world’s first tampon monitor capable of tracking saturation, and eliminating anxiety, leakage, and infection. It’s better than a traditional tampon, and it’s one of the rare Internet of Things things that actually makes sense.

There’s a long history of technological innovation to deal with menstruation. What began with simply sending women out of the village for a week turned into a ‘sanitary belt’ after a few thousand years. This astonishing technological advance of treating women as people led to the pad, the cup, and eventually, the disposable tampon. Now My.Flow is applying modern electrochemical technology to move the state of the art forward.

There are three parts of My.Flow — the smartphone app, a tampon monitor, and the slightly modified tampons themselves. These modified tampons are just dumb sensors and are attached to the small, clip-on tampon monitor to provide a Bluetooth connection to the phone.

As with any Internet of Things thing, one question must be asked: why on earth would you do this? No one will ever watch YouTube videos on their fridge, and a smart toaster oven is useful if and only if it can be hacked into a solder paste reflow oven. Here, My.Flow succeeds in building something useful. My.Flow will track and predict a menstrual flow, predict ovulation, when a period will start, and the amount of time left until a tampon should be removed.

In the talk, Amanda and Jacob compared the My.Flow to the ubiquitous Fitbit. In our opinion, it’s an apt description — half the population deals with menstruation and the My.Flow is a fantastically innovative piece of technology we might be seeing everywhere soon.

Posted in 2016 Hackaday Prize, 2016 Hackaday SuperConference, cons, Hackaday Columns, Hackaday Prize, My.flow, Tampon, wearable hacks | Leave a comment

Hack Safely: Fire Safety in the Home Shop

Within the past two months we’ve covered two separate incidents of 3D printing-related fires. One was caused by an ill-advised attempt to smooth a print with acetone heated over an open flame, while the other was investigated by fire officials and found to have been caused by overuse of hairspray to stick prints to the printer bed. The former was potentially lethal but ended with no more than a good scare and a winning clip for “Hacking’s Funniest Home Videos”; the latter tragically claimed the life of a 17-year old lad with a lot of promise.

In light of these incidents, we here at Hackaday thought it would be a good idea to review some of the basics of fire safety as they relate to the home shop. Nowhere was this need made clearer than in the comments section on the post covering the fatal fire. There was fierce debate about the cause of the fire and the potential negative effect it might have on the 3D-printing community, with comments ranging from measured and thoughtful to appallingly callous. But it was a comment by a user named [Scuffles] that sealed the deal:

“My moment of reflection is that it’s well past time I invest in a fire extinguisher for my workstation. Cause right now my fire plan pretty much consists of shouting obscenities at the blaze and hoping it goes out on its own.”

Let’s try to come up with a better plan for [Scuffles] and for everyone else. We’ll cover the basics: avoidance, detection, control, and escape.


The hacking lifestyle is full of “do not try this at home” moments. We routinely play with high voltages, open flame, high temperatures for soldering and welding, volatile and flammable solutions — and sometimes all at once. When you’re in the zone on a build, you may not notice the stray datasheet that fell across your soldering station, or the fact that you’ve plugged one too many instruments into that power strip. All it takes is a second for a situation to go very bad.

Case in point: back in grad school, I showed up late one night to the lab to tend an experiment. As soon as I unlocked the door I knew there was trouble; the scent of burning plastic hung heavy in the air. I investigated further and found a smoking puddle of molten packing foam lying around a Bunsen burner on one of the benches. Apparently a fan had started automatically and dislodged the foam from a shelf; it wafted down and landed perfectly on the burner which had been left on by our technician at the end of the work day.

It was the perfect storm of factors, and only by chance was I there to intervene and prevent the fire from spreading, but it illustrates a few important points:

  1. You need to do a safety audit of your workspace on a regular basis. Make sure nothing can conceivably cause fuel to be exposed to heat in the presence of oxygen — the basic recipe for fire.
  2. Open flame and high temperatures require extra vigilance. Go ahead, be paranoid – check everything twice or three times before leaving the shop. Take a play from the commercial pilot’s handbook and make a shop shutdown checklist if you have to.
  3. Keep your head in the game. My erstwhile colleague nearly burned the lab down in a moment of distraction. It was absolutely understandable in retrospect — he was going through a divorce at the time. But when you’re tired, sick, or emotionally compromised, it’s probably not the best time to be in the shop. Be safe, go read Hackaday instead.


Most modern smoke detectors are wired to mains or have a sealed 10-year batteryMost modern smoke detectors are wired to mains or have a sealed 10-year battery

Smoke detectors are almost universally required by building codes, and you’d think that more than 40 years after being widely and cheaply available to the mass market that there’d be no dwelling without at least one. Unfortunately, that’s not the case, and newspapers run sad reports every day quoting a fire marshall as saying, “There were no working smoke detectors in the house.”

Make sure your shop is covered by at least one working smoke detector. If like many of us you’ve been relegated to the basement for your hacking activities, don’t rely on smoke detectors on the upper levels to do the job, install one nearby. If your shop is in a detached building, you’ve got the extra problem of being out of earshot if the alarm sounds. Consider a WiFi-enabled smoke detector, or hack one together yourself. You can even IoT any smoke detector by simply adding a smart battery.

Fire Control

Despite your best efforts at prevention, you might face the day when a fire starts in your shop. This is not the moment to realize you have no means to fight the fire. You need to have the tools and the training in place long before the need arises.

You need a quality fire extinguisher suitable for the types of fires likely in the home shop. A quick review of the classification of fires:

  • Class A – Ordinary combustibles like wood, paper, trash, and plastic
  • Class B – Combustible liquids like gasoline, oils, or solvents
  • Class C – Fires in energized electrical equipment
  • Class D – Combustible and reactive metals like magnesium, lithium or titanium

New 5-lb ABC fire extinguisher for my shop.Ansul Sentry 5-lb ABC fire extinguisher I just purchased for my new shop.

There’s also a Class K for cooking oil fires, but unless you’re hacking a turkey fryer that’s probably out of scope for the home gamer. In most cases you’ll be in the market for a Type ABC dry chemical fire extinguisher, in the 5- to 10-pound range.

Do yourself a favor and don’t buy cheap. A fire extinguisher is a life safety appliance, and that’s no place to economize. In general, the fire extinguishers available at big-box stores are junk. Rule of thumb: if the valve head is made of plastic (like in the banner image of this article), it’ll leak. Spend a few bucks more on a unit you know will perform when you need it. Most cities have at least one fire safety company that sells and services fire extinguishers; personally, I’d rather spend a little more money with a local company and build a relationship that’ll pay benefits down the road.

You’re also going to need to know how to use a fire extinguisher. It’s not second nature at all, and when it comes time to use one, it’s not the time to be RTFMing. At a minimum you’ll want to watch some good training videos so you at least have the basics. But nothing beats hands-on training. Your local fire service company can help there, although they may charge for live-fire training. You might also try contacting your local fire station; the firefighters will likely be more than happy to help you get trained.


When all else fails, you need to be able to get out of danger. Again, this takes forethought. You need to consider escape routes as part of your safety audit. Make sure you identify at least two routes of retreat, in case one route is blocked by fire. And don’t forget to practice your plan – in a crisis we tend not to rise to the occasion but instead perform at the highest level of proficiency to which we’ve trained.

Whatever your game is, if you’re reading Hackaday, chances are pretty good that you do something more dangerous than the average Joe on a pretty regular basis. Wouldn’t it make sense to be a little smarter and a little better prepared than the average Joe, too?

Posted in fire, fire extinguisher, fire safety, Hackaday Columns, safety, Skills, smoke alarm, workshop safety | Leave a comment

Decabit: Or The Conspiracy Theory That Wasn’t

[LDX] first noticed the odd sounds coming out of his ceiling fan, regularly, on the hour and half-hour. Then he noticed that the lights were flickering as well. Figuring something was up, he built a logging power-line monitor to see if he could decode the shadowy signals and figure out what cryptic messages were being transmitted over the power lines. Naturally, he suspected the Illuminati were behind it.

Even if you’re not prone to flights of fancy, you might want to keep track of your power line because it can serve as an accurate long-run timebase for projects, or because it can tell you something about the overall health of the grid.

3696681480306491308[LDX]’s circuit is as simple as can be. A 10 V AC transformer reduces the mains power down to something reasonable. A resistive divider chops this down further to the range that an Arduino can handle, and then another voltage divider biases the signal to the Arduino’s ADC midpoint. The plus-minus 10 V signal thus swings between 0 and 5 V, just.

SPOILERS! After confirming that there was a higher-frequency wiggle superimposed on top of the power-line frequency, he contacted the folks at his power company in Denver. The system is called Decabit and it’s used to control street lights, hot water boilers, and other public infrastructure that might want to be coordinated to run when power is cheap or when it gets dark. The PDF that he links to explains it all, so you can take your tinfoil hat right back off.
But we still think it’s a fun project to look into the power lines. Who knows what other people will find? CON-spiracy!

Posted in arduino, Arduino Hacks, illuminati, mains detection, mains frequency clock, power line signal | Leave a comment

The Demise of Pebble as a Platform

Despite owning five, including the original Pebble, I’ve always been somewhat skeptical about smart watches. Even so, the leaked news that Fitbit is buying Pebble for “a small amount” has me sort of depressed about the state of the wearables market. Because Pebble could have been a contender, although perhaps not for the reason you might guess.

Pebble is a pioneer of the wearables market, and launched its first smartwatch back in 2012, two years before the Apple Watch was announced. But after turning down an offer of $740 million by Citizen back in 2015, and despite cash injections from financing rounds and a recent $12.8 million Kickstarter, the company has struggled financially.

An offer of just $70 million earlier this year by Intel reflected Pebble’s reduced prospects, and the rumoured $30 to $40 million price being paid by Fitbit must be a disappointing outcome for a company that was riding high such a short time ago.

Building Wearable Tools, Not Wearable Products

There is no more hackable smart watch than the Pebble. Here it's used as part of a sailing computer.There is no more hackable smart watch than the Pebble. Here it’s used as part of a sailing computer.

Right now the wearables market is suffering, even more than the Internet of Things, from the platform problem — people are building platforms, rather than products. This often happens when people, or companies, see a new emerging technology but don’t quite know what to do with it yet. The problem continues until the platforms are good enough, or widespread enough, that people will automatically pick an existing one rather than reinventing the wheel. They start, in other words, to build products. Although it’s happening painfully slowly, the Internet of Things is starting to drag its way out of the platform problem — but the same can’t be said of wearables.

Arguably perhaps, one of the main reasons that the Internet of Things has taken off is Bluetooth LE, and Apple moving it outside of its restrictive MFi program. Bluetooth LE hardware is cheap, readily available, and easier to use than previous Bluetooth standards. It also uses very small amounts of power, and has a data rate sufficient for most sensors. It’s a good fit for the Internet of Things, but widespread adoption didn’t happen until manufacturers could make use of it to offload UI tasks to a more suitable platform — the smartphone — and when Apple moved Bluetooth LE outside of the MFi program it solved what I’ve always referred to as ‘the 50% problem’ which was that only half of the world’s smart phones could talk to sensors and other hardware using it.

What the wearables category needed, and still needs, is something that could similarly drive adoption of simple, cheap, sensors. Something that would allow makers and manufacturers to concentrate function, rather than having to reinvent the wheel for every device, by having to give it its own UI. Which brings us to the smartstrap.

The Smartstrap as a Platform

xado-smart-strap-concept-from-pebbleThe arrival of the Pebble Time, and the company’s second Kickstarter introduced the smartstrap. The idea was simple, the new watch came with a smart accessory port allowing the straps to connect to the watch, and contain electronics and sensors, that could be interfaced directly with apps running on Pebble Time.

If handled right, smartstrap could easily have proved to be a driver for innovation in the wearable market — allowing manufacturers not only to power their wearables, but to offload UI tasks to a suitable platform, one the user would be carrying with them in any case: the watch they already owned.

Interestingly, the smartstrap was a pretty open standard, and building one was fairly straightforward. Pebble posted mechanical details along with assembly instructions, the only part of the strap that was not available off-the-shelf was the adapter, and Pebble made both STP and STL files available allowing you to print your own, or if you couldn’t be bothered you could always get one from Shapeways.

They also provided a simple suggested circuit—using a single buffer/driver voltage level converter with Zener diodes for ESD protection — to connect a ‘normal’ RX/TX serial connection you might use with an Arduino to the smartstrap.

There was even an example Arduino library, for communicating with the Pebble Time using the smartstrap port, as an example implementation of the smartstrap protocol, showing how to talk to the smartstrap from your Pebble, and how to talk to the Pebble from the smartstrap.

Missing the Jump

There are several main areas where I think something like the smart strap could have made a big difference in the current wearables market, enabling manufacturers and makers building a wearable devices by providing a ‘default’ platform.

The first is wearable sensors, for instance medical sensors to measure skin temperature, heart rate, and blood oxygen levels. Despite the apparent success of the quantified self movement there are far fewer Fitbit-like devices than there are watches, and far fewer people willing to clip yet another device to themselves than would be prepared to wear a watch. The relatively long battery life of the Pebble, and its ability to power sensors, would also come into play here especially for applications like sleep tracking.

But when thinking about sensors and the smartstrap it’s important to consider the possibly large installation base. As well as personal sensors it could be possible to use the platform to provide large scale, highly distributed measurements of things like weather and other environmental data.

It’s possible the smart strap could also have provided a vital kick to the indoor location problem. At the moment the smartphone is serving as the default platform for navigation. However it doesn’t necessarily provide the best — or a particularly subtle — UX in that role, especially indoors. You could imaging tactile feedback using the smartstrap for navigation, e.g. turn left, turn right, straight ahead, allowing people to navigate strange buildings more naturally.

In other words, a popular and open smartstrap standard might easily have driven products by being a wearables platform that was “good enough” for people to use instead of having to invent their own.

So Whatever Happened to the Smartstrap?

Seeed's Xadow adapter clips onto the back of PebbleSeeed’s Xadow adapter clips onto the back of Pebble

Pebble set up a $1 million fund to encourage development, and hosted a weekend long hackathon in Boulder, but developer excitement was pretty muted. SeeedStudio brought its Xadow Adaptor to market but, outside of Kickstarter where an NFC payment strap and a GPS strap were funded, few other commercial products were built.

Despite some really interesting one-off devices getting built (one team at the Pebble Hacks Boulder event even built a gramophone dock for the watch) development around the smartstrap platform faltered. It never became a viable option for widespread hobby projects. Without this kind of low-level adoption there simply wasn’t a mechanism to make the smart strap desirable to those who had already adopted the Pebble watch, much less to attract new interest.

Just Ahead of its Time?

Pebble’s next attempt and final at a wearable platform came with its latest Kickstarter and the Pebble Core. As our computing diffuses out into the environment, into wearables and the Internet of Things, it’s realistic to expect that our UI — how we interact with our computing — will also move out away from the ubiquitous smartphone and its screen. The Pebble Core is foreshadowing that trend, essentially a smartphone in a box without a screen, it could serve as the hub of your personal computing. A platform for other wearables and device manufacturers to build around.

Peeble Core --Pebble Core –“an entirely new device for runners”

With the sale of Pebble to Fitbit, and the likelihood that the Pebble brand will be phased out after the acquisition — Fitbit is after all interested in Pebble’s intellectual property not its devices — it’s possible we won’t see how this attempt at a platform plays out. It’s even possible that the Pebble Core now won’t ship to backers at all. Especially as Fitbit itself isn’t doing all that well.

The Apple Newton is perhaps the most well know poster child for the saying that, behind every successful idea is the same idea done by someone else, just too early. Where Apple failed, at least the first time around, before the iPhone changed everything, Palm succeeded. This time around we know only two things. Firstly that the demise of Pebble and its platform is now mostly assured, and that at least some companies still have faith in the wearables market. Perhaps the next platform will have better luck.

[Main image by 23rd Studios — Boulder, CO]

Posted in Business, Featured, fitbit, internet of things, IoT, Mergers & Acquisitions, pebble, pebble watch, platform, slider, smartstrap, wearable hacks | Leave a comment

Micro SD Card Data Recovery


Ever wonder how data recovery is done when an micro SD card fails? HDD Recovery Services shows us how he recovered the data. He uses 800 grit sand paper and wet sands the card till the card PCB pads are showing. He then micro solders wires from a memory reader directly to the SD card PCB. He is then able to pull the NAND flash data and save it locally. Not sure what he charges but based on the work that goes into getting it done it won’t be cheap.


Posted in Electronic Hacks | Leave a comment

Hacking a Device That Lives Inside the Matrix

[Gerardo Iglesias Galván] decided he wanted to try his hand at bug-bounty hunting — where companies offer to pay hackers for finding vulnerabilities. Usually, this involves getting a device or accessing a device on the network, attacking it as a black box, and finding a way in. [Gerrado] realized that some vendors now supply virtual images of their appliances for testing, so instead of attacking a device on the network, he put the software in a virtual machine and attempted to gain access to the device. Understanding the steps he took can help you shore up your defenses against criminals, who might be after more than just a manufacturer’s debugging bounty.

The device he attacked tried to secure itself. The bootloader was protected. The filesystems were encrypted. Did he get in? Read the story for yourself and find out.

As more projects connect to the Internet, there’s more opportunity for bad mischief. It wasn’t from hacking, but look how much trouble shutting down everyone’s Nest thermostats caused, not to mention the major internet outage caused by hacked cameras. We’ve talked about hardening Raspberry Pi projects before using things like two-factor authentication. Might not be enough, but its a start.

Posted in bug bounty, Computer Hacks, cybersecurity, hacking, security, software hacks, virtual machine, white hat hacking | Leave a comment

Insanely Hot Oven Makes Pizza in 45 Seconds: Avidan Ross on Food Hacking

In the future, nobody will have to cook for themselves: the robots will take care of it all for us. And fast! At least if folks like [Avidan Ross] have their way. He gave a talk on his 45-second pizza robot, and other DIY food automations, at the 2016 Hackaday SuperConference, and you’re invited to pretend that you were there by watching this video.

Why would you want to build machines to build food? It’s a serious challenge, and there’s always going to be room to improve and new frontiers to cross. There’s immediate feedback: [Avidan] gets to taste and tweak in a quick feedback cycle. And finally, everybody eats, so it’s not hard to find “test subjects” for his work.

Super Hot, Super Fast Pizza

OK, so now you’re onboard with why you’d want to work on food, why would you want to cook your pizza so fast? The answer is the crust. When the oven is hot enough to vaporize water and cook the dough firm in nearly the same instant, it leaves big fluffy air pockets that make a phenomenal crust. Neapolitan pizza authorities require a pizza to be cooked in 90 seconds. [Avidan] was sure that hotter and faster would be better, so he aimed for a 45-second pizza.

The talk gets into the specifics of building a rocket stove, and a Pompeii oven on top of that. And while he got an oven that would reach 1000 degrees F, and cook a pizza in 60 seconds, that was only excessively fast and not ridiculously fast. So he added forced air and some smarts. Or rather, after firing it up for the first time, and losing some eyebrows to the ensuing 1500 degree F flamethrower, he throttled it down using an H-bridge and a microcontroller brain.

The oven is actually a hybrid: the floor of the oven is precisely controlled with Kanthal coil and a temperature probe for feedback, while the wood fire heats up the dome and adds smokey flavor. So when the pizzas were coming out a bit soft on the bottom, [Avidan] could crank up the floor temperature to compensate. In the end they got the temperatures so well controlled that they used a three-stage profile over the 45 seconds: super hot for the first ten seconds, medium hot in the middle, and then back to super hot for the last ten seconds to finish it off. Why? Because it tasted the best. It’s not science unless you can isolate the variables, folks.

Food Hacking

The second half of [Avidan]’s talk is more approachable for those of us who don’t have space for a 3000-lb, wood-devouring flamethrower in the back yard. It’s all about fun ways to introduce automation into your home kitchen. “Introduce” with a screwdriver, sensors, and a Raspberry Pi, that is.

If you want to get started making your own cooking automation, you want to approach it like an engineer. Knowing your food and the chemistry of your cooking techniques is obvious, but [Avidan]’s approach is to control and automate everything. So when he built a smoker, he controlled not just the temperature inside the smoker, but also the airflow going into the fire chamber, and even the humidity inside. Then he put sensors on everything and closed the loop. That way, he could create whatever temperature profile he wanted, and nail it.

And now, [Avidan] is working on coffee. There’s a scale on the floor of the espresso machine and a stepper motor on the grinder, controlling how finely the coffee is ground. So when he pulls a shot, the coffee machine knows how fast the espresso is coming out. Eventually, [Avidan] is going to close the loop, making the grinder run coarser when the espresso shot takes too long, and vice versa. With the right feedback, this should eventually make the perfect cup. (He doesn’t mention how he’s controlling the pressure with which the operator tamps down the grinds. Inquiring minds want to know!)


In the end, [Avidan]’s talk is really just about the joys of building your own. In his case, it’s his own food-making machines, but that’s just a detail really. He loves food, and we do too, but he could have just as easily have been talking about robot gardening or automated scarf weaving. The point is to pick something that you love and automate it to see if you can make it better. You’ll be more motivated along the way, and you’ll be that much more proud of the outcome. That’s great advice to the budding hardware hacker!

Posted in 2016 Hackaday SuperConference, automation, Avidan Ross, coffee, cons, cooking hacks, espresso, food, oven, Pizza | Leave a comment

Taking It To Another Level: Making 3.3V Speak with 5V

If your introduction to digital electronics came more years ago than you’d care to mention, the chances are you did so with 5V TTL logic. Above 2V but usually pretty close to 5V is a logic 1, below 0.8V is a logic 0. If you were a keen reader of electronic text books you might have read about different voltage levels tolerated by 4000 series CMOS gates, but the chances are even with them you’d have still used the familiar 5 volts.

This happy state of never encountering anything but 5V logic as a hobbyist has not persisted. In recent decades the demands of higher speed and lower power have given us successive families of lower voltage devices, and we will now commonly also encounter 3.3V or even sometimes lower voltage devices. When these different families need to coexist as for example when interfacing to the current crop of microcontroller boards, care has to be taken to avoid damage to your silicon. Some means of managing the transition between voltages is required, so we’re going to take a look at the world of level shifters, the circuits we use when interfacing these different voltage logic families.

Do You Even Need A Level Shifter?

It might seem odd to start a treatise on level shifting this way, but the first question for the designer when looking at making a 3.3V part talk to a 5V part should be this: Do I even need a level shifter?

If the 3.3V part is an output and the 5V one an input, the lower voltage part can hardly damage the higher voltage one with overvoltage. And you are not likely to encounter a logic input that might demand so much current that it would damage your output (If you do, use a buffer!). If you are lucky the logic voltage ranges of the two devices may even coincide. For example 3.3V TTL logic shares the 0.8V and 2V thresholds for logic 0 and logic 1 transitions with 5V TTL logic, so a 3.3V TTL output can drive a 5V TTL input without any extra hardware required.

In the other direction, driving a 3.3V input from a 5V output you might expect that a level shifting circuit would be required, and in many cases you would be right. But before reaching for that shifter it’s worth taking a look at the detailed specifications of your 3.3V input. Many devices are designed to be 5V tolerant, and you might be lucky enough to find that your circuit could use one and avoid the extra circuitry. For example the 74LVC series contains a range of 5V tolerant 3.3V versions of many 74-series ICs.

CMOS And TTL: A Level Shifting Cautionary Tale

Comparison of TTL and CMOS logic thresholds with comparison to 3.3V output. NXP application note 240.Comparison of TTL and CMOS logic thresholds with comparison to 3.3V output. NXP application note 240 (PDF).

When directly driving logic you’d normally use at 5V from a 3.3V output there is one cautionary tale of which to take heed, a personal confession of an electronic failure. CMOS logic defines its logic thresholds as a percentage of supply voltage, which with a 5V supply puts the logic 1 threshold of 70% well above the 3.3V logic 1. Some CMOS ICs such as the 74HC4053 analogue switch I used in a Raspberry Pi project don’t quite follow this standard and will work from a 3.3V TTL output, so I was lulled into a false sense of security and reached for another 74HC part to connect to my Raspberry Pi with a new design. As you might expect it failed to work, and of course I wasted time looking everywhere else but my defective choice of part. If there is a moral to this story it is to always read the datasheet carefully, and use the TTL-compatible parts such as in this case 74HCT, when they are available.

If your 3.3V device inputs are not 5V tolerant and your 5V inputs lack 3.3V compatible thresholds then sadly you won’t be able to interface them across voltage levels without a shifter circuit. There are many choices available to you including a whole host of dedicated level shifter devices such as these ones from TI, but aside from personal preference some of them will be dictated by your application. Will it be a step-up, a step-down, or do you need a bi-directional level shifter? If you decide not to use a dedicated part or a 5V tolerant gate in your design, here are a few of the many alternatives.

Step-down level shifters

A simple resistive downshifter.A simple resistive downshifter.

The simplest possible step-down circuit is a resistive divider. Drive your 5V output into a chain of resistors, from which you tap your 3.3V logic input. A chain consisting of a 2.2k and a 3.3k resistor should produce a 3V output from an applied 5V input. It does not preserve the fan-out characteristic of the 3.3V output and you need to be aware of any capacitances that may also reside in whatever logic is connected to it and the effect they may have along with the resistors on fast rise times, but it should suffice for most simple level downshifting tasks facing a hobbyist. There are variations on this circuit that use diodes instead of a resistor to achieve the required voltage drop.

If the divider is not suitable for your application and you still eschew a dedicated shifter, take a look further down the page at bidirectional shifters.

Step-up level shifters

A diode logic level step-up circuit. From Microchip app note DS41285A.A diode logic level step-up circuit. From Microchip app note DS41285A (PDF).

For stepping up from 3.3V logic to 5V logic and assuming you are not safely within the TTL thresholds as described above such that you can do without a shifter, you will require something a little more complex than the resistive divider in the previous section. The simplest circuit uses a pair of diodes with careful biasing and choice of series resistor as shown in the diagram to the right. The application note it comes from advises that the resistor should be significantly less than the input impedance of the 5V gate, to avoid its being part of a resistive divider with that impedance having an effect on the output voltage.

An inverting MOSFET logic level step-up circuit. Yet again, from Microchip app note DS41285A.An inverting MOSFET logic level step-up circuit. Yet again, from Microchip app note DS41285A.

A rather more obvious circuit uses a MOSFET or bipolar transistor as a switch, driving the gate or base with the 3.3V logic and taking the 5V logic output from the drain or collector. This is very similar to using a gate with an open-collector output in the same application. This is a simple and reliable circuit, but it must be borne in mind that it inverts the 3.3V logic level.

Bi-directional level shifters

The bidirectional MOSFET level shifter.The bidirectional MOSFET level shifter.

The circuits in the previous two sections are both only suitable for unidirectional logic lines, but not in the case of a bidirectional bus. As before there are plenty of off-the-shelf bus level shifters from a range of semiconductor manufacturers to choose from, but if these are not suitable for your design then a handy alternative can be made with a MOSFET and a couple of resistors. It’s also worth pointing out that this doesn’t have to be used on a bidirectional bus, it can serve as a general purpose level shifter for the cost of a 2N7000 or similar, indeed this is a personal favourite for this application. You can readily buy this circuit on a breakout board from several electronics suppliers if building it yourself doesn’t appeal. For more information on its operation take a read of the Philips application note AN97055 (PDF), which examines its use on an I2C bus.

It can be a worry, when you first have to ensure that different logic levels are safely interfaced. Will my 5V Arduino harm this 3.3V sensor? We hope that after reading this piece you’ll have some more confidence, and we’ve equipped you with enough to make some sense of the topic. We’ve not covered every possible technique, but if you read some of the attached application notes and then search the web for real-world usage they should fill in any gaps.

Posted in 3.3v, 5v, 5V tolerant, Engineering, level shifting, logic, logic levels, parts, ttl | Leave a comment

Breathe Easy with a Laser Cutter Air Filter

A laser cutter is a great tool to have in the shop, but like other CNC machines it can make a lousy neighbor. Vaporizing your stock means you end up breathing stuff you might rather not. If you’re going to be around these fumes all day, you’ll want good fume extraction, and you might just consider a DIY fume and particulate filter to polish the exhausted air.

15203365_644939182347358_619032134291602214_nWhile there’s no build log per se, [ZbLab]’s Facebook page has a gallery of photos that show the design and build in enough detail to get the gist. The main element of the filter is 25 kg of activated charcoal to trap the volatile organic compounds in the laser exhaust. The charcoal is packed into an IKEA garbage can around a prefilter made from a canister-style automotive air cleaner – [ZbLab] uses a Filtron filter that crosses to the more commonly available Fram CA3281. Another air cleaner element (Fram CA3333) makes sure no loose charcoal dust is expelled from the filter. The frame is built of birch ply and the plumbing is simple PVC. With a 125mm inlet it looks like this filter can really breathe, and it would easily scale up or down in size according to your needs.

No laser cutter in your shop to justify this filter, you say? Why not build one? Or, if you do any soldering, this downdraft fume extractor is a good way to clear the air.

Posted in activated charcoal, air cleaner, air filter, cnc, cnc hacks, green hacks, laser cutter, laser hacks | Leave a comment