Go Down

Topic: Gets strange voltage levels when converting 12V square wave to 5V (Read 5788 times) previous topic - next topic

olof_n

Feb 16, 2014, 08:33 am Last Edit: Feb 16, 2014, 08:48 am by olof_n Reason: 1
Hi!

I am passing a 12V square wave into a 2n7000 to convert it to a 5V signal (se attached picture).

The problem is that the output voltage level is not 0-5V but instead -0,2V to 5,4V. The error increase with frequency.
With a low frequency it looks ok but with 77Khz I get the above error.

The negative voltage is the worst thing for me because I want to feed the signal to a op-amp to be able to adjust the voltage to 0-10V  (with no negative voltage).

The setup is on a breadboard where I have other components using 12V, 5V and -5V (op-amp). All GND is connected on the breadboard.
I have measured the 5V rail and it is exactly 5V. I use a bench power supply for 12V and 5V and a ICL7660 IC to produce -5V.

/Olof

TomGeorge

Hi, connect the gnd of the CRO directly to the Source of the FET, connect  the input of the CRO directy to the  Drain of the FET and see what comes to light.
Check the DC supply voltages with your CRO and compare them with the DMM.
MAKE SURE THE CRO IS IN DC MODE NOT AC.

Tom...... :)
Everything runs on smoke, let the smoke out, it stops running....

MAS3

Hi Tom.

Don't forget to translate CRO to Cathode Ray Oscilloscope for the non-Aussies (though the other instructions imply you're talking about an oscilloscope).
And they could dump the CR part in that nowadays.
:P
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

MarkT



The problem is that the output voltage level is not 0-5V but instead -0,2V to 5,4V. The error increase with frequency.
With a low frequency it looks ok but with 77Khz I get the above error.


Using x10 probe? It needs the trimmer cap adjusting, that's all...
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

olof_n

Thanks for your answers!

I had to google CRO :)
The result was the same, the voltage level did not change.

Yes I am using a 10x probe. So I can use ignore the negative voltage?
I measured the signal with my multimeter and got 2,503, If that is half the voltage maybe all is fine?

I have a Rigol ds1052e, will  check the manual about  adjusting the trimmer cap.

MarkT

[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

olof_n

I connected the probe to the reference signal on my oscilloscope and changed to 10X in the channel menu.
The square wave was perfect so maybe the problem is not in the probe anyway.

MarkT

Well make sure you are getting the same amplitude of edge at all timescales...
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

TomGeorge

Hi, can you post a screen shot of the scope trace thanks.
I'd agree that it is not a big problem and your following amp will probably sort things out.
Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

olof_n

I took a screen shot of the trace.

olof_n

#10
Feb 16, 2014, 04:00 pm Last Edit: Feb 16, 2014, 04:25 pm by olof_n Reason: 1
I soldered all components on a protoboard and the problem disappeared?!

The problem came back on the protoboard? Hmmm

/Olof

olof_n

#11
Feb 16, 2014, 08:02 pm Last Edit: Feb 16, 2014, 08:15 pm by olof_n Reason: 1
The image I posted was wrong.
The pulldown resistor is actually a pull up resistor.  I misread the datasheet, the 600ohm impedance is just for the sine/tri output and not for the square wave output which is open collector.

I noticed something, If I place a 1K pulldown resistor after the pullup resistor I get a output voltage of +80mV to 5V.

Why is that? Should I use a trimpot and adjust the pulldown resistor until I get a nice 0-5V?





krupski


Hi Tom.

Don't forget to translate CRO to Cathode Ray Oscilloscope for the non-Aussies (though the other instructions imply you're talking about an oscilloscope).
And they could dump the CR part in that nowadays.
:P


Us Yankees know what a CRO is. We even know what a DSO is!  :)
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

TomGeorge

[soapbox] Hi, damn digital virtual world CRO's, I would say if I looked at that trace on a good CRO (analog) I would possibly see 0V to 5.0V.
Why because that is what is being produced, look at the digital trace, it is 0V to 5.0V.
Its that damn statistical box that is telling you max and min.
The max may have occurred for a poffteeenth of a milisecond, not for all the top of the waveform.
The min may have occurred for a poffteeenth of a milisecond, not for all the base of the waveform.
[/soapbox]
The stat box says that the trace is 360mV over 5V, thats 1/3 Volt, show me. the top and base lines are thick as .25V for a start.
The max and min that have been "measured" are glitches / overshoots usual when observing non-sinusoidal wave forms.

(Does the act of observing a phenomenon affect the phenmenon, hence distort the observation, big question)

Tom.. hmmm soapbox felt good...... :)
Everything runs on smoke, let the smoke out, it stops running....

olof_n

Thanks Tom again!

So I can just ignore the whole thing?
I was afraid to damage the microcontroller if I fead the signal to its input.


Go Up