servo interference due to toy motors

Hi

The problem I am having is that whenever one of the motors run (conveyer or cup dispenser, it activates the servo program operating the servos (crane)

http://www.youtube.com/watch?v=oPUkO93n0bU&feature=channel

Hand drawn diagram attached, sorry a bit messy

Originally, I was not using the batteries, and would rather not. But I did think this would fix the problem by completely isolating.

The inputs are controlled by microswitches which are piggybacked, one for the 20M and the other for the SD21 board (this is fitted with an 18X chip), see photo.

It must be (I think) noise interference caused by the motor, however up to date have not being able to fix it

Any ideas?

regards
michael
 

Attachments

boriz

Senior Member
Unconnected inputs on the Picaxe are very high impedance and can act like little antenna. You should ground all unused inputs. Maybe the same goes for the SD21?

For pins that could be input or output, ground through 1k resistor.

What is the stall current for your motors?
 

boriz

Senior Member
Does it only 'trip out' when the motor is connected to relay 4? What about when connected to relay 1 or 7?
 

InvaderZim

Senior Member
I had trouble reading the way the relays are wired.

Is this another case of the motor diodes being reversed? I think if it is set up that way the diodes will short the 12V supply when the relays kick on and mess everything up.
 

BeanieBots

Moderator
Is this another case of the motor diodes being reversed?
Probably, it certainly looks like they are the wrong way around but that circuit is such a mess it's hard to tell. If the real thing is anything like the drawing, my hunch would be a layout problem!
To me it looks like the magic box (relay) switches earth to an earthed motor and could never work but those boxes (relays?) also have the supply (via a diode) going into them. If they supply volts to the motor, then the clamp diodes are the wrong way round and will short the supply when the relay is energised.

As for randomly throwing caps at a noise problem, in the wrong place they can make things worse. Large caps on HF noise will have zero effect.

Many noisy toy motors can be suppressed with the application of three 100nF caps. One between the two motor terminals as close as possible to the motor and one between each terminal and the motor case.
 
Thanks for the quick replies

All the input pins on the 20M project board are held low using 10k resistor array.

All the input pins on the 18x are also held low using 10k resistors

Stall current on the conveyor is aroun 0.7amps

What is a CRO?

The 20M board runs through its process fine, opening and closing soloniods, running the various motors etc:

My current problem is the interference that seems to be caused by the motors. More easily explained on the link below and the attachments

http://www.youtube.com/watch?v=1TZnOS8N0wo


I have not had a chance to try the 3 100nF capacitors on the motors.

regards
michael
 

Attachments

inglewoodpete

Senior Member
I'd be looking at the ground current paths but I have no idea from the circuit diagram(!).

Michael, while the 0v/com/earths need to be connected together, it is important that noisey (motor/servo) return current does not share a path with the logic circuit. Perhaps a photo of the controller boards/power supplies would help us.

Edit: ignore that last sentence: I just viewed youtube. Comment on the electrics: Oh, bloody hell. However, you've obviously put a lot of thought into the mechanicals.

Edit2: I had a look at your file "relay_circuit.pdf". I'd add a diode across each relay coil. They're too far away from the ULN2803 for the internal diode in the ULN20803 to to anything but protect itself.
 
Last edited:
thanks for the quick reply

When I get a chance I will place a diode accross the relays. Is there a difference between 1n4001, 1n4004, and 1n4007 that should concern me?

I did have the diodes drawn the wrong way for the motors in the high quality circuit diagram

As in the youtube example all I have to do is run either motor directly (without the relay operating) and the SD21 program starts. I cannot seem to stop this.

regards
michael
0416059960
 

inglewoodpete

Senior Member
Brief lesson on diodes. 1N4001, 4 and 7 refer to the peak inverse voltage (piv) of each model of diode: 100v, 400v and 700v respectively.

Your relays operate at 12v. So the maximum reverse votage across the diode (Ie in the non-conducting or inverse direction) would be 12v. Any of those diodes will do.

As in the youtube example all I have to do is run either motor directly (without the relay operating) and the SD21 program starts. I cannot seem to stop this.
By "starts" I presume you mean "restarts" ? That suggests the earth current problem that I referred to earlier.
 

SAborn

Senior Member
Just to follow up on IWP comment on diode voltage, the voltage through the diode will be far greater then the supply voltage then the relay turns off.

It will be a short high voltage spike the can be in the 100's of volts.

As IWP said any diode will do but the higher value ones would be a better choice.

For a experiment you can place a neon pigtail globe across the relay coil terminals, energize the relay with 12 volts and the globe wont light.

Switch the relay off and the neon globe will flash once.

From my understanding it takes around 90 volt to fire a neon globe.

Place a diode also across the relay coil terminals and the globe wont flash.

Its just a simple experiment i used to demonstrate emf from coil and the filtering of it.
 

techElder

Well-known member
The voltage rating on the diode is the PIV. This is the voltage during 'normal' operation in the case of the relay, because the diode is placed in the circuit in a 'reverse biased' condition.

When a relay coil is turned OFF, the resulting high voltage is FORWARD biasing the diode.

This has nothing to do with the PIV or REVERSE bias voltage in this relay kickback suppression circuit.
 

inglewoodpete

Senior Member
To confirm what taxasclodhopper says: the PIV of the protection diode is not important when only 12v is being applied to the coil. There is no benefit in using a higher voltage diode.

Immediately after the supply to the coil is turned off, the diode begins to conduct and the voltage generated by the collapsing magnetic field is limited to the forward voltage of the diode - usually a maximum of about 1 volt. The current can be quite a high spike, though. (So don't use a small signal diode.)
 
hi

from beaniebot

"To me it looks like the magic box (relay) switches earth to an earthed motor and could never work but those boxes (relays?) also have the supply (via a diode) going into them. If they supply volts to the motor, then the clamp diodes are the wrong way round and will short the supply when the relay is energised."

A 12volt supply goes straight to the relay coil. The other side of the coil
goes to the output of the darlington driver.

Does this mean it would be better if I ran +12v through the relay instead of the ground (to the motors, soloniods etc:)

I placed diodes across the relays

The 3 100nF caps worked. The motors no longer activate the SD21 servo board. (this has solved a problem that I have had for months, thanks again)

regards
michael
 

hippy

Technical Support
Staff member
The commonest way to wire relays is "high-side" as shown in PICAXE Manual 3; the relays switched by transisor, darlington transistors or FET +V to one side of the relay coil, the other side 'switched' by those to 0V.

For actual motor or solenoid control using the relay contacts, that's a switch which could probably be put "high-side" or "low side" and probably makes little difference which. It's perhaps more common to wire loads as low-side and that's usually the case in vehicles which have a 0V chassis ( negative earth ).
 

BeanieBots

Moderator
Does this mean it would be better if I ran +12v through the relay instead of the ground (to the motors, soloniods etc:)
What it really means is please draw the diagram so that I see how it is wired;)
The original drawing just a box which doesn't differentiate between coil/contacts/supply/0v. Impossible to diagnose anything from it:confused:

It actually doesn't matter which way you do it, but it does matter when trying to explain to somebody else how you HAVE done it.

Anyway, glad the caps sorted your issue:)
 

premelec

Senior Member
CRO

"What is a CRO" - likely NOT an early hominid - but an almost obsolete term Cathode Ray Oscilloscope - Cathode rays are becoming rare though oscilloscopes are thankfully not!
[LCDO? TFTO?]
 

boriz

Senior Member
A proper old fashioned, cheap, second hand Cathode Ray Oscilloscope can do things that a digital ‘scope many times the price can’t. One thing in particular it’s good at is detecting very brief, high impedance transients, such as the back emf spikes and other emf noise generated by inductive loads. Sure, a ‘hobby’ digital ‘scope will catch some, but even a cheap old CRO will probably catch them all, and show their proper amplitude, not an interpolated approximation.

You have now diagnosed your problem without the need for a ‘scope. Good job. But a CRO could have detected this problem long ago. You should be able to pick one up for £50.
 
Thanks for the quick replies

Is there a simple program that I can download (free) that is excellent for drawing circuit diagrams, with a library of components included. I sense that my hand drawings are slightly rugged.

My machine still doesnt work:mad: . The crane now for some reason is really jurky returning to its home position. I am sure I will sort this out as I have seen it work corrrectly in the past. It definately has been a challenge and feel that I am close (hope anyway) to completing it.

My next stage will be the refrigerated milk dispenser, maybe.

Would you say that a CRO is the number 2 essential tool after a multimeter being number 1 ?

Thanks for all the help

regards
michael
0416059960
 

John West

Senior Member
For this sort of problem - yep. And I suggest a digital one would be best if there are going to be noises that are created at turn-on of various devices and aren't repetitive.

I think the ability to "see" what electricity is doing is an essential part of electronic design and development, at least it is for me. I make mistakes.

A multimeter is essential, but actually "sees" nearly nothing of what's going on in the world of electrons.
 

tjetson

Senior Member
Is that your mobile number at the bottom of post 21? If so, I'd remove it as there are certain web robots that may find it and hassle you, sign you up for things etc
 

John West

Senior Member
hi

what do you think of one like this

http://cgi.ebay.com.au/ARM-DSO-Portable-Digital-Storage-Oscilloscope-DIY-KIT-/190399216030?pt=AU_B_I_Electrical_Test_Equipment&hash=item2c54ad799e

Is there any real differences between cheap and expensive that would really affect me?

It would only be used for solving issues within my picaxe addiction

regards
michael
There are two primary sorts of scopes - analog and digital. A few analog scopes have storage capability. All digital ones do. Storage allows you to "catch" single pulses (such as the inrush current when a device is turned on) and take a good look at them.

The primary price determinant is based on how fast a signal a scope can "see." In general a PICAXE will be dealing with quite low frequencies (as these things are determined in the electronics field.) However - some pulse noise glitches that could be problems in some circuits may be quite fast.

There is no end to how fast such pulses MAY conceivably be - and no end to how much a scope might cost that can catch any and all pulse noises.

The answer to your question is (in my opinion) that you should purchase the fastest storage scope that doesn't make a noticeable dent in your wallet - and call it good enough. Whatever you get will be better than what you've got.

Make sure you get scope probes with your scope that are suitable to its speed. They can be costly as an add-on.
 
Top