Everything goes wrong in my analog circuit - Page 1
Forum section: electronics / beginners

author: Eldi4
author_rank: Contributor
timestamp: March 09, 2019, 08:29:43 am
content: Hello there,I've been trying to build some analog line following robot, the design was based onhttp://www.will-moore.com/analog-line-followerafter 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.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.7VI 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 tooMine version of schematic is on the attachment,

author: rstofer
author_rank: Super Contributor
timestamp: March 09, 2019, 05:06:44 pm
content: Quote from: Eldi4 on March 09, 2019, 08:29:43 amThe 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 VOMon page 6http://www.ti.com/lit/ds/symlink/tl081.pdfQuoteOp 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.QuoteThat 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

author: CatalinaWOW
author_rank: Super Contributor
timestamp: March 09, 2019, 05:29:54 pm
content: 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%3DI 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.

author: rstofer
author_rank: Super Contributor
timestamp: March 09, 2019, 09:45:21 pm
content: Quote from: CatalinaWOW on March 09, 2019, 05:29:54 pmAnd 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.

author: Wimberleytech
author_rank: Super Contributor
timestamp: March 09, 2019, 10:42:08 pm
content: Quote from: Eldi4 on March 09, 2019, 08:29:43 amThe 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.

author: Wimberleytech
author_rank: Super Contributor
timestamp: March 09, 2019, 10:59:05 pm
content: 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.

author: IanMacdonald
author_rank: Frequent Contributor
timestamp: March 09, 2019, 11:25:57 pm
content: 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.

author: Eldi4
author_rank: Contributor
timestamp: March 09, 2019, 11:55:15 pm
content: Quote from: rstofer on March 09, 2019, 05:06:44 pmWell 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.QuoteOp-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.01QuoteWell it should work, i have seen other tutorial article uses this triangle generator tooQuote from: CatalinaWOW on March 09, 2019, 05:29:54 pmI 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 jackWhat tuning?, i don't see any triangle wave generator tuning on my link, it is just only the tuning of the line follower.Quote from: Wimberleytech on March 09, 2019, 10:42:08 pmSadly, 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.Quote from: Wimberleytech on March 09, 2019, 10:59:05 pmI 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 workQuote from: IanMacdonald on March 09, 2019, 11:25:57 pmProbably 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.

author: Audioguru
author_rank: Super Contributor
timestamp: March 10, 2019, 01:44:00 am
content: 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.

author: Wimberleytech
author_rank: Super Contributor
timestamp: March 10, 2019, 03:02:05 am
content: Try thisYou will need to make your own autogenerated model for the simulation...using the model file I provided.

author: Wimberleytech
author_rank: Super Contributor
timestamp: March 10, 2019, 03:04:31 am
content: 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.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: March 10, 2019, 04:59:44 am
content: 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.

author: Eldi4
author_rank: Contributor
timestamp: March 10, 2019, 10:03:53 am
content: Quote from: Audioguru on March 10, 2019, 01:44:00 amWow, this is new to me, thanks for sharing the knowledge!Quote from: Wimberleytech on March 10, 2019, 03:02:05 amUsing your schematicBy 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 triangleThanks a lot for your suggestionQuote from: CatalinaWOW on March 10, 2019, 04:59:44 amYep 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.

author: Wimberleytech
author_rank: Super Contributor
timestamp: March 10, 2019, 12:44:20 pm
content: QuoteWhat frequency?

author: Eldi4
author_rank: Contributor
timestamp: March 10, 2019, 01:03:40 pm
content: 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

author: Wimberleytech
author_rank: Super Contributor
timestamp: March 10, 2019, 01:07:58 pm
content: Quote from: Eldi4 on March 10, 2019, 01:03:40 pmMy sim indicated closer to 300 Hz, but as long as yours is oscillating, move on to the next block.

author: Eldi4
author_rank: Contributor
timestamp: March 10, 2019, 01:38:34 pm
content: 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.

author: rstofer
author_rank: Super Contributor
timestamp: March 10, 2019, 03:24:44 pm
content: There are plenty on Google

author: Eldi4
author_rank: Contributor
timestamp: March 10, 2019, 11:01:18 pm
content: Well, thank you cap'n obvious

author: CatalinaWOW
author_rank: Super Contributor
timestamp: March 11, 2019, 01:35:41 am
content: If you can post what you can buy locally we may be able to suggest the best choice.

author: bson
author_rank: Unknown
timestamp: March 11, 2019, 02:45:43 am
content: Why can't you order from Mouser? They have an Indonesia site:https://www.mouser.co.id/

author: lordvader88
author_rank: Frequent Contributor
timestamp: March 29, 2019, 11:57:41 pm
content: Quote from: Wimberleytech on March 09, 2019, 10:59:05 pmdoes 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.

author: bson
author_rank: Unknown
timestamp: March 30, 2019, 05:45:13 pm
content: Quote from: Eldi4 on March 09, 2019, 08:29:43 amOPA4322http://www.ti.com/lit/ds/sbos538f/sbos538f.pdf