Hi Guys,
I have a real problem with Picaxe 18X locking up/resetting itself mid program.
The circuit itself is a maximum power point tracking solar regulator - basically an efficient buck dc converter with a constantly rapid changing duty cycle.
The picaxe itself is on the low voltage (battery) side of the circuit it controls a high speed opto coupler (HCPL2601) which connects to a tc4422 gate driver ic, and n channel mosfet, on the 'solar panel' side of the circuit powered from a seperate voltage regulator. The picaxe keeps track of the battery voltage by a resistor network and monitors amperage going into the battery using a max4080sasa current sensing IC. The Pic chip itself is on the very corner of the PCB board inches away from the main switching fet, and the Main Inductor.
In usual operation on a bright sunny day the input solar panel side might hover around 32v and the battery side 25v.
The circuit works very well, however when switching 5 amps and above the picaxe continually 'freezes' or 'resets' - a flashing LED will suddenly stay on, or turn off and stay off. Sometimes the PWM output will continue to run at a set duty cycle, sometimes it's off completely. The picaxe sometimes recovers, but often doesnt. This problem can also be replicated often by just touching a Multimeter probe on the +v pin and tapping it a few times (the other end of the multimeter probe not being connected to anything).
The picaxe is powered by a LM2936HV, only pulling 5ma or so maximum, there is a 0.1uF ceramic cap across +v and ground, along with a 22uF Low ESR cap. There is also a 6.2v Zener across these pins to prevent spikes to the chip
To try and stop this random freeze/reset I have so far:
- put a 1K ohm resistor on the reset pullup line along with a a 0.1uF ceramic
- put a 4K resistor across pin 3 and ground.
- put 10k resistors on unused pins to ground
- put a 1000uF low/esr cap next to the chip
- put a freewheeling high speed diode from +v to ground
- put a little metal cover across the chip (bent aluminium)
- changed the Picaxe chip for another
- modified the program heavily
- soldered directly to the chip instead of a holder
- Monitoring the voltage across +v to ground stays at 5.00V
- Monitored the current being pulled by the micro, never more than 5ma
-The picaxe outputs are only connected to a maximum of a 500 OHM resistor (which drives the opto). with two leds connected to 3K resistors online.
- I have watched the inputs from the resistor network and max4080 chip with a multimeter, never even getting above 3vots
I'm fast running out of ideas at this stage. It's obviously some sort of static/spike/feedback issue, but i'm at a loss to prevent it, any ideas would be very *very* appreciated!
I should note the dc converter is of my own design, and the board is a professionally etched dual sided board with 2oz copper also designed by me.
I have a real problem with Picaxe 18X locking up/resetting itself mid program.
The circuit itself is a maximum power point tracking solar regulator - basically an efficient buck dc converter with a constantly rapid changing duty cycle.
The picaxe itself is on the low voltage (battery) side of the circuit it controls a high speed opto coupler (HCPL2601) which connects to a tc4422 gate driver ic, and n channel mosfet, on the 'solar panel' side of the circuit powered from a seperate voltage regulator. The picaxe keeps track of the battery voltage by a resistor network and monitors amperage going into the battery using a max4080sasa current sensing IC. The Pic chip itself is on the very corner of the PCB board inches away from the main switching fet, and the Main Inductor.
In usual operation on a bright sunny day the input solar panel side might hover around 32v and the battery side 25v.
The circuit works very well, however when switching 5 amps and above the picaxe continually 'freezes' or 'resets' - a flashing LED will suddenly stay on, or turn off and stay off. Sometimes the PWM output will continue to run at a set duty cycle, sometimes it's off completely. The picaxe sometimes recovers, but often doesnt. This problem can also be replicated often by just touching a Multimeter probe on the +v pin and tapping it a few times (the other end of the multimeter probe not being connected to anything).
The picaxe is powered by a LM2936HV, only pulling 5ma or so maximum, there is a 0.1uF ceramic cap across +v and ground, along with a 22uF Low ESR cap. There is also a 6.2v Zener across these pins to prevent spikes to the chip
To try and stop this random freeze/reset I have so far:
- put a 1K ohm resistor on the reset pullup line along with a a 0.1uF ceramic
- put a 4K resistor across pin 3 and ground.
- put 10k resistors on unused pins to ground
- put a 1000uF low/esr cap next to the chip
- put a freewheeling high speed diode from +v to ground
- put a little metal cover across the chip (bent aluminium)
- changed the Picaxe chip for another
- modified the program heavily
- soldered directly to the chip instead of a holder
- Monitoring the voltage across +v to ground stays at 5.00V
- Monitored the current being pulled by the micro, never more than 5ma
-The picaxe outputs are only connected to a maximum of a 500 OHM resistor (which drives the opto). with two leds connected to 3K resistors online.
- I have watched the inputs from the resistor network and max4080 chip with a multimeter, never even getting above 3vots
I'm fast running out of ideas at this stage. It's obviously some sort of static/spike/feedback issue, but i'm at a loss to prevent it, any ideas would be very *very* appreciated!
I should note the dc converter is of my own design, and the board is a professionally etched dual sided board with 2oz copper also designed by me.
Last edited: