Ask HN: What is the best way to learn how to build your own hardware?
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 ] threadhttps://www.amazon.com/dp/B07N1CMGQQ/ref=cm_sw_r_cp_apa_i_9-...
Or
https://www.amazon.com/dp/B07LCB3HQJ/ref=cm_sw_r_cp_apa_i_gb...
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.
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.
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?
* 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.
> 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.
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)