Unstable Laptop w. USB cable

inglewoodpete

Senior Member
I'm debugging some PICAXE software using a Laptop and USB I/F cable (prolific chipset).

The system is a 28x1 driving an L298 H-bridge, powered from a 12v lab supply and on-board 5v regulator. Everything goes fine until a 12v motor is connected to the H-bridge. The motor works more-or-less as expected (AXE software is still being developed).

Here's the catch. The PICAXE seems to remain stable but when I come to download the next revision of code I find that the download won't work. Unplugging and reconnecting the USB cable at the laptop does not rectify the problem. Only rebooting the PC will get it going again.

Has anyone else experienced something like this? Next question, what was your solution?
 
Last edited:

slurp

Senior Member
Does the USB cable stay connected when you run the motor?

I find the biggest problem in all my circuits is motor noise and unexpected dips in the supply due to load (even small load on poor circuits layouts). If the USB is still connected I wonder if the noise is making it's way to the interface and locking up the port with some unintended signal.

Are you getting an error message when the down load fails?

regards,
Colin
 

inglewoodpete

Senior Member
I'm fairly sure the problem is motor noise. In my experience, the PICAXE will restart or goes off the rails ("crash") with commutator noise before the USB interface in the computer locks up.

As I said, the power supply is a fairly beefy one (can supply several amps) - I don't have the model details at the moment.

I, too, suspect that motor noise is getting up the programming lead somehow. I have thought of adding ferrite beads to the programming wires connecting to the board (the setup uses a 0.1" header plug for the serial in/out).

I need the programming lead to be connected for data logging when I get to that point. I think that logging will not be possible, either, until the problem is overcome. I was hoping that someone might have a magic cure.

Late edit: XP on a Harmon Kardon laptop (not mine so I don't have further details).
 

slurp

Senior Member
I know what you mean about PICaxe reset, I think that this may be similar but might be affected by differing thresholds.

I think that we can get stuck on our 5v getting too low (get a bigger power supply?) when the real problem is out 0v getting too high (route the circuit better!).

What is the resistance between the 0v on contoller (or serial interface) and supply point? Does the "high" current from the motor get routed past these connection or via some other route? I find I have to work hard against my PCB layout software to stop it placing in appropriate 0v links.

Does this help?

regards,
Colin
 

inglewoodpete

Senior Member
Does the "high" current from the motor get routed past these connection or via some other route? I find I have to work hard against my PCB layout software to stop it placing in appropriate 0v links.
Thanks for your thoughts, Colin. I'm suspecting that there is 'noise' on the 0v rail at the serial programming connector, too. I'll try a ferrite bead or two near the connector.

Due to the layout of the project, it may be necessary to use separate power feeds for motor and PICAXE and have optoisolators keep the 0v rails separate at the PICAXE. Unfortunately that could mean a lot of duplicated 12v power wiring.
 

inglewoodpete

Senior Member
Due to the desperately tight timeframe I'm working to, I have not tried the ferrite beads.

A second laptop (Dell) is a little more resilient. Just occasionally, the USB port locks up (presume its the same reason). In this case, unplugging and reconnecting the USB plug resets the port. Sure beats rebooting the PC.

For people in Perth Western Australia, you may be interested in the ArtRage exhibit that we are working towards this Friday 7th Nov. The ultimate goal is to have over 60 PICAXES networked via i2c and the internet, although I don't think the team will have all 60 units assembled in time. Silent Barrage at ArtRage
 
Last edited:

tiscando

Senior Member
Try connecting capacitors on the picaxe's 5v and 0v pins (as close to them as possible). (Have you already done this?) This would smooth the 5v voltage in the event of a large pulse of current usage
 

inglewoodpete

Senior Member
We already have a 100nF capacitor near the PICAXE. The PICAXE chip itself appears to be stable. The problems appear at the laptop. We will alse try a larger cap where the 12v supply enters the board in an effort to the smooth the 0v rail.
 

inglewoodpete

Senior Member
Yes, its very likely there are some shared 0v lines on the board (Ie logic and motors sharing the same track/s). The difficulty is that I am not the board designer.

It's a double sided board with lots and lots of SM devices, although thankfully, the PICAXE is a DIP. I have a hard copy of the circuit but no copy of the board layout. I don't think there is much point of attaching one without the other.

We may go to a Mark 2 version of the board and if so, I'll be more involved with the design.
 

BeanieBots

Moderator
Just had another scan of the whole thread.
No mention of motor suppression.
At the motor, 100nF across motor and 100nF from each lead to motor case.
Much better to stop noise comming out of the motor than trying to 'slug' it once it gets to the board.
 

tiscando

Senior Member
Could it be a driver on the first laptop that steals the USB port that the picaxe download lead is connected to?
 
Last edited:

inglewoodpete

Senior Member
BB: Currently, the motor has a 100nF and a 47uF non-polarised caps across its terminals. There is a 30mm ferrite sleeve over both wires within 50mm of the motor. The case of the motor is earthed via the board.

We do not have 100nF between the motor terminals and the case (yet) - thats another option. Another option is to run 12v to near the motor and use it via fast diodes arranged in a bridge to quench spikes to to 0v and 12v.

There are a number of options available. My query was really about whether others had had the same problem: a stable PICAXE but unstable PC. Thanks for all your replies.
 

BeanieBots

Moderator
If it's just the USB giving problems, then my first port of call would be a "clamp" ferrite on the USB cable. Put a few turns on it.
Try REMOVING the earth connection to the motors.
 

inglewoodpete

Senior Member
Unfortunately, it will not be possible to isolate the earth connection from the main motor.

This may sound a little complicated (how did I get myself into this?).....

The main motor is attached to the top of a 2 metre high, vertical, PVC 'pole' made of 90mm stormwater pipe. This motor raises and lowers, via a lightweight cable and counterweight, a 'print head' that is assembled around the pole with rollers etc for smooth running.

A 2m length of nichrome wire is stretched up the pole, attached to the motor bracket at the top and a 5v point at the bottom. A wiper on the print 'head' connects to an ADC input of the controlling PICAXE: the wire and print head assembly works as a large, low resistance potentiometer. The PICAXE then controls the height of the print head, using the ADC as feedback.

We have the exhibition launch this Friday, so I will have very little oportunity to make changes to the hardware until after that. We also have a photo opportunity with the newspapers during setup on Thursday....

The system works, albeit with these annoying random lockups of the PC. So we will suffer the problems: "The show must go on".

Sorry if I'm providing information in small bits. I could write War and Peace to describe the whole project and time is short. (It's 10:00pm in Perth at the moment so I'll be offline while I catch some zzzz's)
 
Last edited:
Top