Live data from Hacker News

Learning hardware programming as a software engineer

blog.athrunen.dev

41–50 of 50 posts

Re: Learning hardware programming as a software engineer

#41

I can wholeheartedly recommend designing your own PCBs as well. It's a lot of fun, and routing the tracks on the PCB is surprisingly calming.

I am currently designing PCBs for my next post using EasyEDA, anything to pay attention to? I'm especially concerned about the track width and clearance and stuff. For 12V and I think a max of 8A I calculated 2mm width, 0.6mm clearance, 1.5mm via diameter and 0.75mm via drill diameter.

Make sure you have your fab's clearances entered in, I had PCBs come shorted because my clearances were smaller than what the fab could deliver. 2mm sounds too narrow for 8A unless your length will be small, my calculator says 5mm+.

Other than that, it's pretty foolproof, so enjoy the process!

Re: Learning hardware programming as a software engineer

#42

Also, might wanna learn some basic electronics. With very modular devices, it's easy to avoid that - since you're basically building stuff like as with lego bricks, and things are abstracted form you - but if you need / want to build your own sensors, or customized setups, you'll need to know a thing or two about electronics / circuit analysis and design.

Any suggestions for self study?

For books, I’ve read “Make: Electronics”, and “Teach Yourself Electronics”. Both were decent, but I’m current going through MIT’s 6.002 class online to go more in depth.

I would also be interested in some good self study suggestions.

Re: Learning hardware programming as a software engineer

#43
post #35

I don't feel like creating a userid on his website just to tell him this, but one thing he seems to have missed that may have caused some of his problems is that the ESP32 I/O pins are 3V and NOT 5V tolerant. Elsewhere in the article he seems to assume 5V levels (when he's talking about using PWM to output 2.5V from a 5V pin). With an ESP32 or ESP8266 when you need to interface with 5V devices you should use a level…

Thanks for that information, but I learned that the esp32 is not 5V tolerant the hard way. ^^ Will fix the bit about the PWM in a second

That might be something good to mention in the article as something to watch out for. You mention checking the specs, but not that kind of issue with specs.

Re: Learning hardware programming as a software engineer

#44

Also, might wanna learn some basic electronics. With very modular devices, it's easy to avoid that - since you're basically building stuff like as with lego bricks, and things are abstracted form you - but if you need / want to build your own sensors, or customized setups, you'll need to know a thing or two about electronics / circuit analysis and design.

I’ve tried diving into this in my spare time. Where do you start if you have a web dev background?

Learning Arduino might be a good starting point, since they are easy and popular. You'll probably need to learn C, since Arduinos (or the controllers on the Arduino boards) are programmed in C or assembly.

There is a cost for equipment and parts when working with hardware.

Creating effects in the physical world with your code feels awesome. Learning and building physical tech is just awesome all around.

Re: Learning hardware programming as a software engineer

#45

Also, might wanna learn some basic electronics. With very modular devices, it's easy to avoid that - since you're basically building stuff like as with lego bricks, and things are abstracted form you - but if you need / want to build your own sensors, or customized setups, you'll need to know a thing or two about electronics / circuit analysis and design.

Any suggestions for self study?

See this thread for pointers: https://news.ycombinator.com/item?id=21871026

Re: Learning hardware programming as a software engineer

#46

Also, might wanna learn some basic electronics. With very modular devices, it's easy to avoid that - since you're basically building stuff like as with lego bricks, and things are abstracted form you - but if you need / want to build your own sensors, or customized setups, you'll need to know a thing or two about electronics / circuit analysis and design.

I’ve tried diving into this in my spare time. Where do you start if you have a web dev background?

See this thread for pointers: https://news.ycombinator.com/item?id=21871026

Re: Learning hardware programming as a software engineer

#47

I can wholeheartedly recommend designing your own PCBs as well. It's a lot of fun, and routing the tracks on the PCB is surprisingly calming.

I am currently designing PCBs for my next post using EasyEDA, anything to pay attention to? I'm especially concerned about the track width and clearance and stuff. For 12V and I think a max of 8A I calculated 2mm width, 0.6mm clearance, 1.5mm via diameter and 0.75mm via drill diameter.

You can use this for calculating trace widths. I think 2mm is too narrow with 2oz copper and definitely too narrow with 1oz.

https://www.4pcb.com/trace-width-calculator.html

Most PCB houses can handle 8mil (0.2mm) traces and clearance with no problems.

Best thing way to handle vias in high current designs is to avoid them. Run the trace from point A to point B on the same layer. Second way is to use planes for distribution. Other things you can do. Make sure there isn't a thermal relief. Use multiple/arrays of vias.

Re: Learning hardware programming as a software engineer

#48

Earlier quoted context omitted.

> The largest negative ROI over time Why do you have to obfuscate the language so much with technical jargon? Just say 'the costliest mistake'.

Because costliest mistake isn't equivalent, and it isn't nearly as funny like that. Just imagine a whole team of people working on a combination of hardware and software, some of the hardware prototype level floating point gear obtained directly from the manufacturer under NDA (that's non disclosure agreement) and then someone decides to drop a dime into the machine. The dime is the investment, the time it took to ca…

On of my old bosses said he dropped a scope probe and shorted 120VAC onto the 5V bus. On a system with an 8008 emulator (cost $25k) plugged into the processor socket. Smoke poured out of the emulator and the breaker tripped.

Fortunately a heroic 7400 quad nand gate sacrificed itself to save anyone. He said all that was left was the leads sticking out of the PCB.

My cousin hooked up VCC and gnd backwards and blew up a prototype RISC processor. Only a dozen working ones in existence. Please sir may we have another?

Re: Learning hardware programming as a software engineer

#49
https://blog.athrunen.dev/content/images/2019/10/ESP32-Pinou...

Weird, the breakout pin between IO21 and IO19 is silkscreened GND, but the label says NC, not connected. The dev board datasheet[0] says that pin is not connected, which would be a fun trap for someone who tried to use that pin as a ground, but a different schematic on the site says it's tied to module ground. They don't seem to have a PDF of the actual PCB anywhere I can find.

0: https://www.espressif.com/sites/default/files/documentation/...

1: https://dl.espressif.com/dl/schematics/ESP32-Core-Board-V2_s...

Post reply on HN