ATmega168 circuit not working without Arduino regulator

arduinoatmegaavrstepper motorvoltage-regulator

I am having this very strange issue with my stepper motor driver circuit which uses an Atmega168 an L293 h bridge that appears to not want to function without an Arduino (Uno) connected to 3V3 and ground.

Some more detail would be that the h bridge is powered by a 12V dc power supply that is "chopped" to about 3V with a mosfet and pwm from the Atmega. Whilst developing the circuit VCC (for the Atmega and L293) was provided from the 5V pin on the Arduino. I should mention that this circuit works fine with the above setup.

My issue came in when I tried to make it standalone by hooking up a 3V3 regulator (TS1084) to the 12V supply in order to provide VCC because once doing that nothing seems to be really going on after powering up the circuit, very feint vibrations can be heard from the stepper but the pwm pins that should be feeding the h bridge all seems not be outputting anything though.

This all seems like some strange problem caused by the regulator or the different voltage but the strange thing is that after another few attempts I accidentally left the 5V pin of the Arduino connected to the 3V3 rail in the circuit as well as the ground connected to the ground and the moment I powered on the circuit everything starting working and the Arduino also went on. The moment I disconnect the 5V of the Arduino though everything stops and upon reconnecting it everything starts again. I have checked though and with the Arduino connected the VCC across the circuit still remains at 3V3, so the Arduino isn't making 5V somehow.

This whole thing has got me rather baffled and the only thing I can think of is that the Arduino's regulators are doing something but that does not really make any sense.

ALSO, I have no idea if this is related but whilst operating the 3V3 circuit with the Arduino connected the regulator gets extremely hot and constantly goes into thermal shutdown after a while if I do not put a fan on it.

If any of you have ever seen something like this or know of any way to do so please help!

EDIT:
I have now tested the circuit with a 1A 5V regulator rated for up to 35V input and it does work with this regulator (NCP7805TG). What I have noticed with the 3.3V one though is that it might the problem seems to come from connecting the pwm pin of the atmega to the mosfet, once I disconnect it or place a large resistor on it the atmega starts reading voltages on its pwm pins again. I am therefore guessing that this is somehow putting to much strain on the regulator but it still does not explain why hooking the arduino up in parallel has any effect what so ever.

PS. I will probably only come around to making a schematic some time tomorrow if it is really needed but I think everything is described properly enough.

ALSO, the fact the it is on 3.3V does not seem to be a problem because it works fine if I use the first setup mentioned in the post but running from the 3V3 pin on the Arduino instead of the 5V pin.

Best Answer

The L293 and most variations are 4.5v minimum VCC. That is why you are not getting the Stepper motors to run.

The TS1084 is a Linear Regulator with MAX input of 12v. You are wasting (VIN - VOUT) * IOUT in heat. That's (12v - 3.3v) or (8.7v) * IOut. Even if just half an amp, that's 8.7v * 0.5A or 4.35 Watts! of energy into heat.

Tj = (Pd · θJa) + Ta ( 4.3W * 80°c/w ) + 21°c = 369°C Junction Temperature for the T0-220! It's operating range is MAX TJ of 125°C. Of course it would go into thermal shutdown.

You need a switching regulator, because any reasonable amount of current from a 12v IN to a 3.3v out linear regulator, will cook it.

Also, you don't list the mosfet used, so we can't check it. I assume it also is limited to a higher voltage range. Same goes for the stepper motors. 3.3v might not be enough if that is what you are running them at.