If you read my first post about a simple CPLD do-it-yourself project you may remember that I seriously wiffed when I made the footprint 1” wide, which was a bit too wide for common solderless breadboards. Since then I started over, having fixed the width problem, and ended up with a module that looks decidedly… cuter.
To back up a little bit, a Complex Programmable Logic Device (CPLD) is a cool piece of hardware to have in your repertoire and it can be used to learn logic or a high level design language or replace obsolete functions or chips. But a CPLD needs a little bit of support infrastructure to become usable, and that’s what I’ll be walking you through here. So if you’re interested in learning CPLDs, or just designing boards for them, read on!
Measuring the body’s electrical signals is a neat trick… if you can get your equipment dialed in enough to establish dependable measurements. The technique is called Surface ElectroMyography (SEMG) though you’ll hear many call this ECG. They’re essentially the same technology; the Electro CardioGraph instruments monitor the activity of the heart while SEMG Instruments monitor electrical signals used to control other muscles. Both types of hardware amount to an instrumentation type amplifier and some form of I/O or display.
This topic has been in my back pocket for many months now. Back in May we Hackaday’ites descended on New York City for the Disrupt NY Hackathon event. We arrived a day or so early so that we might better peruse the Korean BBQ joints and check out the other electronics that NY has to offer. On Saturday we gathered around, each shouting out the size of his or her t-shirt preference as we covered up our black Hackaday logo tees with maroon maroon ones (sporting the Hackaday logo of course) for a 24-hour craze of hardware hacking.
There were two individuals at our tables who were both hacking away on hardware to measure the electrical field produced by the body’s muscles in some form or another. The electrical signals measured from the skin are small, and need careful consideration to measure the signal despite the noise. This is a fun experiment that lets you work with both Instrumentation Amplifiers and OpAmps to achieve a usable signal from the movement of your body.
The sweltering heat had finally moved on and Giant Tick season was coming to a close (not kidding, they are HUGE here), when I decided to fire up my hacked together blacksmith forge made out of an old bathroom sink and aquarium stand.
In the age-old formula I needed to supply an air source to a fuel to create enough heat to make iron malleable. I got the idea that this particular bathroom sink might be a good candidate for a fire bowl after I banged my shin with it and then cursed at it. It was clearly made of cast iron and as proof it was clearly unfazed by my tirade of words which I hope my son has learned from the Internet and not from listening to me remodel the bathroom.
A Complex Programmable Logic Device (CPLD) is a great piece of hardware to have in your repertoire. As its name implies, you can program these chips to serve the logic functions you need. This might be replacing an obsolete chip, or maybe just a way to learn and try different techniques. What better way to learn than to get your hands on a CPLD and give it a try?
I created a CPLD module with the intent of being able to plug it into lots of things including solderless breadboards, but I screwed up. It seems that the plugin space available on a solderless breadboard is 1.1”, I had made the footprint 1” wide leaving no room for a row of wires on both sides. Duh.
But let me back up and show more about what I’m doing , I wanted to make a programmable piece of logic that could be built as a kit one could easily solder at home, could be programmed in-circuit, and could work at 3.3 or 5 volts.
To implement an easily solderable kit I went with an older CPLD part that also has 3.3v and 5v versions that will maintain its programming regardless of power. The logic itself is a CPLD IC from the Altera Max family with two versions that fit the board with either 32 or 64 macrocells. A macrocell is the basic logic building block and it is programmed with logic “terms” and then interconnected to other macrocells through a programmable interconnect.
As electronics engineer I have a mental collection of circuits that I’ve gathered over the years, much like a mechanic collects specialized tools as they work. All engineers do this and the tools in their tool boxes usually represent their project history and breadth.
A useful circuit to have in designer’s toolbox is the “high side switch”. Like it sounds, this is a circuit that switches the “high side” or positive voltage to a load.
We usually tend to switch things to ground as seen by outputs such as an Open Collector output, the reason being that ground usually is a known entity and is usually low impedance and is at a known voltage. But there are advantages to using a high-side switch in your circuits.
Finishing up on the topic of CMOS bus logic I am going to show a couple of families with unique properties that may come in handy one day.
High Voltage Tolerant Family: AHC/AHCT
First up is a CMOS logic family AHC/AHCT that has one of the protection diodes on the input removed. This allows a 5V input voltage to be applied to a device powered by 3.3V so that I don’t have to add a gate just for the translation. Any time I can translate and do it without any additional gate delays I am a happy engineer.
Of course the example above works in a single direction and bidirectional does start to get more complicated. Using a bidirectional buffer such as a 74AHCT245 will work for TTL translation when going from 3.3V back to 5V providing there is a direction control signal present.
CMOS opened the door for many if not most of the properties needed for today’s highly integrated circuits and low power portable and mobile devices. This really couldn’t happen until the speeds and current drive capabilities of CMOS caught up to the other technologies, but catch up they did.
Nowadays CMOS Small Scale Integration (SSI) logic families, I.E. the gates used in external logic, offer very fast speeds and high current drive capability as well as supporting the low voltages found in modern designs. Likewise the Very Large Scale Integration (VLSI) designs, or Very Very Large Scale if you like counting the letter V when talking, are possible due to low power dissipation as well as other factors.