PWM issues from solar charge controller

Hello,

I have a 12V solar panel connected to a cheap e-bay Solar 30 PWM controller and a Lucas 22Ah battery.

I have built a very simple Arduino project which has MOSFET and a high power led controlled by PWM at about 25% duty cycle. All of these are 3.3V using LF33CV as step down LDO.

The above works just fine using a bench power supply, drawing about 50mA at 12V. The LED is steady on.

However, when powered from the above solar controller the circuit seems to be stable for about 2-3 seconds and then the LED starts to flash quickly.

The battery voltage seems fine at 13.2V and if I power the circuit directly from the battery it works.

Any idea why is this happening?

Thanks.

I think I have found the answer, it starts with decoupling and ends with caps.

I'll give it a try tomorrow.

Problem fixed after adding the capacitors.