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.

works in software stimulation not IRL?

Status
Not open for further replies.
This is a really simple circuit and have no clue why this is happening.

In circuit stimulation this circuit has the LED flicking 24/7 while the buzzer is off. Once the light shining onto the LDR is decreased they both go on.

When I breadboarded this circuit however, both LED and buzzer were on at the same time and the LED had no affect at all.

Ideas?

If this is meant to happen and I'm completely wrong does anyone know of similar design ideas which function.
 
Last edited:
Hi John,
First You have no decoupling on the power supply. I don't know if the simulator can take this into account but in the real world all sorts of strange things can happen without proper decoupling. This is how I think you intended it to work. when the LDR is illuminated enough for the voltage on the inverting input of the comparator / op amp to be higher than the reference voltage on the non inverting input then I would expect the LED to be solidly illuminated (NOT FLICKERING) and the buzzer to be silent. When the level of illumination of the LDR drops so that the voltage on the inverting input is lower than the reference voltage on the non inverting input then the NE555 should oscillate at about 5 HZ. So for the 100 mS that the LED is illuminated the buzzer should be silent and for the 100 mS when the LED is not illuminated the buzzer should sound. The on and off times will be slightly different due to the effect of the 1K resistor R1.

Les.
 
Before I critisze the circuit, am I going to offend you, or did the circuit come from somewhere else?
 
In circuit stimulation this circuit has the LED flicking 24/7 while the buzzer is off.
Something wrong there. See Les's post #2.
Don't know which simulator you're using, but LTspice requires a ground connection for the simulation to work properly.
 
One thing to be aware of when using pin 4 of the 555 for on/off control, is that it's high/low threshold is very low. To ensure that it is off you need to take it right down to ground.

You don't say what you are using as IC1, but unless it's output can go low enough, the 555 will always be on.
 
Here is a version of the circuit that simulates ok, and should work when breadboarded. I fixed some things I didn't like about the circuit you downloaded ...

Here are my assumptions:

1. The resistance of the LDR when the circuit switches is 100K. If it isn't, then adjust (my) R2 to match whatever resistance you wish to define as the transition from dark to light...

2. U2 is a comparitor whose output pin pulls below 0.3V when low. If it doesn't have a built-in pull-up, you need to add (my) R6.

Here are the things I fixed:

1. There was no hysteresis around the comparitor. I added R5, which provides about 45mV of hysteresis at the comparitor's input m. That prevents the comparitor from "chattering" due to 120Hz flicker in any illumination falling on the LDR. If it still chatters, reduce the value of R5...

2. I juggled the timing network (my) R7, R8 and C1 to values that will make the battery last longer.

3. I added the missing power supply bypass C3, and the missing bypass C2.

Attached is my LTSpice file. Note how I modeled the varying LDR resistance by making it a function of a ramped voltage which has some 120Hz ripple injected into it. Simulate it with and without R5 to see how converting the comparitor into a Schmit Trigger with 45mV of hysteresis gets rid of the multiple switching you were likely experiencing with your circuit...

450.gif
 

Attachments

  • Draft470.asc
    1.1 KB · Views: 88
MikeMI, this may be a bad idea because it would be a lot of work for you, but it would be cool if you had a circuit simulation cookbook (so to speak), sort of like National Semi AN-31 Op Amp Circuit collection. Maybe have a PDF with a catalog of clickable links that when clicked open the appropriate circuit file. Or maybe just a zip of your circuit collection with a pdf index file? Anyways, thanks for all your efforts, I usually learn from many of your post:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top