Author Topic: Earth ground referenced comparator  (Read 7077 times)

0 Members and 1 Guest are viewing this topic.

Offline okwTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: no
Re: Earth ground referenced comparator
« Reply #50 on: June 05, 2023, 10:39:05 pm »
It's easier to follow in Eagle, than on a separate image :)
R24 is not mounted, just a backup solution if timeout and alarm isn't needed (and 555 timer isn't mounted).
« Last Edit: June 05, 2023, 10:40:38 pm by okw »
 

Offline okwTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: no
Re: Earth ground referenced comparator
« Reply #51 on: June 12, 2023, 12:57:34 pm »
Finally I had time to realize this into a PCB.
Sadly the 555 timer doesn't start countdown unless the 555 trigger (signal !AUTO_FILL_ON) goes high again.
But !AUTO_FILL_ON is dependent on water level sensor and will stay low until water level is satisfactory.
I see some designs adding a pull up and a capacitor to make it an edge-trigger, but I can't manipulate the !AUTO_FILL_ON as this is part of the NOR gate to compare !AUTO_FILL_ON and PUMP_ENGAGE.
When both are low (pump is running but water level is still low after ~60 sec), it gives a buzzer alarm + pump stops.
Any idea how to fix the 555 circuit?
I've edited your diagram because the Net-Names were not helping me follow the circuit. I'll have to look at this again a bit later, but my edits may help others:

Did you have a chance to check it out?
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1367
  • Country: ca
Re: Earth ground referenced comparator
« Reply #52 on: June 12, 2023, 10:47:30 pm »
Finally I had time to realize this into a PCB.
Sadly the 555 timer doesn't start countdown unless the 555 trigger (signal !AUTO_FILL_ON) goes high again.
But !AUTO_FILL_ON is dependent on water level sensor and will stay low until water level is satisfactory.
I see some designs adding a pull up and a capacitor to make it an edge-trigger, but I can't manipulate the !AUTO_FILL_ON as this is part of the NOR gate to compare !AUTO_FILL_ON and PUMP_ENGAGE.
When both are low (pump is running but water level is still low after ~60 sec), it gives a buzzer alarm + pump stops.
Any idea how to fix the 555 circuit?

I think this would be the easiest way to fix the problem. Does the PCB layout prevent you from inserting at small capacitor between the "!AUTO_FILL_ON" wiring and pin 2 of the 555 by cutting the trace, and also adding a pullup between pins 2 & 4 of the 555? Or you could bend pin 2 of the 555 up before soldering it to the PCB... It wouldn't be very pretty though.

It's too bad that the power pins on a 555 are opposite that of a PIC12F675 (Or similar 8 pin MCU) because it would be trivial to program one to replace the 555. Hmmmm... Is the PCB set up for a through-hole 555? If so, you could mount a PIC12F675 from the solder side and then the power pins would be the correct polarity. But this would require MCU programming, which might be an issue if you don't have the tools/skills for that.


« Last Edit: June 12, 2023, 11:02:26 pm by Kim Christensen »
 

Offline okwTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: no
Re: Earth ground referenced comparator
« Reply #53 on: June 12, 2023, 11:28:56 pm »
I think this would be the easiest way to fix the problem. Does the PCB layout prevent you from inserting at small capacitor between the "!AUTO_FILL_ON" wiring and pin 2 of the 555 by cutting the trace, and also adding a pullup between pins 2 & 4 of the 555? Or you could bend pin 2 of the 555 up before soldering it to the PCB... It wouldn't be very pretty though.

It's too bad that the power pins on a 555 are opposite that of a PIC12F675 (Or similar 8 pin MCU) because it would be trivial to program one to replace the 555. Hmmmm... Is the PCB set up for a through-hole 555? If so, you could mount a PIC12F675 from the solder side and then the power pins would be the correct polarity. But this would require MCU programming, which might be an issue if you don't have the tools/skills for that.

Yes, I can do both the cap and pullup. So I'll try that tomorrow and see how it goes.

Actually, I'm avoiding MCUs this time as I've programmed my fair share. I flet it was time to go old-school and learn a bit new (old) stuff.
 

Offline okwTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: no
Re: Earth ground referenced comparator
« Reply #54 on: May 03, 2024, 11:12:49 am »
A follow up on this. I finally managed to redesign and test the circuit. I decided to temporarily remove the 555 time-out alarm as the trigger needs to be toggled to start counting, not just stay low. And it's not a critical feature now. I could have removed the 7402 inverter and pulled the optocoupler (PUMP_ENGAGE) and relay signal (!AUTO_FILL_ON) directly after R9, but I left the inverter in place, as I hope to get the timer working later.
However, I see 426mV on the optocoupler when it should be 0V. On high, I see 1.15V which is the forward voltage of the LED, so all good. I'm not sure if this will cause any issues with the optocoupler.
I removed R19, and the optocoupler input is 0mV. What's the trick here? If there is a simple mod for the existing PCB it would be good.
And a more fundamental redesign for my next revision?
Also does the relay transistor need a pull-down?
« Last Edit: May 03, 2024, 12:18:46 pm by okw »
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1367
  • Country: ca
Re: Earth ground referenced comparator
« Reply #55 on: May 03, 2024, 03:39:46 pm »
However, I see 426mV on the optocoupler when it should be 0V.

I assume you mean 426mV across pins 1&2 of the optocoupler. If so, this shouldn't be a problem since 426mV is not enough to light the LED in the opto and turn its TRIAC on.

Quote
On high, I see 1.15V which is the forward voltage of the LED, so all good. I'm not sure if this will cause any issues with the optocoupler.
I removed R19, and the optocoupler input is 0mV. What's the trick here? If there is a simple mod for the existing PCB it would be good.

The reason for the 426mV across pins 1&2 of the optocoupler is because R19/Q1 is loading the output of IC2B (pin4) when it goes high.
This means pin-4 only goes up to 4.574V (5V - 426mV assuming a 5v supply)

Like I said, it's not really a problem, but if you changed Q1 to a MOSFET and eliminated R20 this "problem" would go away.
Another option would be to increase R19 to 1.2k (assuming a worst case beta for Q1 of 20) which would reduce the current draw from IC2B. (pin4). This would reduce the voltage to something lower than 426mV.

Quote
Also does the relay transistor need a pull-down?

If the output of IC2B (pin4) doesn't go lower than apx 700mV when it's low, then Q1 will not turn off. R19 & R20 can form a divider so that the voltage on Q1's base is less than 350mV when pin-4 goes low.
« Last Edit: May 03, 2024, 04:03:35 pm by Kim Christensen »
 

Offline okwTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: no
Re: Earth ground referenced comparator
« Reply #56 on: May 03, 2024, 04:26:34 pm »
Thanks :)

If the output of IC2B (pin4) doesn't go lower than apx 700mV when it's low, then Q1 will not turn off. R19 & R20 can form a divider so that the voltage on Q1's base is less than 350mV when pin-4 goes low.

If I replace Q1 with either 2N7002LT or BSS138LT1G, what should I be considering? I guess 1k base resistor is OK? And drop R20 (or 100k)?

Is MOC3083 (zero-cross) and Z0103MN a suitable choice for a 240V 48W vibration pump (on max 1-2 min worst case, usually 3-10 sec every 30 min)?
Regarding the values for snubber (R25/C2), gate bleeder (R21) and backlash (R23), I just used what was in the datasheet, but that was for resistive loads. Any enhancements here?
The datasheet says R25 (39R) should be increased to 360R with highly inductive loads. I don't know if mine is highly or slightly.
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1367
  • Country: ca
Re: Earth ground referenced comparator
« Reply #57 on: May 03, 2024, 07:45:29 pm »
If I replace Q1 with either 2N7002LT or BSS138LT1G, what should I be considering? I guess 1k base resistor is OK? And drop R20 (or 100k)?

The BSS138LT1G is a better choice due to it's lower gate voltage turn-on requirements. You can safely leave R19 at 560 \$\Omega\$  and eliminate R20.

I'll leave the TRIAC questions for others to answer...
 
The following users thanked this post: okw

Offline okwTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: no
Re: Earth ground referenced comparator
« Reply #58 on: May 06, 2024, 01:16:52 pm »
You still need protection on that LEVEL_SENSOR input.  I am attaching a possible circuit.

I have a question. I've played around with the circuit you attached. I put a potentiometer in place of the inverting input pull-up and removed the feedback resistor. Found out at 17.1k pull-up on the inverting input it switched when water level was perfect. So I'll put in a 18k resistor (no need for perfection). Then a potentiometer in place of the feedback resistor and 1M seems to give an OK hysteresis. I also added a 100k/10uF RC delay on the output (after the feedback resistor).
Anything to consider when having such a gap (18k/1M) on the divider?

I also put a 1206 0R resistor in series before the 1k you drew up, and a 32V zener to ground. And a 1206 0R resistor between earth ground and logic ground. Are those reasonable for added input protection?
Given the worst case scenario (rupturing heating element, momentarily 240V into the water (earth ground) before the 20-25mA ground fault circuit breaker kicks in.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf