Pages: [1] 2 3   Go Down
Author Topic: Electrical impedance of Dout port  (Read 2646 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: November 28, 2012, 11:01:34 am by retrolefty » Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1906
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
« Last Edit: November 28, 2012, 11:18:52 am by terryking228 » Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33966
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-confuse

Any idea or suggestion?

Thanks in advance.

Giorgio.

Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33966
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33966
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 1
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: November 28, 2012, 07:12:07 pm by dr.benway » Logged

Offline Offline
Edison Member
*
Karma: 33
Posts: 1307
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the switches are wrong.
Could you be more specific?

Thanks.

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33966
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1] 2 3   Go Up
Jump to: