Ask HN: How to learn small electronics and HW interfacing?

20 points by paultopia ↗ HN
I, probably like many of the people who read HN, am satisfactorily competent at slinging code but have absolutely no clue how to make that code talk to the physical world. Like, suppose I wanted to attach a motion sensor to something: unless the sensor comes with a USB cable and a well-documented Python API, I'd be out of luck.

HN, what are your recommendations for strategies, books, projects, etc. to learn this stuff?

9 comments

[ 3.1 ms ] story [ 29.0 ms ] thread
Go get you one of the cheap Arduino clones (or several!) and a starter kit with sensors and lights to play with. The Arduino Mega clones at $15 or less are worth keeping a few in stock; and you'll never worry about burning one out or leaving a thing assembled for a while to blink its light because its fun.

https://www.adafruit.com/ is a good place to go for information, parts, and excellent service.

h20dragon mentioned https://adafruit.com. Just comb through the info and tutorials on this site and grab yourself a basic Arduino kit and get started.
I'm just getting started with arduino. This is the tutorial I followed for my first project. Pick something that interests you and find a tutorial.

https://www.reddit.com/r/PUBATTLEGROUNDS/comments/9q4rph/hea...

Other projects that are in the queue:

Similar to the first but with a sensor on the headset- https://www.hackster.io/news/easily-add-head-tracking-for-an...

Overhead Garage Door status indicator lights- https://www.instructables.com/id/Yet-Another-Garage-Door-Sta...

Roomba Virtual Wall- https://github.com/MKme/Roomba/blob/master/Arduino%20Code/Ro...

You don't need lots of parts and most are inexpensive, for the soldering gun and holder I got those at harbor freight, I order all the other parts off amazon. I did buy one of elecrontics part kits with lots of small components and a few breadboards.

(comment deleted)
Documentations on Sparkfun is also very useful.
As others have stated, start with an Arduino. Have fun.

But I would recommend as a next step is to find a component that is more complex than an LED or Switch and with relatively good Arduino libraries (e.g., a 2x16 LCD screen) and try to write your own driver for it (e.g., a library that does all of the handling of the IO pins), using the data sheet of the component to figure out how to use the IO pins. Feel free to look at the Arduino library source code (or libraries for other languages).

I have done the same, using Rust and a Feather M0[1] and am now finding it easier to look at the datasheet of the more complicated ATSAMD21[2] microprocessor.

1. https://www.adafruit.com/product/2772

2. https://www.microchip.com/wwwproducts/en/ATsamd21g18

At age 62 (18 months ago) I took a 1 day “ham cram” and got my technician license, and bought a couple of $25 vhf/uhf walk-in talkies. And played with homemade antennas for a while.

A year ago I enrolled in my local community college’s Electronics 101 course, which meant resistors, voltage, current, capacitors, and inductors. And voltmeters and power supplies.

Six months ago I took Elec 102, which are transformers, diodes, AC to DC rectification, transformers, and, voila, transistors.

Next step: microcontrollers, sensors, and relays.

Future: relearn imaginary exponents and Euler.

It’s a _big_ field!