Equivalent circuit of an Arduino ATM328 digital input pin?

Aug 03, 2020 4 Replies

My first Arduino project (using an ATMega 328) is triggered by a roughly 5V to 0V edge and works fine overall. (It sends a series of servo arm movements.) But I'm still playing with various simple front end circuits to deliver that edge.



I'd like to simulatie these. What would be the simplest way to represent a digital input pin of the 328 please? And with the built in PULL-UP option?



Terry


For SPICE purposes, a CMOS input is an open circuit with a couple of pF capacitance to ground. The pullup is specified as a resistance of 20k to 50k (see Section 28 of the datasheet, so use that.

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com

use the circuit in the data sheet.

Jasen.

Thanks Phil, but although I didn't study all of the other pages (294 in total), nowhere did I see the all important clamping diodes?

After further research I settled on this equivalent for my simple (hobbyist) purposes:

formatting link

At the low frequencies in my stuff, I've ignored the couple of pF. I expect my breadboards introduce more than that.

Terry

figure 13.1

sounds good to me.

Jasen.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required