It reminds me of a similar experience I had in a museum where the experiment had you cycling to give power to a bulb. The quicker you cycled, the more power you gave to the bulb and the brighter it was. But it was based on some microcontroller and the light bulb’s brightness was not proportional to how fast you cycled. It has like 3 preprogrammed brightness. It completely failed to give kids the intuition of the physics behind the phenomenon.
Anyway, it’s probably an unfair comparison but I like having the real deal when learning or teaching.
One of the biggest “disappointments” my professors shared - which I’ve never confirmed in industry- is that this is super common for digital logic, or else it’s just a “lookup table” with precomputed outputs for every input.
This is how FPGAs work. Because they need to be programable, so the LUTs are in SRAMs inside the logic blocks.
But actual custom ASICs don't use SRAM, as SRAM has higher area and power cost than logic.
A gate is no less real for living in an ATmega rather than a 74XX, note.
At a much younger age, I was interested in amateur radio. As luck would have it, I learned of a night school course being held at one of the local high schools that was meant to teach you everything you needed to know to get your license. The instructor (late 20s, if I had to guess) really knew his stuff. I think this gave me a far better grasp of the relevant electromagnetic and electronics theory and practice than I feel is made available through present-day amateur radio "memorize the answers and some context around them" teaching materials. My point is, if you want to stretch your understanding of electronics, it's possible a local ham might be another good option to consider.
- A large breadboard
- A battery holder
- An online kit with an assortment of passive components (resistors, capacitors, inductors)
- A cheap USB oscilloscope
Some of these kits even include things like FETs, opamps, 555 timers etc. Which really stretches what you can build.
Then just look online for circuits that you find interesting, build them and probe them (with the oscilloscope). The closer you get to building something you find useful the more engaging the experience will be.
a pretty ham fisted analogy, imagine a full glass of water on the left, and an empty glass of water on the right. you pour the water from the full glass into the empty glass. There is a BOATLOAD of physics happening there. but all you really care about is Left glass full -> left glass empty. easy peasy.
if you're comfortable with https://nandgame.com you've pretty much got all you need to know how computers work. the last bit is pretty much, how do you use a transistor to make a nand gate? it blew my mind to find out it's just - https://mathcenter.oxford.emory.edu/site/cs170/nandFromTrans...
Stuff that's changing is tougher, like radios or whatever. digital is sort of steady -> chaos -> steady. analog you care a lot about all the little partial derivatives.
The ben eater videos maybe? https://eater.net/8bit/ He'll walk you through a lot of basic electronics in a pretty casual way.
I wish I could give you something more "sure fire way to learn electronics" but my knowledge is pretty haphazard. that stuff helped me.
https://www.amazon.com/Getting-Started-Electronics-Forrest-M...
Now, resistors, capacitors, transistors and everything else had functions that solved problems I was having.
[0] https://pisces.bbystatic.com/image2/BestBuy_US/images/produc... [1] https://i.ebayimg.com/images/g/oNgAAOSwiZ9k1T1y/s-l1600.jpg
I am a beginner, so it would be hard to suggest what project to implement. I mainly used resistors to not burn the arduino I/O pins, and voltage divider circuit to step down the voltage for components with voltage different than 5v.
It's more computing focused that electronics focused, but it's a great entrypoint for learning about how logic gates translate into an algorithmic unit and memory.
Also, if you're only interested in small hobbyist circuits, it will simplify things if you only think about DC. AC is a rabbit hole of electrical engineering and physics complexity that you may not be interested in quite yet.
https://www.amazon.co.uk/Circuits-Devices-Systems-Electrical...
I know things can get dangerous with high voltage, but it’d be fun have a “playbook” for low voltage applications.
The best answer to your question is "Do anything. Anything at all".
Consider a transistor is a voltage-controlled current source (TRANSfer resISTOR) as a model and the head scratching starts.
Why is just as important as doing it.
I have an engineering degree (10 years ago) but I honestly don't have a clue of how this shit works, other than some basic physics intuition.
https://ia600609.us.archive.org/9/items/TNM_Digital_Equipmen...
When I first got into Arduino I bought myself a set of 74xx gates and a breadboard and I wrote a program that would try a range of possible inputs and generate truth tables, I found that the breadboard + 74xx gates + jumper wires was a very physical way to experiment. The range of parts you can get is huge:
https://en.wikipedia.org/wiki/List_of_7400-series_integrated...
even though my understanding now is that you are probably better off using the 54xx CMOS parts instead.
You can do the same with switches and LEDs but boy do you run into trouble when you get into parts like flip-flops that have a memory because you will press a button once and thanks to keybounce your device will think you pressed the button 10 times. You get better results using the Arduino as a driver and those programs are really easy to write.
That said, I agree that using an MCU is even easier and almost always cheaper if when you choose the appropriate chip.
The Digital Equipment Corporation H-500 Computer Lab made it's appearance around 1969.
Michael Gardi built a reproduction of the H-500 Computer Lab that is nothing less than spectacular. Not only did he pay meticulous attention to detail, but he has also produced clear and engaging documentation. It is not just a beautiful project; it is a work of art!
Michael's goal clearly went beyond building a simple functional equivalent to the H-500. He was equally concerned with maintaining an "outwardly accurate appearance of the original". After 3 months of work he succeeded in every way. You can find details of his work here on Hackaday and in his Instructable.
https://hackaday.io/project/170232-dec-h-500-computer-lab-re...
https://www.instructables.com/id/DEC-H-500-Computer-Lab-Repr...
John L Hughes designed the DEC Computer Lab and wrote the manual. His illuminating historical notes and a pdf of the DEC manual can be found here:
https://archive.org/details/bitsavers_dechandboobWorkbook196...
If you just want to play with digital logic in 2023, there are easier methods. You could just download one of the many free simulators for Windows. De Morgan's theorem is just a few clicks away.
https://listoffreeware.com/free-logic-gate-simulator-softwar...
.
[0]: https://store.steampowered.com/app/1444480/Turing_Complete/
As others have said, the fact that this is all being emulated by a microcontroller feels like cheating. If you're going to emulate, why not just use a circuit simulator like Logisim?
Really fun game btw.
Yet the link to have a board made is $99 for just the board.
Would love to team up with folks interested in snagging one of these... maybe we could do a group buy somewhere?
If you plan to use such digital logic gates in a modular synthesizer, you most likely want to add some protection circuit on the inputs and run the whole thing at 5V instead of 3V.
I've built small arduino projects, such as PIR sensor controlled under-cabinet lighting and a foot-controlled "prev/next" buttons for a slideshow display, but I'm now lost in working with audio.
I'm wanting to build an audio mixer next, but audio is proving to be difficult for me to reason about. The rest of this post will talk about my idea, so skip it if you're not interested, or read it if you want to give me any ideas! :)
Here's the full idea (for which I have not been able to find a commercial alternative): I want my home automation (RPi and Home Assistant) to integrate with my house's current speaker system and be able to mix audio on demand. For example, if an audible alert needs to be played, then the volume of whatever is currently being played will be reduced so that the alert can be heard, and then restored when the alert is finished. So if I'm watching a movie and my garage door opens, I want to know about it! Additionally, music should be able to follow me from room to room, and I should be able to send audio to one specific room if I desire. Finally, my digital organ has multiple audio channel outputs in order to replicate the pipe placement in different parts of an auditorium, and I would like for this system to support that as well (make the far-away pipes play from the next room, for example).
In order to accomplish this, I want to build a zigbee-controlled audio mixer (with on-device fallback controls) for making use of my house's audio system (pre-wired when I bought the house, but the seller took the audio system with them and left the speakers!!) in conjunction with Home Assistant. Personally speaking, I don't like any solution that relies on a 3rd party to still be in business and be supporting my product a decade later, so self-hosted it is!
I assume that I need a lot of ADCs for the inputs (14 channels in... yes, I have a reason for that many... and 18 channels out). I would want the mixing to be "any input channel can go to any output channel", so using a CPU for the mixing would undoubtedly be better than trying to do it all with discrete components. The thought of building an 18-channel amp is a bit daunting! 7 stereo inputs (3 of which are really the 5.1 audio input) and 9 zones (3 of which are really a 5.1 speaker setup that is currently not being used at all) is a tall order for any commercial solution. Generic mixers do exist, of course, but they usually don't support that many outputs (and they definitely don't integrate with HA!).
If you want to build it yourself and if you want to keep it cheap and simple: integrating an ADC or DAC on a custom board isn't that hard, at least if you don't need "perfect" "audiophile" audio quality; usually the datasheets of the ADC / DAC chips already tell you exactly how you're supposed to use them + external components you need and so on. In your case, you'll probably want to use a cheap FPGA for mixing (think of Spartan-6 or newer), since that can easily handle dozens of channels, unlike cheap MCUs which usually don't support the number of channels you'd need. With MCUs the limit isn't necessarily how much you could mix in software, but how many ADC/DAC channels you can physically attach to the chip. For zigbee (or whatever network protocol you prefer) you can find dozens of small chips which can interact with that. Since it sounds like your system is wired anyway, you could also think about Ethernet for the network. When you start playing around with this, I'd recommend building a simple and minimal prototype first with e.g. a stereo in/out + network, to keep the manufacturing costs low in case you mess up the design, and once this works as intended, build the "full" 14x18ch module. Don't forget to add some simple debug port like e.g. RS232, it's cheap to add and it makes your life during development much easier.
I was hoping to keep the cost at sub-$1k (although that is by no means a hard limit), but you are correct in that I already have the speakers wired in. Basically all cables come to a single location, which is where the amps need to go (speakers are not powered). It seems that the previous owner just ran the same 2 channels to all rooms in an on/off configuration.
I didn't think about the RS232 for debugging, but that's a good idea.
I know that the datasheets give external components, but when I was looking at this ~6 months ago, it seemed that most of the options were surface mount, and I've only done breadboard designs, so I didn't know how to work with that for prototyping purposes. This may be my biggest sticking point.
Also, I didn't know if FPGA or something more familiar (such as a RPi) would be better for mixing. I have a PhD in CS, but I've never worked with FPGAs!!! lol I only know what they are in theory!
I'm not against rolling up my sleeves and working, I just didn't know where to start. Even the smallest MVP (stereo in, mixer, stereo out) has too many parts with which I am unfamiliar.
There is enough bandwidth on a USB 2.0 HS port for many channels of audio, you could just buy a couple decent multichannel USB 2.0 HS audio interfaces. They are pretty readily available with 8 in / 8 out (mono) channels in one box for a few hundred bucks. You can plug these into a RPi and it probably has enough grunt to do the processing using JACK or pipewire or some similar audio router with some custom code to manage it. Full-pipeline latency could be problematic, especially if you need to stay in sync with the TV and whatnot that is pretty noticeable and often can't be compensated. This is probably the simplest way to get something that 'works-ish' though. People use similar (smaller) setups for realtime room/speaker compensation filters and it seems to work alright, and this application isn't too far off from that. In fact, you might want to do that too.
There's an analog solution too, your RPi or microcontroller can manage an array of variable gain amplifiers (using a slow / cheap multichannel DAC) or programmable gain amplifiers (directly with I2C or SPI) which form the inputs to a traditional summing mixer circuit. Then you don't need to worry about processing some dozens of megabits of audio data with low-ms of latency and just need to set appropriate gains, but the analog design is a bit more complicated. Still, this is IMO much easier than an ADC -> FPGA -> DAC pipeline.
Prototyping SMT parts you can either buy protoboards with the chip mounted and pins for use with a breadboard, SparkFun and AdaFruit make tons of modules like this, or try AliExpress, and you can find devboards for pretty much any microcontroller or FPGA too. If the chip you need to work with doesn't have such a board available, you can get generic breakout boards for most SMT packages and solder the chips on yourself. It's not that difficult, though it takes decent equipment and a bit of practice. Having custom PCBs made is also super cheap now, and that is how I would recommend approaching this, if you're willing to tackle the soldering challenge and don't' mind the somewhat long iteration cycle as you wait for boards to arrive from Asia (or don't mind paying for premium shipping or a more-local manufacturer).
That's because most components today are only available as SMD. Once you play around with higher speed digital chips, breadboards are not really suitable anyway. But don't worry about SMD devices, there are manufacturers like e.g. JLCPCB which build the PCB and assemble it for you if you give them the manufacturing files. In that case you give them your Gerber + placement files and you get a board with all the SMD parts assembled already and you only have to solder e.g. connectors yourself. The board will be indistinguishable from something you'd buy in a commercial device. It's also cheap enough that it's totally fine to do this for prototypes, but it will usually take a while (think of 1-2 weeks) to get the board, so "prototyping" is a bit slow.
If you have no idea about this / never did this before, maybe start with a simple test board where you figure out how to use e.g. KiCAD to design a PCB and how to get it assembled? It's quite easy, but you should be familiar with the process before you attempt to build anything more complex, simply because everything you build costs money in the end and if it doesn't work, it's annoying.
> I didn't think about the RS232 for debugging, but that's a good idea.
In case you wonder why I said RS232, it's probably the simplest protocol (electrical and logical) you can use, which makes it really hard to mess it up. In most cases all you need is an RS232 transceiver chip like an SP3232E and a UART interface on your FPGA/MCU/...
> speakers are not powered
Means: you'll need some amplifiers too. You again have two options: get some cheap commercially available amplifiers and only think about the mixer or completely build it yourself. If you build it yourself, you could look at Class D amplifiers, there are chips which directly translate digital I2S or TDM signals to the PWM signals for the speakers.
> I have a PhD in CS, but I've never worked with FPGAs!
In that case it will be quite the learning curve, because with FPGAs you don't write "software", you essentially describe a digital chip instead. A good starting point would probably be to get one of the cheap FPGA evaluation boards, ideally with an FPGA similar to what you want to use in the end. Keep in mind that if you put an FPGA onto your own board, you'll need some way to program it, like e.g. a JTAG programmer. That's the same with microcontrollers too btw, except you might need an SWD programmer then if it's some Cortex-M MCU. And if you get the one supported by the chip manufacturer (or a cheap Chinese clone of that one), things usually get easier because then it's supported by the development environment of the manufacturer.
> I'll look into the MOTU devices... I had not heard of them before!
You probably didn't hear about that before because it's "pro" audio hardware and not something an average consumer would ever buy/use. In this case it's only line level, so you still need amplifiers for the speakers afterwards. Maybe you'll find something that's even better for your specific use case. For commercially available amplifiers, you could again look at "pro" hardware which usually comes in 19" rackmount cases and sometimes there are even other options for "fixed" installations. That being said, be careful to not get an amplifier which is way too "powerful" for your speakers and you can also waste a lot of money on fancy things you don't need.
I would suggest iCE40 or GW1N to get started. Simple, low cost and low risk.
Supported by yosys+nextpnr open stack. And plenty of tutorials and courses online, be it articles, books or even video.
Why not use actual logic gate chips? I made a board like this a long time ago with 74xx-type chips. It was neat looking at a datasheet[1] and seeing exactly how the pins correspond to the gates.
A 747-100 is 70m long,
Wingspan ~60m.
(I am not saying everyone has a mailbox accessible through a front yard, or even has a front yard, or necessarily a mailbox. Just want to make that clear to the whole internet.)
I dunno. I mean, there's no question that they are less widely than in their heyday. But I think there might be a surprising number of uses where they are used for some small (very small) bit of functionality where even the smallest microcontroller is overkill.
In my own experience, I had something recently where I literally needed a single AND gate to switch a transistor on or off based on whether one or both of two power rails were HIGH. A discrete 74xx chip turned out to be the simplest way to implement that.
2018 link (PDF): https://www.ti.com/lit/pdf/scyt129
How the heck did I just leave an entire word out? sigh
1 quad NAND gate
1 quad NOR gate
1 quad XOR gate
1 hex inverter
The cost isn't the main thing here, though. A better reason to go with discrete logic is that the MCU also requires an entire software and hardware toolchain to create and load firmware.
Never underestimate the cost of adding nonvolatile memory to your system.
The article also mentions that ATMEGA809 should work here, and costs about $1.53 in singles https://www.digikey.com/en/products/detail/microchip-technol...
> I built two prototypes, one with an AVR128DA48, and one with the older ATmega4809 which is pin compatible, and their performance was indistinguishable. The program only uses about 1500 bytes, so an ATmega809, ATmega1609, or ATmega3209 should be fine
It would be fun to redesign this board for the lowest manufacturing cost with machine assembly and compare it to how much more expensive it would be to use discrete logic chips.
Otherwise, why use one chip when you can use none? This could all be little virtual switches in a web app.
Because you're actually designing a hardware product to sell.
Whereas less destruction of electronics -> more faithful "experimenting with and learning about logic" as per the device's purpose.
edit: one exception is using the venerable 555, but while it's a discreet component it's not a gate.
PS. Guys HTTPS please!
The whole video is great, but particularly this: https://www.youtube.com/watch?v=_BNIkw4Ao9w&t=1063s
https://doesmysiteneedhttps.com/
There are a lot of arguments about why, even non-secret data connections need encryption. The first and most obvious is that not doing so immediately puts a target on the encrypted data.
By no means an expert but to me it seems like an oversight not to.