Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Where did you learn modular electronics?
222 points by BrandoElFollito on April 25, 2018 | hide | past | favorite | 67 comments
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.




Hobbyist here. I recommend...

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...


In practice, you'll find that the "discrete components" (official term for the miscellaneous things that aren't ICs) are also making up modules - that is, they're used as parts of standard recognisable sub-systems to perform a particular function. Such as "decoupling capacitor", "termination resistor", "common emitter amplifier", "pi filter" and so on.

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.


Respectfully, Art Of Electronics is not a great choice for OP. AOE is a deep dive with a fast, steep learning curve and while appropriate for a serious student (EE?) I would argue it's not appropriate for someone who has no fundamentals and wants to learn to glue major components together. OP needs to learn practical fundamentals in a hands-on fashion -- debouncing a switch or a purpose of a pull-down/up resistor (and how to calculate values), converting signal levels, etc.

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.


Try instead Practical Electronics for Inventors, which is approachable if you remember Pre-Calculus. It covers a lot of basic stuff, explains how all the different parts work, and is a wonderful reference for someone who just wants to build some basic stuff. We had a copy of it in our Physics electronics lab next to AOE and as undergraduates we were more likely to reach for it than for AOE.

https://www.amazon.com/Practical-Electronics-Inventors-Fourt...


The Art of Electronics is a great reference guide and there is also a workbook(https://www.amazon.com/Learning-Art-Electronics-Hands-Course...) and student guide (https://www.amazon.com/Art-Electronics-Student-Manual/dp/052...) that you can buy as a companion books. It can be dense at times though.


That was the book for my first electronics class in college and I found it awesome. I still reference it when doing hobby projects or the random time I get to work with electronics at work.

The workbook is definitely worth it to help make the book more concrete


To add onto this, if you want to quickly see many visual example explanations for these things, go to Google image search and choose type = Animated to get instant visualizations of the processes going on/principles demonstrated


There's not a huge difference between modular electronics and plain old electronics. When you dig into it a bit you still need to understand the same sort of stuff.

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.


Did a search just to make sure this book is mentioned. It's a treasure of just-enough-of-everything to help you understand basic electronics and protocols, as well as little gotchas and things to look out for. I highly recommend it.


It's really a great book, but as a warning that got me if you're more of a paperback fan: it's GIGANTIC. I bought it planning to read it on the train to work. It never even occurred to me that the thumbnail might be hiding its true size ;)


In addition to what others have suggested, Adafruit and Sparkfun both have loads of tutorials. Even if you're not using their parts their documentation is still some of the best if you're using a similar part.

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.


> In addition to what others have suggested, Adafruit and Sparkfun both have loads of tutorials. Even if you're not using their parts their documentation is still some of the best if you're using a similar part.

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


I particularly recommend Adafruit for dev boards, because their tutorials are just so good, and they have one for pretty much everything they make.


I have mixed feelings. Their tutorials and selection are great, but their markup is pretty obscene on some parts and their libraries are often over-complicated/take up a ton of space. I try and support them and buy parts from them occasionally because I love what they do, but it's hard to justify getting more stuff from them price wise and I don't generally like using their code.

But for someone just getting started? Absolutely, you'll have a pretty seamless experience.


I think what you are asking is about just learning basic electronics and the digital protocols that connect different "modules" (and what kind of extra circuitry they need). For most consumer stuff (i.e. if you are not working on cars or industrial robots) you can get a lot done with just knowing about these three protocols:

- 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.


As a kid, I had a "toy" from Radio Shack called "101 Electronic Kit" or something-or-other-name that had different electronic components (resistors, lights, caps, etc) that were mounted onto a surface with spring like mounts for attaching supplied wired leads to connect to the circuits. Very similar to something I just found on RobotShop.com [0] Glad to see someone is still making something similar. I made my first transistor radio on one of these. It came with a manual with different projects that could be made, and as a 10 year old, I would just follow along. Eventually, things start to make sense, and I started to deviate from the manual to make my own circuits. By the time I got old enough in school to take classes that taught electronic principles, I was surprised by how much I knew from just tinkering even if I didn't really understand the principles until these classes.

My favorite recommendation is to find a project that you want to make that can be found online. If someone else makes it and it works, but it doesn't work when you make it then something in the build went wrong, not the design. If you start from scratch with a design and a build, when something doesn't work, you're not sure if it's just the build or in the design itself. Once you see how other people are building things, it will help guide in your future designs. I've learned quite a few "tricks" from other dev's projects. How to put multiple analog buttons onto a single pin is one of my favorite low-tech solves.

[0]:https://www.robotshop.com/en/elenco-mx-907-200-in-1-electron...


I had one of those too, and kinda hated the things. Oh sure, I loved having one and thought it was really cool. But the manual was just pages and pages of "To do this simple circuit, connect these 200 wires to these terminal pairs" (followed by an endless list of numbers). Kinda just a frustrating for a kid as those old programming books that expected you to type in, verbatim, an opaque code listing in something like BASIC.


I guess this is another example of how weird I am, or at least an example of how different people learn differently. Since the kits "worked" when wired correctly, it allowed me to question/learn what was going on to make it work. I doubt I even made it through through all of the projects in the manual. Instead, it showed me it was pretty safe to just start playing/experimenting. That's what I loved about it. The main thing I learned with it is that 3.3v, 5v, 6v, 9v is not going to hurt me. I even learned that when you do send to much current through something and it broke, I could replace the damaged component with something else from Radio Shack. On my own with out having to take it to be repaired. This was huge for me. This kit properly started me down the path of a hacker/tinkerer.

As for the programming in BASIC the long chunks of DATA hex was confusing, but also made me very curious about what was hidden in that hex (even though I had no idea of the word hex). It might have bee frustrating, but it was a crucial learning step in efficient ways to debug typos.

Going down memory lane, in the back of I think Byte magazine, they would have a program's BASIC code printed out in the back (usually a game or Turkey In The Straw type of things). A friend of mine had a C64, and we would buddy program the code. As a kid, we would make all sorts of typos, and it would become mindnumbing debugging all of that hex in the DATA sections. One of us would hunt-and-peck type the code in while the other would compare the page to the screen. We were finding typos in realtime. When we got to the DATA sections, one would read the hex while the other typed. Doing this, we brought our errors down significantly. Which meant we were playing the game much faster.


Still in progress, but I'm writing https://www.circuitlab.com/textbook/ (an electronics book with schematics & simulations built in) which will get into some the details mentioned.

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.


You might appreciate a deep dive approach. Rheingoldheavy did a tremendous exploration into the underlying circuitry of an Arduino Uno [1]

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...


There was quite a good thread about self learning electronics recently: https://news.ycombinator.com/item?id=16775744


Great thread, lots of good links!


If the modules are made by good manufacturers, then they'll have datasheets that have ample explanation of how to use the module. The easier the manufacturer makes it to use their device, the more likely someone's going to buy it afterall.

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.


I recently bought an stm32 board to start learning and found the datasheet to be complete gobble-de-gook. I have a feeling there is a lot fundamentals I need to learn before the sheet starts to make sense.


True. There are several companies that are infamous for how terrible their datasheets are. Especially as a hobbyist it can be important to pick companies that provide good documentation because you don't have the leverage of saying you work for a large company that's going to buy 1000s of their parts.

Asking questions on the manufacturer's forum is useful to because you can typically get an application engineer to respond.


STM's documentation is a bit of a mess. I wouldn't recommend it for a beginner unless you're piggybacking off a development board that uses an STM32 core. This way you can learn snippets of ARM code, but leverage an easier to use framework.

Have a look at Atmel/Microchip's AVR documentation, it's worlds better. That plus avrlibc and a few tutorials and you're golden.


There is a lot of "noise" in the datasheet that you wont have to pay much mind to. There are usually examples of circuits buried in there along with pinouts. You can ignore a lot of it if you are doing hobby-level work.


I would recommend starting with some simple discrete logic devices such a 555 timer chip. Learn how to read its spec sheet. Connect it to an LED. Then move on to something more complicated like using the 555 to drive a counter which in turn counts on multiple leds, etc. These circuits are simple and probably nothing you have a practical need for. But they will get you familier with reading data sheets and basic components.

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.


It is unavoidable, you must learn some basic theory. A gentle introduction is found in this book: "Make: Electronics: Learning Through Discovery, 2nd Edition" by Charles Platt


While "The Art of Electronics" is often refered to, you won't need the deep analysis that's in there for simple toy projects. What I've used in the past (and even translated into Romanian) is "Lessons In Electric Circuits" by Tony R. Kuphaldt [1] (completely free). The nice thing about it is that it's practical. You have a lot of nice examples that you can try out with a breadboard and a couple of basic components. The content is not math-intensive but rather focused on understanding the basic principles. If you understand what's in there, then sure, go on and read "The Art of Electronics" and build all the electronics that you can think of.

[1] https://www.ibiblio.org/kuphaldt/electricCircuits/


Personally, I think the Forrest Mims books are THE best place to learn about circuits from zero. I read them when I was a kid, and still refer to them regularly. I especially like the combination of metaphors & drawings he uses to explain some of the concepts. He explains what's actually happening at the electron level, and provides helpful mental abstractions on top of that.

http://www.forrestmims.com/

All of his books are great, but "Getting Started with Electronics" is the best IMO.


I learned electrical and electronic fundamentals on the job working for a film industry supplier in Toronto. I'm kind of in the opposite spot— I'm just getting into modular electronics as part of my path to learning embedded engineering.

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


Lifted from my comment in the earlier discussion...

https://www.reddit.com/r/AskElectronics/wiki/beginners


I work at a university and am working towards an M-Eng part time. I somewhat stumbled into a rapid prototyping class this semester after discovering that I needed to spend this semester and summer studying the advanced maths I never learned as an undergrad in order to take the ML/AI classes that my degree will mostly consist of.

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.)


There are people with MS who are not the sharpest tools in the shed. Though yes, I agree it is CYA.


Try look for local FabLab or Maker/Hacker Space. People in there are usually willing to share their knowledge or they are even organizing some courses on that topic.

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.



Seconded. Used to get these from Radio Shack back in the day.


I recommend getting into Ham Radio. Certainly in the UK the three exams will give you a great introduction to electronics with a practical way to understand the principles. Even if you don't fancy getting on the bands, it would be a inexpensive way to get some standing.


As an ex EE who just did my intermediate, I’m not sure that it’s a good start. I’d suggest approaching The Art if Electronics and go from there. Even the full license material is quite basic.

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.


The issue with the AoE is the lack of practice problems and references when questions arise. For instance it's MOS and BJT parts glaze over how multi-stage amplifiers chain together and how the choice of one can effect the later (e.g. how your buffer effects source-follower).

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.


That is in there. See p79/80 in 3e for example of impedance relationships. Also lots of practical examples in the companion book "Learning the Art of Electronics"

I've had all editions of this including the first and it's definitely in there!


I thought the advanced covered a fair amount, basics of transistors, understanding decibels etc.

Everyone is different however and it may indeed not be the right course for everyone.


To be honest most of that is in the intermediate. The full covers basic AC circuits and minimal BJT amplifier structure and that's about it.


When I got my Advance licence there was definitely more to it than that I was sure.


How long ago was that? It's been dumbed down since about 2009 for sure.


I did it last year. This looks like the same syllabus I took. https://thersgb.org/services/education/downloads/pdf/advance...


Ah ok. I better go do some more revision then :D


73's M0XHT


Someone mentioned The Art of Electronics, can't recommend this highly enough, it's accessible and teaches you what you need to know to glue modules together and even build some of your own. A classic.


Assuming your "modules" are discrete components and some op amp ICs, audio circuits (things that generate or modify waveforms) are really good for building intuition:

- Relevant frequencies are low enough so you can breadboard circuits, use cheap components etc.

- You can hear what everything is doing, so it's intuitive and you don't need test equipment

- There are plenty of tutorials, because musicians have been doing this crap for decades

For example, you can build a simple "wah-wah pedal" or low pass/high pass filters, swap in different components, and hear what happens.


I learned when my stereo broke as a teenager and my dad worked with me to rebuild it. Radio Shack was my best friend back then and I would order in different parts. Took 2 months to get it working and it sounded awesome.

If I had access to YouTube and the DIY community today it would have been so much easier.


The simplest modules I’ve seen are from Grove. The grove compatible modules don’t need you to dabble with any resistors and capacitors.

Once 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.


Considering that the OP wants to abstract the details away from the connection between the sensor and the Fill_In_The_Blank module the single most comprehensive resource that I have been using to teach myself embedded linux are the books by Derek Molloy.Look them up on Amazon.they are cheap and get you going in no time. His companion book sites are treasure trove of information too. He has a book on RPi and Beaglebone black.


I really loved this one:

Paul Scherz & Dr. Simon Monk's "Practical Electronics for Inventors, Fourth Edition" [1]

[1]: https://www.amazon.com/Practical-Electronics-Inventors-Fourt...


It’s not as “modular” as you might expect if you come from software like me, you might think of each component as a “consumer” and a “producer”. You mentioned a capacitor, check out LRC circuits. When you put certain components together they act in non-linear ways that can be described using differential equations.


I learned by working at a contract manufacturer who also does engineering design of small device electronics (as an embedded engineer). I also have a copy of The Art of Electronics but I can't say that I've looked at it much.


When you need to connect something specific, I can recommend checking http://www.pighixxx.net/ It helped me quite a bit in the past.


"the weird resistor, capacitor and whatnot which is plugged beyween, say, the arduino and the sensor" have to do with device termination and impedance matching so maybe that is a place to start.


I am about to launch a site called Electronics Club, which is exactly designed for this with videos and examples. It is pitched at children but will suit anyone learning electronics.


I recommend Teach Yourself Electricity and Electronics [Stan Gibilisco]


I recommend Youtube, look for AvE and GreatScott


I recommend Youtube, look up AvE and GreatScott


tl;dr version: Trying to learn electronics at the module level will give you about as much knowledge about electronics as someone who points to their monitor and says 'this CPU doesn't work!' has about computers. As long as the instructions/tutorials get everything working, you're good. But as soon as things go even slightly off-script, you'll be lost and have no idea how to troubleshoot things.

The issue is not the modules, but the underlying electronic components themselves. I started back as a wee lad with one of those 150-in-one kits and it was a great way to learn as a kid. From there I moved on to the various 'cookbooks'. Then I was able to follow projects in magazines etc. All doable over the course of a year or two depending on how motivated you are.

If I were starting from scratch today, I'd probably use an Arduino and follow some basic circuit tutorials online. (i.e. wire up breadboard circuits to the Arduino using it for power, digital input/output, ADC etc) If you only want to do digital electronics (i.e. true/false logic input/output), you can get by without too much analog knowledge (i.e. reservoir and noise filtering capacitors, using resistors to tie lines high/low etc.) but as soon as you want to interact with the real world (i.e. driving banks of LEDs, temperature and other sensors, motor control, etc) you really, REALLY, need to learn about analog circuits. No need to become an expert, but you want to get the basics down so you have an idea what's going on when things go wrong (and they will!)

It shouldn't take too long but you need to get below the modules and focus on the individual components (i.e. the basics of voltage/current, resistors, capacitors, inductors, diodes, transistors, amplifiers and then move on to ICs and modules etc. and not just what they are/do but get some basic knowledge about how to measure and troubleshoot issues with them) to understand at least conceptually what things are doing at the component level. Then those modules won't seem like such a mystery when problems arise.


Take a look at The Art of Electronics if you were after a textbook. It is a little expensive, but is written beautifully


Reading this thread I realized that somewhere in the past few decades people stopped referring to books by their authors*. I'd never heard of "The Art of Electronics" but of course I am very familiar with "Horowitz & Hill"!

Or sometimes the picture on the cover or the color ("The Dragon Book" or "The Yellow Book").


TBH, that is a pretty meaty book not well suited to the beginner. It is nice though!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: