Go Down

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

#### dr_benway

##### Nov 28, 2012, 04:17 pm
Hi,
I have a question about the digital out port of Arduino duemilanove board.
What is the electrical impedance of the port?

Giorgio

#### retrolefty

#1
##### Nov 28, 2012, 04:59 pmLast 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 pmLast 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

#3
##### Nov 28, 2012, 05:26 pm
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

#4
##### Nov 28, 2012, 05:51 pm
Hi,
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.  :~

Any idea or suggestion?

Giorgio.

#### dr_benway

#5
##### Nov 28, 2012, 05:57 pm
If I know the impedence of the port, maybe I can design a matching network.

#### Grumpy_Mike

#6
##### Nov 28, 2012, 11:58 pm
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

#7
##### Nov 29, 2012, 12:07 am
Thinking more about it that is NOT a R 2R ladder circuit.

#### dr_benway

#8
##### Nov 29, 2012, 01:04 am
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"?
Maybe I need to change the sampling frequency ...

#### dr_benway

#9
##### Nov 29, 2012, 01:10 amLast 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

#10
##### Nov 29, 2012, 01:51 am
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

#11
##### Nov 29, 2012, 02:08 am
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

#12
##### Nov 29, 2012, 02:18 am
Quote
What is the electrical impedance of the port?

50ohm is a good number to use.

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

#13
##### Nov 29, 2012, 02:43 am
Quote
the switches are wrong.

Could you be more specific?

Thanks.

#### Grumpy_Mike

#14
##### Nov 29, 2012, 12:24 pm
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