Author Topic: Everything goes wrong in my analog circuit  (Read 2930 times)

0 Members and 1 Guest are viewing this topic.

Offline Eldi4Topic starter

  • Contributor
  • Posts: 41
  • Country: id
Everything goes wrong in my analog circuit
« on: March 09, 2019, 08:29:43 am »
Hello there,

I've been trying to build some analog line following robot, the design was based on http://www.will-moore.com/analog-line-follower
after some tweaking on the circuit i started building it,

I used TL084 instead of OPA4727, and think it should do just fine, but after building the whole circuit i found problems,
here is the list of the problems :

1. TL084 output only swing 0.6V~3.7V with 5V supply voltage, i know TL084 is not a rail to rail output op-amp but i really did'nt expect it to be this worse, if you have any recommendation on jellybean op-amp that is better than TL084 please tell me.

2. The differential op-amp on the sensor gain was huge (it is supposed to unity gain),it's just swinging to 0.6V or 3.7V (not in between). When i measure the resistance of the summing resistor of the sensor it say 28k (I use 100k instead of 470k), is it the problem?.  After giving voltage follower on the sensor's output the differential op-amp seems to work fine, but i doubt it still  :palm:.

3. The Triangle Wave generator does'nt work, it just give plain 3.7V DC, i have pretty much checked any connection of the ic but it still does'nt work, the way i check the triangle wave generator is connecting them to speaker input (as i dont have an oscilloscope), and the speaker only sounds "dug" once when i connect or disconnect the triangle wave output to speaker's input. Pin 2 and 5 voltage shows 2.5V (5V Supply), pin 1 0.6V, pin 3 2.1V, pin 6 0.6V, pin 7 3.7V


I have not checked other op-amps behavior, because those three already confuses me for 4 days, and i'm sure there are other unrevealed problems too  :palm:

Mine version of schematic is on the attachment,
« Last Edit: March 09, 2019, 08:34:42 am by Eldi4 »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #1 on: March 09, 2019, 05:06:44 pm »
Hello there,

I've been trying to build some analog line following robot, the design was based on http://www.will-moore.com/analog-line-follower
after some tweaking on the circuit i started building it,

I used TL084 instead of OPA4727, and think it should do just fine, but after building the whole circuit i found problems,
here is the list of the problems :

1. TL084 output only swing 0.6V~3.7V with 5V supply voltage, i know TL084 is not a rail to rail output op-amp but i really did'nt expect it to be this worse, if you have any recommendation on jellybean op-amp that is better than TL084 please tell me.


The datasheet shows a worst case swing of +-12V when the TL084 operates on a +-15V supply.  So, worst case, it can't get within 3 volts of the rails.  I'm surprised it even operates on a 5V supply.

See VOM on page 6

http://www.ti.com/lit/ds/symlink/tl081.pdf

Quote
2. The differential op-amp on the sensor gain was huge (it is supposed to unity gain),it's just swinging to 0.6V or 3.7V (not in between). When i measure the resistance of the summing resistor of the sensor it say 28k (I use 100k instead of 470k), is it the problem?.  After giving voltage follower on the sensor's output the differential op-amp seems to work fine, but i doubt it still  :palm:.


Op amp 3B has positive feedback (the feedback resistor is connected to the + input) so all it will ever do is switch between minimum and maximum output voltages.  The note mentions hysteresis.

Op amp 2B doesn't appear to have any series resistors between the sensors and the pins.  The gain could be quite high if the sensor impedance is ow.

Op amp 3A has a gain of around 100.

Quote

3. The Triangle Wave generator does'nt work, it just give plain 3.7V DC, i have pretty much checked any connection of the ic but it still does'nt work, the way i check the triangle wave generator is connecting them to speaker input (as i dont have an oscilloscope), and the speaker only sounds "dug" once when i connect or disconnect the triangle wave output to speaker's input. Pin 2 and 5 voltage shows 2.5V (5V Supply), pin 1 0.6V, pin 3 2.1V, pin 6 0.6V, pin 7 3.7V

That triangle generator doesn't look right.  First you need to generate a square wave and that takes at least one op amp, three resistors and a capacitor.  Then you need to create the triangle wave and that is nothing more than an integrator, a couple of resistors and ANOTHER capacitor.

http://www.ques10.com/p/22759/explain-triangular-wave-generator-using-opamp/

Quote

I have not checked other op-amps behavior, because those three already confuses me for 4 days, and i'm sure there are other unrevealed problems too  :palm:

Mine version of schematic is on the attachment,
« Last Edit: March 09, 2019, 05:09:22 pm by rstofer »
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5569
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #2 on: March 09, 2019, 05:29:54 pm »
I am not sure what you mean by "jelly bean".  You probably can't find a $0.03 op amp for this task.  The one specified is roughly four dollars.  You can do a quick search for what is available in your area and find op-amps for under a dollar that look like they would work.  One example:

https://www.mouser.com/ProductDetail/Renesas-Intersil/EL5111TIWTZ-T7A?qs=sGAEpiMZZMtOXy69nW9rMwWeYYZE9XJK%2F%252BbJZK77xYE%3D

I can see how the triangle generator might work.  The second op-amp acts as a comparator to flip the charge on the capacitor.  The use of a parallel 470k and 20k  resistor to get the specified 19k resistance (see the second schematic in your link) suggests that some tuning may be required. 

Other things in the link article suggest that while this circuit works it requires some tuning.  You can probably get the needed oscilloscope functionality out of one of the many free oscilloscope programs that use the computer sound card for input.   They are crude, but will let you look at a lot more of what is happening.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #3 on: March 09, 2019, 09:45:21 pm »
I can see how the triangle generator might work.  The second op-amp acts as a comparator to flip the charge on the capacitor.  The use of a parallel 470k and 20k  resistor to get the specified 19k resistance (see the second schematic in your link) suggests that some tuning may be required. 

Other things in the link article suggest that while this circuit works it requires some tuning.  You can probably get the needed oscilloscope functionality out of one of the many free oscilloscope programs that use the computer sound card for input.   They are crude, but will let you look at a lot more of what is happening.

And it required tuning for the more expensive, and capable, op amps.  The chances that the tuning, as shown in the original schematic, will work with the selected op amps is questionable.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #4 on: March 09, 2019, 10:42:08 pm »
3. The Triangle Wave generator does'nt work, it just give plain 3.7V DC, i have pretty much checked any connection of the ic but it still does'nt work, the way i check the triangle wave generator is connecting them to speaker input (as i dont have an oscilloscope), and the speaker only sounds "dug" once when i connect or disconnect the triangle wave output to speaker's input. Pin 2 and 5 voltage shows 2.5V (5V Supply), pin 1 0.6V, pin 3 2.1V, pin 6 0.6V, pin 7 3.7V


The triangle wave generator will work with ideal components with the values given.  However, not with the opamp you have chosen.

Change R2 to 10K and see what happens.

Here is the circuit drawn a different way...I prefer the signal flow...integrator to a comparator then fed back.  Just my preference.
« Last Edit: March 09, 2019, 10:48:00 pm by Wimberleytech »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #5 on: March 09, 2019, 10:59:05 pm »
You should build this circuit in LTSpice.  Test each individual block alone.  Verify everything.  Then build the actual circuit.

LTSpice it too easy to use not to do this...especially for a purely analog circuit like this.
 

Offline IanMacdonald

  • Frequent Contributor
  • **
  • Posts: 943
  • Country: gb
    • IWR Consultancy
Re: Everything goes wrong in my analog circuit
« Reply #6 on: March 09, 2019, 11:25:57 pm »
Indeed the way I read the data sheet is that the TL084 is not designed for single 5v supplies. It mentions dual 5v, but that would be twice what you have. The output swing drops off quite rapidly with loading <10k as well. The CA3140 (single supply down to 4v) might be suitable, but check in LTSpice.
 

Offline Eldi4Topic starter

  • Contributor
  • Posts: 41
  • Country: id
Re: Everything goes wrong in my analog circuit
« Reply #7 on: March 09, 2019, 11:55:15 pm »

The datasheet shows a worst case swing of +-12V when the TL084 operates on a +-15V supply.  So, worst case, it can't get within 3 volts of the rails.  I'm surprised it even operates on a 5V supply.

See VOM on page 6

http://www.ti.com/lit/ds/symlink/tl081.pdf


Well yes, i operated the TL084 at the minimum supply voltage, should try it with higher voltage, but i think it will not change as much, probably i will change TL084 to something else, do you have any recommendation?, an rail to rail op amp that is pretty old, because electronic store here are suck, i can't order on digikey or mouser.

Quote

Op amp 3B has positive feedback (the feedback resistor is connected to the + input) so all it will ever do is switch between minimum and maximum output voltages.  The note mentions hysteresis.

Op amp 2B doesn't appear to have any series resistors between the sensors and the pins.  The gain could be quite high if the sensor impedance is ow.

Op amp 3A has a gain of around 100.


Op-amp 3B is supposed to be voltage comparator, that positive feedback resistor is experimental, means that if it oscillates horribly i will add it to create an hysteresis.

There are series input resistor on op-amp 2B, it's on sensor side, it was 100k x 4 summing resistor, you can see it on the article i've attached on main post, sorry i did'nt include the sensor's schematic.

Is'nt the gain of Op-Amp 3A is 1.01?,  1+(Rf/Rs), 1+(4.7k/470k), 1.01

Quote

That triangle generator doesn't look right.  First you need to generate a square wave and that takes at least one op amp, three resistors and a capacitor.  Then you need to create the triangle wave and that is nothing more than an integrator, a couple of resistors and ANOTHER capacitor.

http://www.ques10.com/p/22759/explain-triangular-wave-generator-using-opamp/


Well it should work, i have seen other tutorial article uses this triangle generator too

I am not sure what you mean by "jelly bean".  You probably can't find a $0.03 op amp for this task.  The one specified is roughly four dollars.  You can do a quick search for what is available in your area and find op-amps for under a dollar that look like they would work.  One example:

https://www.mouser.com/ProductDetail/Renesas-Intersil/EL5111TIWTZ-T7A?qs=sGAEpiMZZMtOXy69nW9rMwWeYYZE9XJK%2F%252BbJZK77xYE%3D

I can see how the triangle generator might work.  The second op-amp acts as a comparator to flip the charge on the capacitor.  The use of a parallel 470k and 20k  resistor to get the specified 19k resistance (see the second schematic in your link) suggests that some tuning may be required. 

Other things in the link article suggest that while this circuit works it requires some tuning.  You can probably get the needed oscilloscope functionality out of one of the many free oscilloscope programs that use the computer sound card for input.   They are crude, but will let you look at a lot more of what is happening.

I mean an easy to find op-amp that's pretty old but are a good op-amp, it was pretty hard to find a component that is pretty new or popular, even i can't find OPA4727 there.

I have try sound card oscilloscope on my laptop, but my laptop just can't detect it, it still uses internal microphone even when i connect the jack  :palm:

What tuning?, i don't see any triangle wave generator tuning on my link :o, it is just only the tuning of the line follower.

3. The Triangle Wave generator does'nt work, it just give plain 3.7V DC, i have pretty much checked any connection of the ic but it still does'nt work, the way i check the triangle wave generator is connecting them to speaker input (as i dont have an oscilloscope), and the speaker only sounds "dug" once when i connect or disconnect the triangle wave output to speaker's input. Pin 2 and 5 voltage shows 2.5V (5V Supply), pin 1 0.6V, pin 3 2.1V, pin 6 0.6V, pin 7 3.7V


The triangle wave generator will work with ideal components with the values given.  However, not with the opamp you have chosen.

Change R2 to 10K and see what happens.

Here is the circuit drawn a different way...I prefer the signal flow...integrator to a comparator then fed back.  Just my preference.

Sadly, but i will try to change R2 to 10k,

did your circuit will work with TL084?, but meh probably i will change my op-amp though.

You should build this circuit in LTSpice.  Test each individual block alone.  Verify everything.  Then build the actual circuit.

LTSpice it too easy to use not to do this...especially for a purely analog circuit like this.

I have try to draw some part of it in LTSpice but i can't find TL084 there, and my LTSpice drawing skill is just bad, i have tried to draw the triangle wave generator and it takes me over 30 minute and it does'nt work  :palm:

Indeed the way I read the data sheet is that the TL084 is not designed for single 5v supplies. It mentions dual 5v, but that would be twice what you have. The output swing drops off quite rapidly with loading <10k as well. The CA3140 (single supply down to 4v) might be suitable, but check in LTSpice.

Probably i will try to make the supply voltage higher, and see what happens, but i expect anything not much will happen though, In my schematic i was not loading the op-amp so much,

Well, i can find some CA3140 on some store there, but is it really worth it?, i have not checked the datasheet yet, and i don't think CA3140 are on LTSpice.

Edit : CA3140 is only single op-amp too.
« Last Edit: March 09, 2019, 11:58:52 pm by Eldi4 »
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Everything goes wrong in my analog circuit
« Reply #8 on: March 10, 2019, 01:44:00 am »
The TL08x opamps have the "Opamp Phase Inversion Problem" which is why they need a negative supply in addition to its positive supply. If an input voltage gets within a few volts from its negative supply voltage (ground in this circuit) then its output suddenly goes as high as it can. The inputs in this circuit always go near ground so the problem occurs often.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #9 on: March 10, 2019, 03:02:05 am »
Try this

You will need to make your own autogenerated model for the simulation...using the model file I provided.
« Last Edit: March 10, 2019, 03:14:50 am by Wimberleytech »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #10 on: March 10, 2019, 03:04:31 am »
You need to break this thing into subcircuits and prove out each one alone rather than building the whole thing and throw up your hands when it does not work.  Divide and conquer.
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5569
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #11 on: March 10, 2019, 04:59:44 am »
My local stores are non existent, so your bad store is better than mine.  I have to order everything on line.  You say Digikey and Mouser are out for you.  Are there any online options?  Ebay or Alibaba or ?.  Another thing to try is to see if your electronics store can order or perhaps a local school or university.  I know that regulations in some places make things harder, but there is usually some way to make things happen.
 

Offline Eldi4Topic starter

  • Contributor
  • Posts: 41
  • Country: id
Re: Everything goes wrong in my analog circuit
« Reply #12 on: March 10, 2019, 10:03:53 am »
The TL08x opamps have the "Opamp Phase Inversion Problem" which is why they need a negative supply in addition to its positive supply. If an input voltage gets within a few volts from its negative supply voltage (ground in this circuit) then its output suddenly goes as high as it can. The inputs in this circuit always go near ground so the problem occurs often.

Wow, this is new to me, thanks for sharing the knowledge!


Try this

You will need to make your own autogenerated model for the simulation...using the model file I provided.

Using your schematic
By changing the resistor on integral output to 20k, the amplitude is getting bigger, and by changing the supply voltage to 12V the output swing is getting better, using 5V will give me output swing of (1.7V to 3.3V) and by using 12V it gives (1.8V to 10.2V), well probably i will use a higher supply voltage for my TL084.

but when i tried to rebuild my trianglewave generator it gives me square wave output instead of triangle  :-DD

Thanks a lot for your suggestion

My local stores are non existent, so your bad store is better than mine.  I have to order everything on line.  You say Digikey and Mouser are out for you.  Are there any online options?  Ebay or Alibaba or ?.  Another thing to try is to see if your electronics store can order or perhaps a local school or university.  I know that regulations in some places make things harder, but there is usually some way to make things happen.

Yep but you have more complete component to order, from the oldest to the newest, while mine are only old component. There are some local online stores, which is better than local stores, but it is not as complete as digikey or mouser, and sometimes the part are extremely costly compared to digikey or mouser,
I can't order on ebay, but i can order on aliexpress, but the shipping take a loong time (1 month), because i always take the free shipping option. You know, i don't want to buy a thing when the shipping is more costlier than the cost of the order itself, even when the shipping is fast  :-DD.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #13 on: March 10, 2019, 12:44:20 pm »
Quote

but when i tried to rebuild my trianglewave generator it gives me square wave output instead of triangle  :-DD

What frequency?
 

Offline Eldi4Topic starter

  • Contributor
  • Posts: 41
  • Country: id
Re: Everything goes wrong in my analog circuit
« Reply #14 on: March 10, 2019, 01:03:40 pm »
Ahh... never mind the Vref is swapped, it's supposed to be on non-inverting input of hysteresis and on inverting input of integrative but on my schematic it's swapped, the frequency is around 500Hz, don't really know how to read frequency on LTSpice, i'm so noob on LTSpice  :-[
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #15 on: March 10, 2019, 01:07:58 pm »
Ahh... never mind the Vref is swapped, it's supposed to be on non-inverting input of hysteresis and on inverting input of integrative but on my schematic it's swapped, the frequency is around 500Hz, don't really know how to read frequency on LTSpice, i'm so noob on LTSpice  :-[

My sim indicated closer to 300 Hz, but as long as yours is oscillating, move on to the next block.
 

Offline Eldi4Topic starter

  • Contributor
  • Posts: 41
  • Country: id
Re: Everything goes wrong in my analog circuit
« Reply #16 on: March 10, 2019, 01:38:34 pm »
But still did'nt try it on breadboard, anyway, thanks for your suggestion.
and emm, did you know how can i find some LTSpice learning tutorial?, i think it will be really useful to master this spice program.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #17 on: March 10, 2019, 03:24:44 pm »
There are plenty on Google
 

Offline Eldi4Topic starter

  • Contributor
  • Posts: 41
  • Country: id
Re: Everything goes wrong in my analog circuit
« Reply #18 on: March 10, 2019, 11:01:18 pm »
Well,  thank you cap'n obvious :palm:
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5569
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #19 on: March 11, 2019, 01:35:41 am »
If you can post what you can buy locally we may be able to suggest the best choice.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2497
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #20 on: March 11, 2019, 02:45:43 am »
Why can't you order from Mouser?  They have an Indonesia site: https://www.mouser.co.id/
 

Offline lordvader88

  • Frequent Contributor
  • **
  • !
  • Posts: 935
  • Country: ca
Re: Everything goes wrong in my analog circuit
« Reply #21 on: March 29, 2019, 11:57:41 pm »
You should build this circuit in LTSpice.  Test each individual block alone.  Verify everything.  Then build the actual circuit.

LTSpice it too easy to use not to do this...especially for a purely analog circuit like this.
does it actually include op-amp models ? Or do u have to make your own model ? I had it installed before, I wanted a more basic program drop and click program. Now I can't find a good basic program like I had before (circuitmaker2000 or something like that)

I'll try LTspice again now, I just wish it looked better and had an easier/quicker user-interface.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2497
  • Country: us
Re: Everything goes wrong in my analog circuit
« Reply #22 on: March 30, 2019, 05:45:13 pm »
1. TL084 output only swing 0.6V~3.7V with 5V supply voltage, i know TL084 is not a rail to rail output op-amp but i really did'nt expect it to be this worse, if you have any recommendation on jellybean op-amp that is better than TL084 please tell me.
OPA4322
http://www.ti.com/lit/ds/sbos538f/sbos538f.pdf
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf