Erratic 14m2 when using v2 above certain voltage

Protoproff

New Member
Hello Can anyone help im new to PIC chips and this forum hoping i will find answer as referred here by Tech Support from Picaxe. Im having erratic behaviour with 14m2 when using v2, driving 2 motors via l293. When 3.7v battery used on v2 all is ok , however any higher voltages used ie 7.2v battery pack then i get motors continuing on and program erratic.
I have directly linked 14m2 to l293d no external components except 2 104
caps across motors and 22k and 10k for 14m2. Outputs from 14m2 direct to
l293 input and output from l293 driving 2 motors a & b, am i getting voltage spikes causing program to jump and should outputs from 14m2included inline resistors?? I hope this makes sense I have a pixace boardaxe020and wanted to make my own circuits smaller, noticed additional components on board, can anyone make sense.
Thanks Arif
 
Last edited by a moderator:

Protoproff

New Member
You say you have the link connecting V1 and V2 fitted? See post 2.
Hello mate thx for the reply, v2 shares common earth with 0v however im trying to use 7.2v to power the motors using seperate power via v2 this is where the problems arise with programme looping and motors running erratic, if i drop v2 to 3.7 motor work fine but slower as 6v motors and programme runs smoothly.
 

Goeytex

Senior Member
As I understand, you are using a 14M2 and a L293 (on a breadboard?) There is a download circuit (2 resistors) and there are 100nf caps across the motor leads and across the Picaxe Power pins. There are separate supplies for the Picaxe and the Motors, with the grounds tied together.

Is this correct ?

The L293D has internal diodes for noise suppression so there should not be an extreme amount of noise. If you have the L293 (no D) you should use external clamping diodes. See the Datasheet Page 2. You said you were getting noise spikes, but your did not say where you observed the spikes. Were the spikes observed on the V+ Supply for the Picaxe ? or somewhere else ?

I would suggest a 100uf cap in parallel with 100nf cap on each of the the L293D Power Pins ( Vcc1 & Vcc2). And also a 100uf in parallel with a 100nf cap where the 4.5v from the battery pack connects to the breadboard. And of course, a 100nf cap directly across Legs 1 and 14 of the Picaxe. If you have a scope, observe the Picaxe Leg 1 (+V) when the motors are running.

If this does not solve the problem then I recommend you take a clear close up photo and post it here so we can better see what's going on.
 
Last edited:

Protoproff

New Member
As I understand, you are using a 14M2 and a L293 (on a breadboard?) There is a download circuit (2 resistors) and there are 100nf caps across the motor leads and across the Picaxe Power pins. There are separate supplies for the Picaxe and the Motors, with the grounds tied together.

Is this correct ?

The L293D has internal diodes for noise suppression so there should not be an extreme amount of noise. If you have the L293 (no D) you should use external clamping diodes. See the Datasheet Page 2. You said you were getting noise spikes, but your did not say where you observed the spikes. Were the spikes observed on the V+ Supply for the Picaxe ? or somewhere else ?

I would suggest a 100uf cap in parallel with 100nf cap on each of the the L293D Power Pins ( Vcc1 & Vcc2). And also a 100uf in parallel with a 100nf cap where the 4.5v from the battery pack connects to the breadboard. And of course, a 100nf cap directly across Legs 1 and 14 of the Picaxe. If you have a scope, observe the Picaxe Leg 1 (+V) when the motors are running.

If this does not solve the problem then I recommend you take a clear close up photo and post it here so we can better see what's going on.
Hello this is my circuit diagram if it makes sense unfortunately i made a hard pcb circuit which eliminates prototyping, thought i had it in the bag.PICAXE 14M2.png
 

Protoproff

New Member
Did you actually check that was the voltage from the batteries ?
I have tried 3 new cells, the problem is only there if i use a battery pack on v2 above 6volts below that and the programme seems to run perfect the motors are rated at 4.5v, if i use 7.2 volts using 2x 18650 batteries then i get erratic motor and and programme response, motors run and stop as programmed and then restart without being commanded.
Hope im making sense this is copy of my circuit, sorry its a difficult one. PICAXE 14M2.png
 

Protoproff

New Member
PICAXE 14M2.pngI think ive worked out what the problem is, if i use very small motors non geared then everything works fine, however if i use small toy 3v motor which is geared then problems arise.
Could it be that im drawing too much current as hbridge does get quite warm we continuous usage, could i upgrade the L293D and could you recommend an alternative?? maybe L298n, also included my circuit diagram, knocked up on diptrace.
 

Goeytex

Senior Member
ProtoProf,

So far you have not answered most of the questions that were asked. Please go back and read through the posts and try to directly answer as best you can.

Ordering boards before having a working and debugged prototype is generally not a very good practice.

Did you add the capacitors as suggested. Yes or no ?

There is nothing wrong with the L293D getting warm and that does not necessarily indicate a problem. It has internal thermal shutdown circuitry and will turn off it it gets too hot. Is it turning off ? Did you place a heat sink layer on the PCB per the Datasheet ?

Why are you trying to operate a 3V motor at 7.2 volts? That does not seem to be a very good idea.

Are the non geared motors also rated at 3 volts?

If you suspect too much current is being drawn then you should measure the current instead of guessing. The L293 is rated at 600 ma continuous current, if that is being exceeded then it is too much. No need to guess. Simply set your DVM to AMPS and put it in series with the 7.2v supply. My guess is that trying to run a 3v motor at 7.2v may be too much. But best to measure instead of guess.

Your conclusion seems to be a guess. It may be correct, but before I would draw that conclusion I would address the noise issue and add the caps as suggested and take some measurements. I also suggest getting a breadboard and making a working prototype and then order new boards if needed.

You do not need to attach a schematic with every new post unless it has changed. If it has changed then you should indicate what the change is.
 
Last edited:

Protoproff

New Member
Goeytex,

I did add caps as recommended, i did originally prototype using breadboard only difference being motors were 3v un-geared and not driving anything.
I then made a hard copy , double sided pcb thinking all was good, sadly switching over to the 3v geared motors is where i encountered problems, and yes i have guessed in some areas rather than measuring. should have known better. I will measure current reading tommorow i suspect motors are drawing to much current and L293 getting hot even though heatsink implemented.
I was trying to get a bit more speed out of the motors hence i used higher voltage when both motors on a 4.5v supply, just doesnt cope, thats using v2 with batt pack.
My pcb version works perfect with the un-geared motors, maybe i need to redesign using l298n.
Sorry im not the best with forums.
 

Goeytex

Senior Member
I think maybe you should find a motor that runs at the correct speed within it's rated voltage / current specifications. Then use a driver that can handle that with some room to spare. .
 
Top