Go Down

Topic: Electrical impedance of Dout port (Read 3558 times) previous topic - next topic

dr.benway

Hi,
I have a question about the digital out port of Arduino duemilanove board.
What is the electrical impedance of the port?
Thanks in advance.

Giorgio

retrolefty

#1
Nov 28, 2012, 04:59 pm Last Edit: Nov 28, 2012, 05:01 pm by retrolefty Reason: 1
The Atmel mega328p datasheet doesn't list or state an output pin impedance value in it's specification tables. They do however show graphs of pin output voltage Vs pin current draw for both current sinking (output low) and current sourcing (output high) both for 3vdc and 5vdc Vcc conditions and at several device operating tempertures, and the results appear linear. Not sure if those curves gives one the information to calculate a single 'output impedance value' or not.

One classic way I was shown to measure output impedance for a voltage source was to measure it's unloaded voltage and then load the output with an adjustable resistance and lower the resistance until the output voltage reaches 50% of the unloaded voltage, where then the load resistance equals the output impedance of the voltage source. However performing that test measurement would cause a greater current flow then the absolute maximum output pin current specification of 40ma. So in effect that might be a destructive test procedure to try and perform.

Maybe someone else can answer your question in a more straight forward manner?

Lefty

terryking228

#2
Nov 28, 2012, 05:07 pm Last Edit: Nov 28, 2012, 05:18 pm by terryking228 Reason: 1
Hi,
Lefty is right that this is not a typical "Spec item" for a digital output.

What are you trying to accomplish?  What type of load / cable are you considering?

You can find the datasheet here: http://yourduino.com/docs/ATMEGA328DataSheet.pdf  maybe easier than other places.  It's BIG and 555 pages...
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Grumpy_Mike

It is not a constant value it changes with load.

This link is not for the arduino but the Raspberry Pi which has configurable drive impedances, you can use the same sort of measurements I used on this page two work out the impedance at any voltage level. That is your curve might not be linear.
http://www.thebox.myzen.co.uk/Raspberry/Understanding_Outputs.html

However from this experiment I did with the arduino you can see that it is less than 20R.
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

dr.benway

Hi,
thanks for the reply.
I try to use my arduino duemilanove board as signal generator.
I designed a very simple DAC R2R network.

image

But if I connect the digital output of the port to my scope, I read a big oversoot.
Maybe there is a problem of Impedance matching and a square wave with overshoots is useless.  :smiley-roll: :~

Any idea or suggestion?

Thanks in advance.

Giorgio.


dr.benway

If I know the impedence of the port, maybe I can design a matching network.

Grumpy_Mike

Quote
Maybe there is a problem of Impedance matching and a square wave

No.
You only get over shoot with inductances. It is probbly not real, just an artefact of the scope.

Do you mean overshoot or lack of monoticity?  That is not a circuit of a R 2R ladder that I recognise, are you sure it is right?

Grumpy_Mike

Thinking more about it that is NOT a R 2R ladder circuit.

dr.benway

Hi, Grumpy_Mike

Quote
You only get over shoot with inductances. It is probbly not real, just an artefact of the scope.


Yes, I am thinking the same...
this is the (tragic) situation:








So, is real or "ghost"?  :smiley-roll:
Maybe I need to change the sampling frequency ... :smiley-roll-sweat:

dr.benway

#9
Nov 29, 2012, 01:10 am Last Edit: Nov 29, 2012, 01:12 am by dr.benway Reason: 1
Quote
Thinking more about it that is NOT a R 2R ladder circuit.


Isn't a R2R, but the concept is pretty close.
Actually the circuit is designed as function generator, but it's  complicate (and boring) to explain all the details.
But, I'm sure that the digital signal IS the problem.

Thanks.

DVDdoug

If the overshoot is causing a problem you are going to have another problem (even without the overshoot)...   If the overshoot is short (compared to the clock/sampling rate), you might be able to filter-out the "glitches" at the DAC output. 

When your data lines change states, there is a short period of time during the transition where everything is undefined.   So, there is usually a clock line along with the data lines.   The data get's written-out, and after the data is stable, a rising or falling clock edge latches the stable data (or the clock edge triggers a read, etc.).   With this scheme, overshoot or ringing don't cause problems as long as the lines are stable when the clock-edge comes along. 

There is still a point (actually a period of time) inside the DAC when things are switching, and I don't know how a DAC handles that internally.   But somehow, it has to hold the current output state 'till the new data is stable and the next state is known.

dr.benway

Quote
you might be able to filter-out the "glitches" at the DAC output.



No because, at the output i need a signal like this.


 

Thanks.

dhenry

Quote
What is the electrical impedance of the port?


50ohm is a good number to use.

Before you proceed, think about your design:

1) your circuit will not work, as is. It is not a r2r network and the switches are wrong. A typical r2r network can be implemented much easily, without using the switches.
2) If you really want to use your existing topology, think about a high-side switch.
3) you will run into issues with atomicity if those pins are not on the same port and you don't use port operations.

Unless you have a specific reason to use your design, there are far better ways to implement a dac.

dr.benway

Quote
the switches are wrong.

Could you be more specific?

Thanks.


Grumpy_Mike

Don't worry about dhenry he has some what of a reputation on this forum.
You have already said that this is not a R 2R ladder but I guess he did not read that. The switches are wrong if you had a ladder.

What you do have looks to me like a weighted resistor D/A going into a mixer with the values of the resistor all screwed up. So there will be no monoticity.

However I do think that those spikes are not real and are caused by the probe / scope. You haven't said where you are measuring this signal. However, this is not your problem.

Your problem is that you are expecting something out of this circuit that you are not getting. However as you have not explained this it is hard to offer any real help. Impedance matching is barking up the wrong tree.

I would not use a 9V battery like that as it will very soon drain, you will get no more than a few hours from it.

Go Up