Hey guys, I am running a mosfet power circuit to turn some loads on/off and I'm using a resistor soldered in the circuit to sink the gate voltage, but I'd like to use my Arduino to control the mosfet and I want the gate to stay energized when I reset the arduino. Sometimes I need to reset it a few times a day, and I can't be having the devices go on/off like that... What's the easiest way of going about this? I thought that when you set a pin to LOW, that it effectively turns it in to a ground? From my testing I see that it just turns the pin off. Would be nice if I could control the mosfet's some way in the code, like HIGH/LOW...
Any thoughts?Thanks!I had thought about using a capacitor on each mosfet, that way it would take longer for the pin to sink through the resistor while the Arduino is resetting?
I'm having to reset because the Arduino also does temperature control via PID algorithm, and sometimes when I open the door it screws the PID up and it way overshoots and then goes into an oscillation that takes a little bit of time to self-correct... So I will manually reset to help avoid that.
Quote from: FlyingSteve on Dec 06, 2011, 09:56 pmI'm having to reset because the Arduino also does temperature control via PID algorithm, and sometimes when I open the door it screws the PID up and it way overshoots and then goes into an oscillation that takes a little bit of time to self-correct... So I will manually reset to help avoid that. Rather than deliberately crashing the Arduino and trying to minimise the effects of that, I suggest you start by trying to correct the PID parameters. If it's oscillating, perhaps you don't have the derivative feedback set high enough. If you really can't sort that out then you could simply clip the control signal to around the normal steady-state condition so that it doesn't have as much authority to induce these transient overshoots. And if you can't even do *that* then fit a 'reset' switch which leaves the Arduino running but just tells you sketch to restart the PID algorithm.Trying to come up with clever drivers that will hide the Arduino reset feels like a solution to the wrong problem.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16