Go Down

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

dhenry

Quote
Could you be more specific?


It is actually very simple:

When the gate is 0, the opamp is in negative feedback and outputs a 3v so its inverting input sits at 3v.

When the gate goes to 6v, there are two cases:

1) if the mosfet's Vgs(th) is sufficiently low (let's say 1v) for the mosfet to conduct, the inverting inputs will be at 6v (mcu's otuput) - Vgs = 5v. With the opamp's non-inverting input at 3v, the amp goes to 0v to try to bring down the voltage differential - it can never do that. or

2) if the mosfet's Vgs(th) is sufficiently high (let's say 4v) so the mosfet cannot be opened, the inverting input continues to sit at 3v, and the opamp outputs a 3v.

The analysis has nothing to do with the resistors in the drain, as you have noticed.

You could have easily reconfigured the circuit into a r2r and you wouldn't need to use those mosfets.

If you do want to use the existing topology, put a pnp mosfet there, between the resistors and 6v to switch the resistors into / out of the network.

Another alternative is to use a switched divider network.

Also, when you pick the mosfet, pick one with small capacitance (TO90 or IRF510) to avoid ringing on the rising edge.

dhenry

Another alternative you can try is a summing amplifier (both inverting or non-inverting).

What you should realize is that the mcu pins can be viewed as switches: they switch in (Vcc or GND) or they switch out (high impedance).

That will make it easier for you to think through the various issues.

Papa G

Maybe you can be a little more specific about what you are trying to accomplish. You mentioned a function generator. From one of the 'scope traces it appears you are trying to synthesize a low resolution sine wave. Is that true? I don't see how your circuit, as you have drawn it, will produce that output.

If you are trying to build a DAC with some sort of custom weighting I imagine you will have an easier task if you use an off the shelf DAC with more bits resolution. DACs are pretty cheap and I would be surprised if you can make your own for less, not to mention the space a discrete one will take up.

No matter how complicated and boring you think your application may be, you will get better help if you are not so mysterious.

dr.benway

Hi, Grumpy Mike, may I contact you in PM ?

Quote
You haven't said where you are measuring this signal.


The measure is between the digital port of arduino and the ground.

I need a square wave, almost 50% , about 10 kHz of frequency.

I read a square wave with spikes, as show in the pictures.

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


But  a 9V battery is the safest way to prevent ground loops.
I power up Arduino, just a moment, to take the measure.
Anyway, the battery in  brand new.

dr.benway

Quote
If you are trying to build a DAC with some sort of custom weighting


Yes, that's correct.

This a project about an alternative design of a "DAC ".
The circuit is incomplete and the weighted resistors value is WRONG (I need to calculate the right value yet ).

I posted the schematic, only to explain the kind of topology of the net.

Anyway, the problem is the signal for arduino, or maybe the probe of the scope.
I am sure about this.

Thanks.

Giorgio.

Go Up