Simplified equivalent circuit of Arduino input pin?

Thread Starter

Terrypin

Joined Feb 5, 2016
113
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 use Spice simulation to experiment with these, as I do frequently with other electronics projects. What would be the simplest way to represent one of the digital input pins please, say Arduino D7? I’m hoping it can be done with a few simple familiar components.

Terry
 

eetech00

Joined Jun 8, 2013
3,856
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 use Spice simulation to experiment with these, as I do frequently with other electronics projects. What would be the simplest way to represent one of the digital input pins please, say Arduino D7? I’m hoping it can be done with a few simple familiar components.

Terry
You mean like this?

1596483462313.png
 

Thread Starter

Terrypin

Joined Feb 5, 2016
113
Thanks, but isn't that an output pin?

That apart, as a hobbyist new to Arduino and with no microcontroller experience, I’m technically way behind you on this stuff. I’ll study your schematic more thoroughly in the morning to figure out what you’re showing me. And I’ll try to explain more clearly what my input looks like.


two resistors and a transistor is too complicated?
you can use gate level mosfet
Not sure I follow you, but that may be because I’m unfamiliar with the thread structure here. Assuming you are referring to Eric’s extract from the data sheet, I see one resistor, one cap, two diodes, and a MOSFET.

As mentioned, this is my first Arduino project!
 
Last edited:

panic mode

Joined Oct 10, 2011
2,715
i see, i confused your comment to one of more recent replies which showed an output. my bad...

so capacitor, limiter with two diodes and a resistor would be a decent equivalent load for the input.
mosfet there is acting as a switch and turning on weak pullup resistor. it cane be enabled or disabled by program.
so you don't need to worry about mosfet but need t know if it is on or off to choose resistor. all of this is in the datasheet.
Rin is very large (see input current for the chip) and normally neglected
Rpu is medium (usually tens of kOhm) and considered when turned on.
Cpin is very low and usually neglected

1596491441995.png
 
Last edited:

eetech00

Joined Jun 8, 2013
3,856
Thanks, but isn't that an output pin?
It’s a digital pin and can be an output or an input pin, just like arduino. It can also be a PWM output pin.

That apart, as a hobbyist new to Arduino and with no microcontroller experience, I’m technically way behind you on this stuff. I’ll study your schematic more thoroughly in the morning to figure out what you’re showing me. And I’ll try to explain more clearly what my input looks like.
Not sure I follow you, but that may be because I’m unfamiliar with the thread structure here. Assuming you are referring to Eric’s extract from the data sheet, I see one resistor, one cap, two diodes, and a MOSFET.
Not sure what you are referring to here, but a gpio pin is much more than what is shown in the other posts. The circuit I’ve posted has the ability to simulate the pin behavior during startup and reboot, and a few other features.

I think you need to study the arduino material regarding GPIO ping behaivor.

Anyway, good luck.
 
Top