Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LM358N driving me insane

Status
Not open for further replies.

arhi

Member
I'm aware that I don't know much about all this .. but this should be as simple as ohm law and it's driving me crazy ...

LM358N ..

pin4 (power -): gnd
pin8 (power +): +5V

pin2 (-): +2.32V
pin3 (+): +550mV

what should be the pin1 (out) ??? from what I know, as + is lower then - .. it should be 0V .. right?? ... well .. it is 4V ?!?!?!?!

OSC output attached for all three pins ... is there anyone that can shed some light before I give up on this completely


EDIT: no feedback .. pin2 is connected to voltage divider (1 resistor to ground, another resistor to vcc), pin3 is "signal in" and pin3 is connected to osc via resistor
 

Attachments

  • PIN1.png
    PIN1.png
    9.6 KB · Views: 379
  • PIN2.png
    PIN2.png
    10 KB · Views: 382
  • PIN3.png
    PIN3.png
    10.7 KB · Views: 272
Last edited:
Hard to tell off hand... It sounds like phase inversion, but i did not think it was a problem with that amp.

Try closing the loop and seeing how it works as you sweep the input.
 
Hard to tell off hand... It sounds like phase inversion, but i did not think it was a problem with that amp.

the opamp is working afaik .. (I tried another one with same result so it is not the "malfunctioning opamp" it is malfunctioning brain (mine) :(

Try closing the loop and seeing how it works as you sweep the input.

:D

closing the loop - how? sorry but everything between 0 and 5v is trouble to me :( .. I added 50K +10K to the ground from the output (pin1) .. and done measurement after 10K .. same thing :( ..

anyhow .. I attached now the actual signal that I want to feed to the opamp, the idea is to make it square :) .. and bloody opamp/comparator should do it ... but looks like my knowledge of basic elco is long gone :(

I have a cheepo oscilloscope here, and all this on some protoboard... if you have any ideas .. I'm willing to try them out

EDIT: attached pic .. the width of the pic is 1 second
 

Attachments

  • input.png
    input.png
    12.3 KB · Views: 301
Last edited:
Put a 10K resistor to ground on your input pin.
 
You forgot to attach a schematic so should we guess?:
1) Is the +5V supply a low resistance?
2) What is the resistance of the load?
3) Does the load connect to +5V?

You show an output from +1V with a lot of ripple. Why doesn't it go down to ground? Why does it have so much ripple? Its high of +3.8V is normal.
 
You forgot to attach a schematic so should we guess?:
1) Is the +5V supply a low resistance?
2) What is the resistance of the load?
3) Does the load connect to +5V?

You show an output from +1V with a lot of ripple. Why doesn't it go down to ground? Why does it have so much ripple? Its high of +3.8V is normal.

preparing to call it a night .. I'l draw the schematic in the morning and upload it, for now here is the short explanation

1. I have no idea what +5V low resistance power supply mean :( .. sorry, I said I'm not too good with it, but, I get the same result from USB stolen 5V and from 7805 + 1000uF capacitor.

2. from pin1 (output from op amp) 5K resistor - point where I attach oscilloscope - 50K resistor - ground

3. no .. the load is supposed to be PIC18Fxxxx input pin but for now I'm just attaching the scope or voltmeter

as for the schematic .. sorry again .. but I was soooooooo frustrated ..

basically the output of another op amp (LM833) trough 1000pF and schottky diode is going to LM358 pin3 (+ input) (the output is attached in prev message, that's the 1V with ripple .. btw, I'm not sure if ripple is from the scope or it is really there as I get ripples in this app even when I connect probe to the ground ?!)

so, the thing is .. this output (~1V / ~4V) I want to get to be ~0V and ~4V so I can feed it to the PIC. Mine understanding is that lm358 will behave like comparator without any feedback loop and that I will get nice square output :( ..

this is not something I "need" ... but it's kinda project I want to use to learn how to deal with op amps and a bit of analog elco as I miss basic in that field (what can I say, I'm software engineer and this is much more difficult then if/then/else :) )
 
here is the schematic

Here is the schematic ..

the "upper" part works perfectly .. (the input is 40KHz from the transducer) .. everything up to lm358 is as expected .. the pin 3 of the lm358 is the attached signal (the one with 1V and 4V segments with ripples)

the trimmer can set the voltage on the pin2 so I can set it "above" that 1V rippled signal ... problem is, it does not work :(

now, the thing is, I do not need just the "solution" on how to fix it .. I got this schematic of the net, then I worked on it, changed it a bit, changed it a lot to see what will happen when I change some things, then made it as is (pretty much same as the original "stolen" desing) but I learned a lot .. now, the problem is, why is this not working .. it is not "how to fix it" .. but more "why it is not working" as this problem kills all I tough I know about op-amps (that I learned in few couple weeks :) )
 

Attachments

  • hhhhh.png
    hhhhh.png
    11.5 KB · Views: 459
Before you had a problem with DC and extremely low frequency signals.
Now you have an LM833 signal generator working from a 5V supply when its datasheet shows a minimum supply of 10V.

The lousy old LM358 has PNP input transistors that need a resistor to ground because the input current is positive. The input of the LM358 in your circuit does not have a resistor to ground so the input floats to a higher voltage.
A 100k resistor to ground at the input will have a voltage caused by input current of from 4.5mV to 25mV.
 
pin2 (-): +2.32V
pin3 (+): +550mV

what should be the pin1 (out) ??? from what I know, as + is lower then - .. it should be 0V .. right?? ... well .. it is 4V ?!?!?!?!

ARHI,

I had a similar problem driving me nuts. The voltage measurements did not make sense. I changed out the op amp but the problem remained.

The problem was a surface mount solder connection to a resistor that looked fine but was open. When you take the voltage measurements of the IC pins, make sure that your probe is right on the IC pin, not the pad or a connecting pad or the top of a resistor.
 
@bob - thanks but, checked all that before I made a post :)

@audioguru yup, remember, I bugged you about the opamp earlier .. my knowledge there is looooooow :( ...

as for the min 10V for LM833.. damn .. I do not see that in the data-sheet ?! the only remotely close thing I see is "TOTAL SUPPLY CURRENT vs SUPPLY VOLTAGE" graph and it looks kinda linear from 2.5V supply .. and supply voltage +-2.5 - +-15V .. so I'm unable to find 10V min supply in the data sheet ?! (I'm obviously reading something wrong here)

the resistor the the ground was complete "mistery" to me when I read your post (not to mention the rectifiers that demodulate the signal so the resistor kills the work they do) .. but just looked at the data sheet again and there is a schematic of the op inside it .. now I "almost" understand the problem .. I will play with it a little more and come back if I cannot find the solution .. thanks for looking at this .. I have pretty good idea how this type of questions can lead to "go learn your basics and come back then"
 
as for the min 10V for LM833.. damn .. I do not see that in the data-sheet ?! the only remotely close thing I see is "TOTAL SUPPLY CURRENT vs SUPPLY VOLTAGE" graph and it looks kinda linear from 2.5V supply .. and supply voltage +-2.5 - +-15V .. so I'm unable to find 10V min supply in the data sheet ?! (I'm obviously reading something wrong here)
The graph is a solid straight line with a supply voltage of positive and negative 5V and higher. Below positive and negative 5V the line is dotted and falls off abruptly.
All the other graphs have a minimum supply of positive and negative 5V.

the resistor the the ground was complete "mistery" to me when I read your post (not to mention the rectifiers that demodulate the signal so the resistor kills the work they do) .. but just looked at the data sheet again and there is a schematic of the op inside it .. now I "almost" understand the problem .. I will play with it a little more and come back if I cannot find the solution .. thanks for looking at this .. I have pretty good idea how this type of questions can lead to "go learn your basics and come back then"
Since the input transistors are PNP then their input bias current pulls the pin 3 input high without a resistance to ground. When you measure the voltage at pin 3 then the resistance of your voltmeter pulls the voltage down but without a resistor to ground then pin 3 is high which causes the output to be high.
 
The graph is a solid straight line with a supply voltage of positive and negative 5V and higher. Below positive and negative 5V the line is dotted and falls off abruptly.
All the other graphs have a minimum supply of positive and negative 5V.

I'm reading something wrong here :( ...
VCC Supply Voltage ±2.5 to ±15 V ?? I'd say that ±2.5 is pretty close to +5 and GND

The graph is streight line from 2.5 up .. I'll attach the datasheet here as I really want to learn, and if I cannot read the datasheet .. (I have ST op's so I'm looking at ST datasheet)
Since the input transistors are PNP then their input bias current pulls the pin 3 input high without a resistance to ground. When you measure the voltage at pin 3 then the resistance of your voltmeter pulls the voltage down but without a resistor to ground then pin 3 is high which causes the output to be high.

damn... Heisenberg, Heisenberg, Heisenberg .... and his uncertainty principle...
Thanks audioguru, this explained it :D ..
**broken link removed**
 

Attachments

  • lm833.pdf
    117.5 KB · Views: 261
Last edited:
The LM833 made by National Semi shows a graph of its supply current abruptly dropping when its total supply voltage is less than 10V.

The graph from ST Micro is completely different. The supply current stays the same until the total supply voltage is down to 5V then it suddenly increases.

The LM833 is old. I would use National's newer and better LM4562 dual opamp instead and it operates from a total supply as low as 5V.
 
The LM833 made by National Semi shows a graph of its supply current abruptly dropping when its total supply voltage is less than 10V.

The graph from ST Micro is completely different. The supply current stays the same until the total supply voltage is down to 5V then it suddenly increases.

good, so the datasheet is different, I'm not going crazy

The LM833 is old. I would use National's newer and better LM4562 dual opamp instead and it operates from a total supply as low as 5V.

I would too :( but here I already put "all" op-amps I can get "easy" .. and you suggested lm833 ... I know how nice it is when you can go to local store and get "whatever you like" .. or even better, order online, I lived many years in "normal" countries, but now I live in "messed up country" hence list of available parts is kinda small :(

I managed to find out that we have a microchip distributor here, and I already got some PIC's from them ... I need to check if they have microchip op-amps and if I can purchase some normal amount (they told me that for some parts min order is 100 pcs) so this might add mcp60(1|2|3|4|6|7|8|9|41) and mcp6S(21|28)
 
I recommended National Semi's LM833, not ST Micro's copy of it. Then your circuit powered it from a 24V supply.
 
I recommended National Semi's LM833, not ST Micro's copy of it. Then your circuit powered it from a 24V supply.

I had no idea they are different... :(

will play with it tomorrow as I will have some time for it .. I got bunch of info from you :) thanks for that, now I need to solve it :D - the best way to learn :D -

thanks, I'll post back when I fix it (or if I discover that I'm too stupid to solve it myself - but with all this info, I hope I'm not that stupid)
 
So your using a 40KHz carrier, but I am wondering what your max modulation frequency is.
 
The LM833 made by National Semi shows a graph of its supply current abruptly dropping when its total supply voltage is less than 10V.

The graph from ST Micro is completely different. The supply current stays the same until the total supply voltage is down to 5V then it suddenly increases.
Back in the day, National made many of its parts for the US government based on contracts, and as such, designed and tested the parts to specs specified by the contract. Test time is money and so if spec requirement was only to 10V, then that is what they tested to.
National would then just take the part, remove the MIL-STD part number, and sell it to the public sector. What would be the point in adding test time dollars if not needed? I think the abrupt drop is where no test data is available.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top