w7ky
New Member
I've got a pretty simple 8M pump control circuit that I want to energize a SSR to control a 220v deepwell pump. The code is below. The circuit is on a breadboard. The float switches are in one assembly I bought used on eBay. They seem to be magnetic switches and work correctly when read with a meter. When connected to the circuit, performance becomes unpredictable. I wraped the floatswitch wires around a choke which seemed to help, but did not make the circuit work dependably. The wiring is unshielded. The circuit performs best with the switch assembly removed and simulated with jumpers. Still, it does not work as I expected.
When I open the lower switch(pin2) it takes about 8sec before the pump comes on and the green led blinks. Pump is simulated with an led. If I close the lower switch within a second or two after the pump starts, the pump goes off and the green led is steady. Waiting a few seconds after pump-start to close the lower switch will keep the pump on until the upper switch(pin3) is closed.
It seems that code execution could not return to the Main block until pin3 goes high.
When the upper switch closes, the pump stops immediately and the green led is steady.
I can't understand why the long delay before pump-start when the lower switch opens and why the system becomes unstable when the float assembly is connected to the circuit. The normal resistors are installed on SI and the unused pin1 has a resistor to gnd.
I've tried turning off all the potential RF sources around my desk. It's the same place I do all electronic work and I've not had RF problems with 8M projects. Any insight would be appreciated.
--------------------
'water pump control
'pin3=high water float switch
'pin2=low water float switch
symbol Pump = 4
symbol GrnLt = 0
symbol LoSw = pin2
symbol HiSw = pin3
dirs = %000010001
Main:
Low Pump
High GrnLt
If LoSw = 0 Then PumpOn 'low float/sw (yellow)
GoTo Main
PumpOn:
Low GrnLt
High Pump
Pause 500
High GrnLt
Pause 300
If HiSw = 1 Then Main 'top float/sw (blue)
Pause 300
GoTo PumpOn
----------------------
Thanks
When I open the lower switch(pin2) it takes about 8sec before the pump comes on and the green led blinks. Pump is simulated with an led. If I close the lower switch within a second or two after the pump starts, the pump goes off and the green led is steady. Waiting a few seconds after pump-start to close the lower switch will keep the pump on until the upper switch(pin3) is closed.
It seems that code execution could not return to the Main block until pin3 goes high.
When the upper switch closes, the pump stops immediately and the green led is steady.
I can't understand why the long delay before pump-start when the lower switch opens and why the system becomes unstable when the float assembly is connected to the circuit. The normal resistors are installed on SI and the unused pin1 has a resistor to gnd.
I've tried turning off all the potential RF sources around my desk. It's the same place I do all electronic work and I've not had RF problems with 8M projects. Any insight would be appreciated.
--------------------
'water pump control
'pin3=high water float switch
'pin2=low water float switch
symbol Pump = 4
symbol GrnLt = 0
symbol LoSw = pin2
symbol HiSw = pin3
dirs = %000010001
Main:
Low Pump
High GrnLt
If LoSw = 0 Then PumpOn 'low float/sw (yellow)
GoTo Main
PumpOn:
Low GrnLt
High Pump
Pause 500
High GrnLt
Pause 300
If HiSw = 1 Then Main 'top float/sw (blue)
Pause 300
GoTo PumpOn
----------------------
Thanks