I tried several searches (relay pwm*, smooth pwm*, pwm* on* off*, pwm* darlington, etc) but couldnt really come up with anything that matched what I am looking for.
Basically, I want to simultaneously drive a PWM solenoid valve, and actuate a standard electromechanical relay from the same PWM output on the PICAXE. The reason Im not just using one PWM output for the solenoid, and then a separate digital output tied to a darlington transistor to drive the relay, is because I am all out of available pins, and my PCB size will not accommodate a larger PICAXE.
When the solenoid valve is actuated, it ramps up from 0% duty cycle to 98% duty cycle over a time period of roughly 1 second. The solenoid is not designed for 100% duty cycle, which is why I ramp it up to 98% and hold it there until I want to turn it off/close the valve. Then I have an additional electromechanical relay (to trigger a separate non-PWM on/off valve) that I want to trigger at the same time the PWM solenoid is ramped up/turned on.
It is not time-critical when the relay is triggered over the course of the ~1 second PWM ramp-up to the solenoid, just as long as the relay transitions from "off" to "on" by the time the PWM has ramped up to 98%.
The MOSFET is a logic-level N-channel ST-Micro P20NF06L, which I have hooked up to the PWM output via a 330ohm resistor for protection.
I have attached a rough schematic (please excuse the MS Paint drawing!) of what Im thinking might work. I didnt draw in all of the details on the schematic, but the 5v supply is all properly regulated. The circuit already works perfectly to drive the solenoid, I just want to add in the additional "on/off" relay-trigger portion.
If I add in a 1N4004 diode, and then a capacitor (as shown), and then tie that into a darlington array (ULN2003), and then drive the relay with the ULN2003...will that be a sufficient circuit to "translate" the PWM signal from the PICAXE into a steady-state "high" logic level for the ULN2003? And will that little addition to the circuit otherwise affect proper PWM operation of the MOSFET?
In other words, will this circuit shown in my schematic properly "split" the signal coming from the PICAXE...with "part of the signal" going to the MOSFET as PWM, and the other "part of the signal" going to the ULN2003 as an "on/off" signal?
Also, im not sure what kind of capacitor I should use (polarized cap or not??), and what value would be needed....100uf?
thanks
Ben
Basically, I want to simultaneously drive a PWM solenoid valve, and actuate a standard electromechanical relay from the same PWM output on the PICAXE. The reason Im not just using one PWM output for the solenoid, and then a separate digital output tied to a darlington transistor to drive the relay, is because I am all out of available pins, and my PCB size will not accommodate a larger PICAXE.
When the solenoid valve is actuated, it ramps up from 0% duty cycle to 98% duty cycle over a time period of roughly 1 second. The solenoid is not designed for 100% duty cycle, which is why I ramp it up to 98% and hold it there until I want to turn it off/close the valve. Then I have an additional electromechanical relay (to trigger a separate non-PWM on/off valve) that I want to trigger at the same time the PWM solenoid is ramped up/turned on.
It is not time-critical when the relay is triggered over the course of the ~1 second PWM ramp-up to the solenoid, just as long as the relay transitions from "off" to "on" by the time the PWM has ramped up to 98%.
The MOSFET is a logic-level N-channel ST-Micro P20NF06L, which I have hooked up to the PWM output via a 330ohm resistor for protection.
I have attached a rough schematic (please excuse the MS Paint drawing!) of what Im thinking might work. I didnt draw in all of the details on the schematic, but the 5v supply is all properly regulated. The circuit already works perfectly to drive the solenoid, I just want to add in the additional "on/off" relay-trigger portion.
If I add in a 1N4004 diode, and then a capacitor (as shown), and then tie that into a darlington array (ULN2003), and then drive the relay with the ULN2003...will that be a sufficient circuit to "translate" the PWM signal from the PICAXE into a steady-state "high" logic level for the ULN2003? And will that little addition to the circuit otherwise affect proper PWM operation of the MOSFET?
In other words, will this circuit shown in my schematic properly "split" the signal coming from the PICAXE...with "part of the signal" going to the MOSFET as PWM, and the other "part of the signal" going to the ULN2003 as an "on/off" signal?
Also, im not sure what kind of capacitor I should use (polarized cap or not??), and what value would be needed....100uf?
thanks
Ben