Ask HN: Where did you learn modular electronics?
I like to build simple IoT devices and code around them. While I am comfortable with the dev part, I have problems to understand the electronics.
This is why I started with modules (arduino, nodemcu, sensors, audio amplificators) but there are issues the weird resistor, capacitor and whatnot which is plugged beyween, say, the arduino and the sensor.
Is there a place I could learn this "modular" electronics, where I could find "cookbook" advices on these elements needed for the modules to work correctly?
Since this is the way I lend to develop (take a problem, look at the solution and understand the details on the go) I would love to get into electronics via this path, if possible.
69 comments
[ 4.9 ms ] story [ 142 ms ] threadOnce you go beyond the pieces provided by them and you try adding your own, you’ll inevitably have to deal with the electronics bit. Learning the basics is easy and shouldn’t take more than a month. I’m afraid I don’t have a ready resource to recommend for that. I believe there is a good MOOC course on edX to learn the basics. I’ll see if I can find the link and update this comment.
A book by Ashby called Electrical Engineering 101 is helpful.
There's just so many good books, and videos.
Either way, it's mandatory to understand electronics essentials (Ohm's law, Kirhoff's laws etc.) Try to find some electronics schoolbooks (I can provide something in czech only). After understanding basics, you can start with buses and digital communications (because digital is actually two level analog, right?)
Anyway, good luck.
I highly recommend gaining an understanding of the fundamentals of electricity, then something about how those various parts play a role in a given circuit.
If you want a bit of a playground, you should try out Tinkercad. Just sign up, set up a new Circuit and you have all of those parts at your disposal. It might help to toy around with parts there while you follow along any tutorials or reading some basics.
For instance, try changing the resistor value in this circuit and watch what happens to the LED when it's on:
https://www.tinkercad.com/things/hmBoHhmong2-bodacious-krunk...
(hint: Try setting it lower, to say 1Ω from the default 440Ω. Then try setting it much higher like 10kΩ and see what happens.)
Also this gives a really brief breakdown of some essential knowledge:
http://www.ia470.com/primer/electric.htm
- UART: https://en.wikipedia.org/wiki/Uart
- SPI: https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bu...
- I2C (sometimes called TWI - two wire interface): https://en.wikipedia.org/wiki/I%C2%B2C
For more links for learning electronics check out my list of resources: https://github.com/monostable/awesome-electronics.
Or sometimes the picture on the cover or the color ("The Dragon Book" or "The Yellow Book").
I would recommend getting an M-Eng part time if your employer allows it. Yes, this suggestion punctures the idealistic narrative of the self-taught hacker that we are all supposed to romanticize on HN, but nobody can argue that I am receiving anything less than a world class education.
In addition - and this is the part that is supposed to make HN snarl and gnash it’s teeth - when a hiring decision comes down to the self-taught hobbyist and the graduate of a prestigious university, CYA protocol dictates that you hire the graduate. If the hire fails, it’s better to shrug your shoulders and say “They have a masters degree from a major university, how was I supposed to know it wouldn’t work out?” Rather than “I know I took a risk hiring the self-taught developer. The company has suffered because of my risky decision.”
Office politics make the world go round.
(Keep in mind, I am not trying to discourage self-education. In the tech industry we all have to continually teach ourselves. But sometimes it is best to be taught by professionals. It is their job after all.)
Practical Electronics for Inventors is a really good book to get started with this sort of stuff: https://www.amazon.co.uk/Practical-Electronics-Inventors-Fou...
Once you realise that under the modules there's the same MOSFET input stages, MOSFET output stages, diodes and voltages that you get in discrete electronics, it all becomes pretty clear how to make things talk and interact.
Books:
- Simon Monk's Electronics Cookbook [1]
- Michael Margolis' Arduino Cookbook [2]
Youtube:
- GreatScott's Basics Playlist [3]
The concepts in those two books are useful for interfacing with any microcontroller, including NodeMCU and STM32s.
[1]: https://www.amazon.com/Electronics-Cookbook-Practical-Electr...
[2]: https://www.amazon.com/Arduino-Cookbook-2nd-Michael-Margolis...
[3]: https://www.youtube.com/watch?v=woTiKij76cA&list=PLAROrg3NQn...
I don't think you can really "cookbook" without knowing any theory, but the amount of theory you need is fairly small and you don't necessarily need all the maths.
"The Art Of Electronics" is the standard book to refer people to.
The workbook is definitely worth it to help make the book more concrete
We forget how steep the learning curve can be and how likely it is to turn students away when every page is a baffling struggle focused on topics with purposes which are not germane / not clearly related to the learner's wants. AOE is the equivalent of a music theory book for someone who wants to play "happy birthday." Or Knuth's series for a beginning coder.
https://www.amazon.com/Practical-Electronics-Inventors-Fourt...
http://www.forrestmims.com/
All of his books are great, but "Getting Started with Electronics" is the best IMO.
Honestly I’m not a fan of the modular approach to learning using Arduino blobs stuck together. There are many gotchas. A bottom up understanding is far more valuable and satisfying to boot.
Everyone is different however and it may indeed not be the right course for everyone.
Theory is good, but seeing how the implementation works is just as important and the AoE can glance over that because it's a sort of book of everything.
In short, it's a great reference manual and I have to sasy it's my favourite thing to start any question I have with, but for a beginner they need something that allows them to practice not just read about it.
I've had all editions of this including the first and it's definitely in there!
https://www.reddit.com/r/AskElectronics/wiki/beginners
I would also check out Chris Gammel's Contextual Electronics [2] as a semi-formal training course. It's also an opportunity to make connections with other EE's you can ping when you get "stuck"
Finally, invest in your tools! Get yourself a decent multimeter- if you aren't sure where to start, Dave Jones' EEVBlog [3] will provide more commentary than you expected. Having a good oscilloscope and logic analyzer also makes worlds of difference when you're troubleshooting a circuit. Digilent's Analog Discovery 2 [4] is a great get-you-started instrument.
[1]: https://rheingoldheavy.com/build-an-arduino-uno-from-scratch...
[2]: https://contextualelectronics.com/
[3]: https://www.youtube.com/watch?v=xdGQEVdxmQQ&t=414s
[4]: https://store.digilentinc.com/analog-discovery-2-100msps-usb...
It's still harder than programming because electronics doesn't have any comments or variable names and runs all at once like a massively parallel piece of software. In many cases it takes a lot of experience and pattern matching to engineer or reverse-engineer why that capacitor is that size and goes there.
On the other hand, if you learn a handful of concepts really well, that'll probably get you 50% of the way there: Thevenin equivalents, input/output impedance, low-pass/high-pass filters, voltage dividers, level shifting, how to use MOSFETs and BJTs as switches...
I'd also recommend https://electronics.stackexchange.com/ -- a double-digit share of questions are of the type OP describes.
Look through the datasheet and there should be several example application circuits. The datasheet will usually include descriptions about each pin of the module. If you need to use external components to "set" the pins of the module in some way, the datasheet will usually have some equations about how to calculate the correct value and maybe an explanation of where that equation came from. It'll also list maximum, minimum, and typical drive(voltage or current) levels for the pins. When you see the datasheet mention a term you don't know, spend a few minutes looking it up. A few used to describe module pins that jump to mind are "open drain" and "open collector" - those terms tell you a lot about what components you might want to add externally to the pin.
Make sure you understand Ohm's law and the concept of a pull-up or pull-down resistor and when to use them. Also, what a decoupling capacitor does. When you see a capacitor tied to a module pin, can you tell if it's acting like a filter or a charge reservoir.
Keep playing around with it and you'll eventually build up a lot of knowledge and intuition about how to connect everything. And other people have mentioned a lot of great books to use as resources as well.
Asking questions on the manufacturer's forum is useful to because you can typically get an application engineer to respond.
Have a look at Atmel/Microchip's AVR documentation, it's worlds better. That plus avrlibc and a few tutorials and you're golden.
Later jump in to microcrontrollers.
I used to teach a class called Electronics for Artists at a local maker space. This process worked well for that.
Good way to get started is to pick up one of their beginner kits and follow through, they are meticulously documented.
https://learn.adafruit.com
https://learn.sparkfun.com
There's also some really high quality material on YouTube for a variety of skill levels, I'd especially recommend these two channels:
https://www.youtube.com/channel/UC6mIxFTvXkWQVEHPsEdflzQ
https://www.youtube.com/channel/UCu7_D0o48KbfhpEohoP7YSQ
Scroll through their videos and you will find a lot on the sort of things you are asking about.
If, however, you are not using their parts pay particular attention to voltages.
For example suppose you are playing around with a range finding module that uses one of ST Microelectronics' nifty time-of-flight IR laser rangefinder chips. These are 2.8 V chips and are not 3.3 V or 5 V tolerant.
Adafruit has modules for two of them, a short range one [1] and a longer range one [2]. The Adafruit modules add a 2.8 V regulator and level shifters so you can hook them right up to your 3.3 V or 5 V system with no additional components.
Sparkfun has two modules for the shorter range one [3] [4]. The first of those, which is about the same price as the Adafruit module, does NOT provide a regulator or level shifters. The second Sparkfun module, which is about $10 more, does provide a regulator and level shifting.
If you are following the Adafruit tutorials, which hook the module directly up to an Arduino, but you are using the first Sparkfun module and just hook it directly up you are probably going to fry your module.
[1] https://www.adafruit.com/product/3316
[2] https://www.adafruit.com/product/3317
[3] https://www.sparkfun.com/products/12784
[4] https://www.sparkfun.com/products/12785
But for someone just getting started? Absolutely, you'll have a pretty seamless experience.