It’s time to do a series on logic including things such as programmable logic, state machines, and the lesser known demons such as switching hazards. It is best to start at the beginning — but even experts will enjoy this refresher and might even learn a trick or two. I’ll start with logic symbols, alternate symbols, small Boolean truth tables and some oddball things that we can do with basic logic. The narrative version is found in the video, with a full reference laid out in the rest of this post.
The most simple piece of logic is inversion; making a high change to low or a low change to high. Shown are a couple of ways to write an inversion including the ubiquitous “bubble” that we can apply almost anywhere to imply an inversion or a “True Low”. If it was a one it is now a zero, where it was a low it is now a high, and where it was true it is now untrue.
Moving on to the AND gate we see a simple truth table, also known as a Boolean Table, where it describes the function of “A AND B”. This is also our first opportunity to see the application of an alternate symbol. In this case a “low OR a low yields a low”
Most if not all of the standard logic blocks come in an inverted form also such as the NAND gate shown here. The ability to invert logic functions is so useful in real life that I probably used at least three times the number of NAND gates as regular AND gates when doing medium or larger system design. The useful inversion can occur as spares or in line with the logic.
A few years ago, [Mitch Altman] from Noisebridge came up with the idea of a Hackerspace Passport. The idea behind it was not to hinder or monitor travels but to encourage visiting other hackerspaces. These passports can be purchased for just a few dollars or, in true open source fashion, be made with nothing more than a computer printer… the Hackerspace Passport design files are totally free and available here.
So next time you’re visiting a new hackerspace, bring your passport and get it stamped to document the trip…. and that brings us to the point of this post: The Stamp. At around $25, having a custom ink stamp made at an office supply store isn’t that much money, but buying a stamp is not as fun as making one! That is what we are going to do today; make a stamp… or more specifically, several stamps using different techniques. Then we’ll compare the performance of each method.
Stamp 3D Model
Inkscape solid HaD logo
Inkscape Lined HaD Logo
Printed Stamp Mold
Printed Stamp STL
Since this is Hackaday, we will be making a Hackaday Logo stamp. Back a couple years ago we ran a contest asking folks to make unique things with the Hackaday logo. To make it easy for the entrants, the Hackaday logo was made available in SVG format. We’ll start with that, since it is available, and make a minor change by adding some lettering, as most soon-to-be stamp makers will probably want letters on their stamps too. This is easily done in the FOSS vector graphic editor software: Inkscape.
The stamp size is important. A Hackerspace Passport page has room for 4 stamps up to 41 x 47mm and we’ll try to keep our stamp within those limits.
A Thermocouple is a terrific way to measure temperature. The effects of temperature change on dissimilar metals produces a measurable voltage. But to make that measurement you need an amplifier circuit designed for the thermocouple being used.
While researching “Zero Drift Amplifiers” as a follow-up to my video on Instrumentation Amplifiers I noticed the little schematic the front page of the LTC1049 datasheet which is shown here. I thought it was an ideal example of an analog application where some gain and some “gain helper” were needed to accomplish our useful little application of amplifying a thermocouple probe.
In the video I don’t really talk much about the thermocouples themselves other than the type I see most of the time which is type K. If you’re not already familiar with the construction of these probes you can find an informative write-up on thermocouples and the different types on the Wikipedia page and you might also want to check out the Analog Devices app note if you would like to know more. What I will cover is a reliable and precise way to read from these probes, seen in the video below and the remainder of the post after the break.
Microcontroller Dev Boards have the main hardware choices already made for you so you can jump right into the prototyping by adding peripherals and writing code. Some of the time they have everything you need, other times you can find your own workarounds, but did you ever try just swapping out components to suit? [Andy Brown] documented his process of transplanting the clock crystal on an STM32F4 Discovery board.
Even if you don’t need to do this for yourself, the rework process he documented in the clip after the break is fun to watch. He starts by cleaning the through-hole joints of the crystal oscillator with isopropyl alcohol and then applies some flux paste to each. From there the rest is all hot air. The crystal nearly falls out due to gravity but at the end he needs to pluck it out with his fingers. We’re happy to see others using this “method” as we always feel like it’s a kludge when we do it. Next he grabs the load caps with a pair of tweezers after the briefest of time under the heat.
We’d like to have a little bit of insight on the parts he replaces and we’re hoping there are a few crystal oscillator experts who can leave a comment below. [Andy] calculates a pair of 30pf load caps for this crystal. We understand the math but he mentions a common value for board and uC input capacitance:
assuming the commonly quoted CP + CI = 6pF
So we asked and [Andy] was kind enough to share his background on the topic:
It’s a general “rule of thumb” for FR4 that the stray capacitance due to the traces on the board and the input (lead) capacitance of the the MCU is in in the range of 4-8pF. I’m used to quoting the two separately (CP,CI) but if you look around you’ll see that most people will combine the two and call it just “CP” and quote a value somewhere between 4 and 8pF. It’s all very “finger in the air” and for general purpose MCU clocks you can get away picking the mid-value and be done with it.
That leaves just one other question; the original discovery board had an in-line resistor on one of the crystal traces which he replaces with a zero ohm jumper. Is it common to include a resistor and what is the purpose for it?
The ESP8266 is the answer to “I want something with Wifi.” Surprisingly, there are a number of engineers and hobbyists who have not heard of this chip or have heard of it but don’t really understand what it is. It’s basically the answer to everything IoT to so many engineering problems that have plagued the hobbyist and commercial world alike.
The chip is a processor with integrated RAM, some ROM, and a WiFi radio, and the only external components you will need are 4 capacitors, a crystal and an external flash! It’s CHEAP, like $4/ea cheap! Or $5 if you want it on a nice, convenient carrier board that includes all these components. The power consumption is reasonable (~200mA)1, the range is insane ~300m2 without directional equipment, and a PCB trace antenna and ~4km if you want to be ridiculous.
One place thing that more people need to know about is how to program directly for this chip. Too many times projects use it as a crutch via the AT commands. Read on and find out how to hello world with just this chip.
It’s becoming more common to see DRM cropping up in an increasing number of hardware products nowadays. Quite often, its used to prevent the use of unauthorized consumables and some may argue that it helps prevent counterfeiting and help shore up revenues. But it’s a totally different matter when DRM is used to severely limit the operational life of a product. When [travis] wrote in about the run time limitation on an “Illumimask” light therapy device, we first had to look up what that device was. Apparently, these are anti-acne or anti-aging light therapy masks that use red and blue LEDs to kill skin bacteria, stimulate skin cells and reduce blemishes. While these claims most likely may not hold water, the device itself is cheap enough not to hurt you at $30 a pop.
The trouble is, it is limited to 30 daily uses of 15 minutes each, totaling just 7 1/2 hours, effectively lasting you a month. At the end of which, you just discard the device and get a new one. That seems like a ridiculous waste of a perfectly fine, functional device whose LED’s can last at least 30,000 to 40,000 hours. [travis]’s wife [Bebefuzz] was obviously pissed at this situation. So she did a simple hack to bypass the microcontroller that imposed the goofy restrictions. In [travis]’s own words “Not a crazy-technical hack…. but a very functional one to bypass a manufacturer’s ‘WTF'”. It involved soldering a slide switch across the circuit terminals that the micro-controller uses to monitor the LED current (likely). Unfortunately, this also breaks the 15 minute timer measurement, so she now has to manually switch off the device at the end of the 15 minute therapy cycle.
These days there a large number of sensors and analog circuits that are “controller friendly” meaning that their output signal is easily interfaced to the built-in Analog to Digital Convertors (ADCs) often found in today’s micro-controllers. This means that the signals typically are already amplified, often filtered, and corrected for offset and linearity. But when faced with very low level signals, or signals buried in a larger signal an Instrumentation Amplifier may be what’s needed. The qualities of an Instrumentation Amplifier include:
A differential amplifier with high impedance and low bias current on both inputs.
Low noise and low drift when amplifying very small signals.
The ability to reject a voltage that is present on both inputs, referred to as Common Mode Rejection Ratio (CMRR)