Dark sensor circuit using LM393 question.... unstable OFF/ON... flickering

eetech00

Joined Jun 8, 2013
4,709
I had neglected to add the 1k resistor that was shown on the circuit that was provided to me on this thread (pins 5,6 & 7). It was on my schematic, but not on my board. It is actually R5 (not R10). I have also connected pin 6 to pin 2 on the LM393 (not shown on this PCB)
View attachment 361661View attachment 361660
R5 doesn't look to be a pull-down resistor. Can you post a schematic of the whole circuit?
 

eetech00

Joined Jun 8, 2013
4,709
Some suggestions shown in circle(s) with comments. I redrew the schematic so I could follow easier.

1767891190761.png

I didn't review all the posts so some of these might already be addressed.

EDIT: Added M1 VGS limiter, PIR P/N
EDIT: TS is using 2ea LED w/internal resistor
 
Last edited:

Thread Starter

johnaustinkaty

Joined Jul 16, 2021
284
Some suggestions shown in circle(s) with comments. I redrew the schematic so I could follow easier.

View attachment 361699

I didn't review all the posts so some of these might already be addressed.
Thank you very much. I'll look it over and let you know if I have any questions. I plan to add the PD from dim to gnd on my current board to see if the bright flash goes away. I can simply solder a 1k from pin 5 on the attiny to gnd, right?
 
Last edited:

Thread Starter

johnaustinkaty

Joined Jul 16, 2021
284
Cold test results:
I had a light in the freezer for hours while I cooked ribs on the grill. I brought the light out at dusk within a few minutes of when the lights have been coming on. It appeared that the light came on a few minutes sooner than I expected. The light works flawlessly. The case was 43f (laser measured) when light came on, so I would guess the temp was 35f to 40f inside the unit. I will do a heat test tomorrow evening.
 

ericgibbs

Joined Jan 29, 2010
21,463
hi john,
Why have you used a Tiny to drive PWM two, low powered RED LED's?

Also, what is the PIR specification, type number?

E
EG 1953.png
 

Thread Starter

johnaustinkaty

Joined Jul 16, 2021
284
hi john,
Why have you used a Tiny to drive PWM two, low powered RED LED's?

Also, what is the PIR specification, type number?

E
View attachment 361720
I want the two low powered LEDs to be at approximately half brightness when steady ON. When motion is sensed, they flash at 255 several times, alerting the observer that the light has been triggered by motion.
I'll send the PIR spec shortly....
I suppose I could have used a resistor for the half brightness steady on from that pin and used another pin thru a transistor to send a HIGH digital signal for the brighter flashes....
 
Last edited:

eetech00

Joined Jun 8, 2013
4,709
Thank you very much. I'll look it over and let you know if I have any questions. I plan to add the PD from dim to gnd on my current board to see if the bright flash goes away. I can simply solder a 1k from pin 5 on the attiny to gnd, right?
You must disconnect the LM393 pin 7 (or R5) from the ATiny pin 5 first, so it doesn't interfere with operation of the new pull-down resistor. Then add the new pull-down to ATiny pin 5 to gnd, and test.
 

eetech00

Joined Jun 8, 2013
4,709
I want the two low powered LEDs to be at approximately half brightness when steady ON. When motion is sensed, they flash at 255 several times, alerting the observer that the light has been triggered by motion.
I'll send the PIR spec shortly....
I suppose I could have used a resistor for the half brightness steady on from that pin and used another pin thru a transistor to send a HIGH digital signal for the brighter flashes....
Can't that be set up in the ATiny logic?
When you want the LED's half-bright steady on, change to high-freq/low duty cycle.
When you want the LED's to flash full-bright, change to low-freq/high duty cycle.
 
Last edited:

Thread Starter

johnaustinkaty

Joined Jul 16, 2021
284
Can't that be set up in the ATiny logic?
When you want the LED's half-bright steady on, change to high-freq/low duty cycle.
When you want the LED's to flash full-bright, change to low-freq/high duty cycle.
Yes, that is what I'm doing and it's working great. I control all LEDs using pwm from the attiny.
 
Last edited:

Thread Starter

johnaustinkaty

Joined Jul 16, 2021
284
You must disconnect the LM393 pin 7 (or R5) from the ATiny pin 5 first, so it doesn't interfere with operation of the new pull-down resistor. Then add the new pull-down to ATiny pin 5 to gnd, and test.
This part of the circuit is not being tested yet, so I plan to simply add the 1k PD and see what happens.
 

Thread Starter

johnaustinkaty

Joined Jul 16, 2021
284
Here is my latest schematic and PCB. I believe this incorporates all comments that needed to be addressed. Thx for taking a look before I order these boards:
Question:
My 5mm LEDs are pre wired with leads and a current limiting resistor. They are rated for 12v. I'm guessing that 2.2k resistor is not necessary? It also appears that I have some mismatched designations. I will fix them and repost. Sorry for the confusion.

FIXED SCHEMATIC AND PCB ARE ATTACHED
 

Attachments

Last edited:
Top