Ask HN: What is the best way to learn how to build your own hardware?

15 points by tim-- ↗ HN
For the last few years, I have really had a strong urge to build a smart device. Basically, a mixture of a Google Home, with a light that can remotely change colours.

The thing is, I don't really know where to start when it comes to actually building a device that would be able to do this.

Does anyone have any recommendations on the best way for me to start this journey? Any books, YouTube videos or websites that might guide me on the right path?

13 comments

[ 5.2 ms ] story [ 47.3 ms ] thread
Ok, I’ll go for the bait. How does this help OP in his goal to learn how to build devices like this?
it wasn't clear (at least to me) that he was interested in learning over having the device
It's literally the title: "Ask HN: What is the best way to learn how to build your own hardware" ...
Yes, it is possible for me to make mistakes.
> 1st step is to make sure it already doesn't exist.

Yeah, but then I don't learn how to build the device that I would really like to build at home, right? Just because something already exists; doesn't mean that other people should not attempt to recreate it.

Also, there is not any 'all-in-one' device that fits exactly what I want in the links that you sent.

I would start with Arduino. It's the most common platform for this type of thing. There are plenty of online resources. Adafruit is a good combined resource and store. At minimum, you'll need:

The lights: maybe this is a good start https://www.adafruit.com/product/1461

An Arduino: https://www.adafruit.com/product/3345

A wifi or ethernet shield (a shield stacks on the Arduino board and add a function): https://www.adafruit.com/product/2971

A power supply: https://www.adafruit.com/product/658

You may also want a soldering iron and a nice case if this is a permanent project.

You could start with a raspberry pi, which will have a lower investment, but the Arduino's simplicity is great for learning.

Check out hackaday.com, there are lots of great examples of all sorts of hardware projects on there! Some are definitely similar to the level of functionality you are looking at.
As you learn, keep your focus on this project/idea you'd like to build. Use tutorials and examples only to help you get to this goal; take detour as required. I think this approach will be easier to stay motivated with, than doing tutorials start-finish.

ESP32 is a popular MCU that connects to WIFI, and has cheap dev boards: I recommend you find a tutorial for this MCU to start with. A downside, is that its official docs are lacking compared to other MCUs, like the STM32.

Once you have something working using a dev board, learn PCB design software; a nice free one is KiCad. JLCPCB is a cheap, fast service that will create your PCB, and solder the smaller components on to it. You will have to hand solder the bigger ones.

Programming languages suitable for this are C, C++, and Rust. Are you proficient in at least one of them?

I am slowly getting the hang of Rust, and am somewhat proficient in C++ and C.
Depends on how much of the process you'd like to do! If you want to build the actual PCBs, I'd suggest starting by learning how to blink a single LED on a PCB. I have two video series that teach that:

* Shine on you crazy KiCad - Blink an LED using a RPi https://contextualelectronics.com/courses/shine-on-you-crazy...

* Getting To Blinky - Blink an LED using a 555 https://contextualelectronics.com/gtb

Both of those series will teach you how to use KiCad, which is open source and always improving.

From there, you can learn how to design in an ESP32 or similar module. Or if you'd like, there are some other courses on the CE site that show you how to build other devices.

As the other comments alude to, you'll need to dive into firmware and higher level software on the web side of things. I always recommend adafruit and sparkfun boards and tutorials to get started with that quickly. Building off of a known dev board is a good way to make sure you're actually making progress and not just troubleshooting your own hardware. Both of those companies create open source hardware, so you can take the files and use those as a reference or even as a starter project for whatever you want to build.

Chris! Thanks for introducing me to Contextual Electronics! This looks like a resource that fits the bill for what I was looking for almost exactly.

> you'll need to dive into firmware and higher level software on the web side of things

I was expecting that, and it isn't something I'm too afraid of getting my hands into. I am thinking maybe something a little beefier then the ESP32 (like a STM32, specifically the STM32MP157A) so that I have a little more room to play with. I think the ESP32 won't have enough RAM for what I really want the device to do.

Great! Glad I could help! It's my course, in case that wasn't clear. Should have probably stated as much, but hopefully it's still what you're looking for. The free courses (the two linked above) are more than enough to get people started on KiCad and the other course resources are only if people want to keep following along.

ESP32 is QUITE beefy, actually (and power hungry). But the STM32MP series is nice too, that's a newer offering. I think it comes down to how you'd prefer to develop code, especially at the beginning. If you're looking for an Arduino type solution, you will find a ton of resources for the ESP32. As for RAM, I interviewed a guy on my podcast (Mike Fikes) who actually put Clojure Script on an ESP32...so it can handle some pretty high level stuff! https://contextualelectronics.com/cep005-clojure-script-on-h...

One thing I always encourage is that people follow the best examples and kits and tutorials they can on the internet. There are LOTS of things that can go wrong, and premature optimization for a production level component can lead to a lot of frustration and diving down the wrong rabbit holes. Best to follow good examples and make mistakes later (ie. I don't know how many examples of STM32WP projects there are on the internet yet)