Data with Bert logo

An LLM Saved My ATtiny85 From Certain Death

I almost ordered parts for a circuit that would have destroyed itself the instant I powered it on.

Instead, an LLM caught the critical flaw in my design, saving me time and money.

While I regularly see value in using LLMs in my coding projects, this is the first time I have seen real-world benefits when applying it to a hardware project.

Challenges with Electronics Components Shopping

I struggle with choosing electrical components from online catalogs. Knowing exactly which one of the 59,301 resistors I need for my project is always confusing:

Screenshot of hte Mouser website, showing the 59,301 wirewound through hole resistors I can buy for my project

In theory I understand most of the individual variables that can help me filter down my selection, but in practice I find doing this for all the parts in a project to be overwhelming. Ensuring each component will work correctly with the others, as well as substituting parts when they are out of stock or don't match the exact specs I need, is exhausting.

Fortunately, most of the parts I deal with are pretty inexpensive, so I often will buy several similar parts and then just try them in my circuit one by one, seeing which ones go up in smoke and which ones don't. As a hobbyist, this is more fun for me than spending hours reading datasheets.

However, this process breaks down when I completely mis-spec a component or outright forget to include one in my initial order. In those cases, I end up having to make a second order, often paying more for shipping than the cost of the additional components. It also means I have to wait another week for delivery (or longer if I'm ordering from China) before I can continue working on my project.

My Mistake

Not knowing what you don't know is one of the hardest problems to solve.

For my project, I need to be able to turn a motor on and off with a microcontroller.

Checking the datasheet for the ATtiny85 I am using in my project, I see that it allows for a maximum current of 40mA per I/O pin:

Datasheet for hte ATtiny85

The motor I'm wiring on the other hand pulls 75mA with a startup current of 105mA:

Datasheet for the motor showing higher current draw than the microcontroller can support

I missed these details when adding components to my cart because, as I mentioned before, my eyes were going blurry from comparing all these different components and datasheets.

If wiring the motor to the microcontroller wouldn't fry it instantly, it would certainly shorten the lifespan of the microcontroller.

LLMs as a Second Set of Eyes

Fortunately, before I clicked the "Buy" button, I decided to copy and paste my cart of components into ChatGPT, Claude, and Gemini to see if they could identify any errors:

Gemini telling me I forgot a transistor All three LLMs caught the error, but Gemini had the cleanest output.

I made a mistake and Gemini reminded me, saving me a few bucks and a week of waiting for more components to be delivered.

Conclusion

Do I trust everything LLMs output? No. I've used them enough in software projects to know when they are wrong or output something differently from how I want to build it.

However, as a novice in electronics, I found the LLM to be extremely helpful in double checking my circuit design work.

Hopefully I learn through this experience and have better luck in the future, but from now on I'll always run my cart of parts through the LLM to double check my selections.