discuss.tchncs.de

0x4E4F, to askelectronics in Non-Inverting LM358 Circuit Not Working
@0x4E4F@lemmy.fmhy.ml avatar

Is the ground for the voltage rail and input signal the same?

Yep.

What exactly is wrong with the circuit I built? I want the LED to only turn on when 5V is supplied at the input, right now the LED can turn on if I connect the ground to the voltage rail supply even without an input voltage.

Schematic of exactly what you did… not what was on paper, how it is on the breadboard.

I’ve seen the post on Adafruit with the feedback resistors connected to the same ground as the rail supply, but the circuit diagram does not show where the input voltage ground is? Link: blog.adafruit.com/…/ask-an-educator-making-a-non-…

It’s the same as the opamp’s ground.

Drich98,

https://discuss.tchncs.de/pictrs/image/1e43a618-1b76-4528-92bb-81b3232d9df6.jpegHere’s a schematic representation of what I built on the breadboard, establishing the same ground point works but the LED still turns on even when V+ is disconnected from the 5V Arduino pin.

0x4E4F, (edited )
@0x4E4F@lemmy.fmhy.ml avatar

Use a single power suppy (GND and +12V) and tie the Arduino’s GND with that GND.

Your circuit fails because the Arduino’s GND is tied to the -12V from the dual power supply, so the +5V that the Arduino outputs equal to -7V on the non-inverting input. Since this is a non-invering schematic, the opamp doesn’t invert the signal. Instead, it tries to double the -7V to get -14 on the Out, but since you’re powering the opamp with -12V, it can’t achieve a voltage that low, so it outputs the maximum it can give: -12V.

The LED turning on even when there’s no signal on the non-inverting input is probably a floating input problem. It picks up EMI so it just amplifies that. Try connecting the non-inverting input to GND, the LED should turn off… that or you burnt one of the opamps, lol, try the other one in the package.

Drich98, (edited )

I tied the Arduino’s GND to the power supply GND, the output is still 10V, tried different ICs as well, not really sure what the issue is at this point. Tying the non inverting input pin to ground does turn OFF the LED, but the led stays on regardless if the 5V is coming from the arduino or not, it seems that the op amp outputs 10V regardless of the non-inverting pin, however if I use different resistors to lower the gain or change the input voltage to 3.3V instead of 5V, I do get the output voltage. I just don’t understand how there can be 10V at the output with no voltage from the inverting or non-inverting pin.

0x4E4F,
@0x4E4F@lemmy.fmhy.ml avatar

Well, you should get 10V. You input 5V, the voltage gain is 2, so the output should be 10V. I don’t see a problem here, the circuit is working as expected.

Drich98,

But that’s the thing, it outputs 10V even when the 5V rail from Arduino is disconnected at V+ (pin 3).

0x4E4F,
@0x4E4F@lemmy.fmhy.ml avatar

Put a pot between the arduino’s +5V and the circuit, see what happens when you turn it. A 10K to 100K pot should be enough.

grasib, to askelectronics in Non-Inverting LM358 Circuit Not Working

the first thing i'd do is connect the GND from your arduino and from your power supply. At the moment there does not seem to be a common ground or it is off picture.

Drich98,

The circuit works when there is a common ground (makes sense ofc but originally I thought they had to be separate), I didn’t want to put 5V and 12V on the same rail of the breadboard. Now what I find strange is that even without the 5V input voltage, I still get 10V at the output of the Op-amp which is very confusing.

Susan_B_Good, to askelectronics in Non-Inverting LM358 Circuit Not Working

Just a word of caution - education is a process of diminishing deception. Books provide a simplified version of real World electronics. Universities and colleges put a lot of effort into designing lab practicals that will actually work and give the predictable results that students expect.

So the normal learning process when it comes to op amps - is to read and understand the theory. Then complete those crafted lab practical exercises - having been introduced to the added complication of systemic and random errors. Then do your own thing, when all the remaining Real Life complications hit you like a brick.

So, if you can find a course in analogue electronics, even a distance learning one, you might find the steps are smaller and more easy to assimilate.

Drich98, (edited )

I understand your caution, however I understand the theory behind OP-Amps, theory can only go so far which is why I’m building a circuit on a breadboard now. I should clarify that the basic rules for ideal op-amps I have a grasp of, although I can never seem to remember these rules. For example, I have the formulas for a BJT and MOSFET transistors memorized because I spent a lot of time reading and using them in practical applications. Op-amps I have spent a lot of time reading but no time building circuits, which is essentially what I am trying to do now. I have a degree in EE, and at this point this is one of the basic components that wasn’t covered much in university, nor did reading or doing practice problems help. I’m very much a hands on learner, I can read formulas and equations all day but if I don’t apply what I learned I’ll forget it after several days unless I repeatedly practice.

Susan_B_Good,

What worked for me, that may not do so for anyone else - is to take an existing circuit (usually a reference one provided by a manufacturer) and build that. Get that working (sometimes, it hasn’t worked- the manufacturer’s technical support department has often been very helpful, especially when their reference design has a design fault or has been misprinted - after doing that, they used to send me unmarked, pre-production chips/etc to play with and provide feedback).

Then modified that design, to test my understanding. Tried different board layouts, guard rings, etc and documented the effect. When it didn’t work as expected - took that back to their tech support to see if we could work out why.

So, for me, taking something that works and keep modifying it, just a little.

possiblylinux127, to starwarsmemes in The ability to speak does not make you intelligent

I don’t see how refusing to work is all that bad.

I want my employment to be at will

M_Reimer, to askelectronics in 555 based PWM Dimmer not working only with LED strips

The video does not play for me.

Did you try to dim the LED strip with your selfmade dimmer?

abff08f4813c, to RedditMigration in I just had my 14th cake day the other week

Welcome aboard and thank you for your service!

FYI see also https://kbin.social/m/RedditMigration/t/65260/PSA-Here-s-exactly-what-to-do-if-you-hit-the (no worries if you're cool with it, but just wanted to make sure you understood the limitations of PDS and weren't surprised by posts or comments remaining after PDS claimed to wipe everything out)

tias,

Go figure. After three days of my profile being completely empty, there are suddenly at least 30 pages of submissions that have returned.

abff08f4813c,

Even after you manually wiped using the links in your archive? If you just used PDS though it might be that reddit did some reindexing to make older stuff show up again, or a sub or a few going unprivate.

tias,

Nah it’s 13K comments, I can’t wipe them all manually. It could be as you say that PDS doesn’t see comments in private subs. In that case I’ll need to find something that lets me feed it all the links.

abff08f4813c,

Ah, recommend trying out https://github.com/andrewbanchich/shreddit - that one you can feed your archive and it will figure out the links on its own

tias,

Thanks. There’s been a lot of talk lately about comments not being properly deleted or Reddit restoring them after deletion. But I figure I can just run PDS multiple times over the next couple of weeks to get the ones that it didn’t catch on the first run. In any case, the “comments” section in my profile comes up empty right now.

I did do a full export through the request form on Reddit before going through with this. I had a total of 13K comments to wipe.

abff08f4813c, to RedditMigration in I just had my 14th cake day the other week
grasib, to askelectronics in Shift register > Relays - inconsistent results when load is attached to relay

Not entirely sure, but maybe these help you somehow:

The relay has a coil which requires 0.35W. The chip seems to have a maximum output current of 35mA.

The ‚switch on current‘ of an inductive load is usually 3 to 5 times higher than the ‚hold‘ current.

The valve may not have a free-wheeling-diode. This could create an issue by creating strange voltage spikes on all your supply voltages (connected by GND).

Max_P,
@Max_P@lemmy.max-p.me avatar

Yeah, decoupling cap here might as well just help OP fry the chip more effectively by ensuring it can sink all that current.

Solution here is probably a transistor/MOSFET that the chip turns on, which in turn turns on the relay. Relay coils are inductors, so that probably also needs a diode to protect the transistor from inrush current and also the kickback when it turns off: inductors resist changes, so it’ll try to keep sinking the current and result in temporary spike of very high voltage: spinningnumbers.org/a/inductor-kickback.html

ryanomite,

Thanks so much! It turns out that the relay (8x) module I’m using - https://www.amazon.com/gp/product/B00LX3UH9C - has isolated relays… but I’ll try a diode, too.

Forced_Dspic, to askelectronics in 555 based PWM Dimmer not working only with LED strips

There is a couple of things I would suggest looking into. First just make sure the LED strip still works, then try a adding a current limiting resistor to the strip, even if it already has one it could help. A unity gain buffer could help as well. I also noticed that there is no active regulator on it, and all the work is put on a zener so I would also say either jank in an active regulator or even easier, supply it with a regulated rail

pneumapunk, to askelectronics in Connecting several tracks to the same pad

It mostly doesn’t matter.

If it’s a high-current, high-frequency, or low-noise circuit then maybe the inductance or resistance of those traces would matter, but they’re very short so probably not.

If you’re mass-producing it, then sometimes the reflow or wave solder process works better if the traces leave the pads in particular ways. You’d talk to your manufacturer about this.

If this is a hobby project, you’re overthinking it; arrange them in a way that pleases you!

Rolive, (edited ) to askelectronics in Shift register > Relays - inconsistent results when load is attached to relay

Seems your linked website as a very believable conclusion attached to it. I have a similar issue where the relay module would behave erratically. In my case it was when the relay module/595 chips received power before the Arduino was fully powered up. It’s unlikely that a load affects your relay module as they should never be connected to the main circuit.

I guess something like a pulldown resistor on the SER, CLK and RCLK pins would solve the issue since that would kill any noise. The noise is probably the kind of voltage that BARELY registers as HIGH but highly random.

That or making the relay module only turn on after the microcontroller has finished starting up using a mosfet or something.

wheresbicki, to askelectronics in Connecting several tracks to the same pad

Why not just connect all the resistors together with one straight trace, and put on trace between that and the cap. They’ll save copper and make the board cheaper.

aabizri,

I know of no PCB fab house that prices production on how much copper is etched out of the foil (even though they recycle the dissolved copper afterwards). On the contrary, i usually got the advice of leaving as much copper on the board as I could, as it makes their life easier (and balancing becomes very easy).

Kratzkopf,

Would they really? I made only one PCB so far, but there your price was independent of design. I also don’t think they save a significant amount of copper either way. Would they notice at all? When you etch away the copper from your PCB you would need to measure how much copper your etchant took in and I would imagine that’s not worth the effort. Feel free to correct me if I’m wrong though.

pneumapunk, to askelectronics in Shift register > Relays - inconsistent results when load is attached to relay

That’s interesting, so you can flip the relays all you like without trouble as long as the 24DC supply isn’t connected? If that’s true then your problem presumably isn’t the typical inductive kick from the relay coil. It looks like your relay board has stuff on it which is presumably drivers and snubbers so let’s assume all of that is adequate to the job.

So, if it’s inductive kick from the valve solenoid it’s being coupled all the way from there, back through the 24DC supply to the outlet, then forward through the USB supply to your shift register, which is impressive! But not implausible.

Anyway, three places I’d add some stuff:

  • The main thing you need is a snubber network across the valve solenoid coil itself, ideally physically close to the valve (you want to minimize the area of the loop formed by the valve coil - wiring - snubber). Something as simple as a freewheel/clamping diode would probably help a lot. This will also improve the lifespan of your relay contacts which are probably arcing a little.
  • Small decoupling cap on your breadboard, say 0.1µF on the power supply rails, to keep your logic happy.
  • Larger decoupling cap on your 24VDC rails (the bus on the left), just to eat any transients the snubber doesn’t deal with. Maybe 1-10µF or so?
ryanomite,

Thanks for your thoughtful response… and sorry it took so long to get back to you. I tried different combinations of capacitors, a diode on the load lines, etc… nothing worked. And then I put a 0.1uF capacitor directly between the power leads on the valve itself… and everything started working fine. Admittedly, I’m not 100% sure why… but I won’t complain :)

pneumapunk,

That makes sense, it forms a simple snubber network. A capacitor in series with a low-value resistor might work even better. Did you try a freewheeling diode directly across the valve leads?

aabizri, to askelectronics in Connecting several tracks to the same pad

If it’s for a digital or power-electronics design, you might want to bypass that question entirely and put in a plane/copper pour/copper fill (all synonyms) that encompasses all these pads.

This helps with power dissipation and lowers resistance though has parasitic inductance and capacitance ramifications. It depends on what goes through that net !

On the other hand if this is analog, high frequency, rf or mixed-signal, I would suggest looking at what kind of requirements you have for that net mathematically. You can find the parasitic inductance and capacitance equations (approximations) online quite easily.

Forced_Dspic, to askelectronics in Connecting several tracks to the same pad

As other have mentioned, what you got is fine for most basic applications. If you use a polygon pour you can decrease the resistance of the trace and consolidate it all into one large trace. I also see you using traces for ground, the general rule is if you have the room, make all the unused space on at least one of your layers ground with a polygon pour. This makes connecting ground easier, makes your ground more reliable (decreased resistance) and makes your board less susceptible to external noise

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #