12v motor switching advice

Captain Haddock

Senior Member
I need to switch some 12v motors rated at 3A from a picaxe and not sure the best way to go about it, I have been looking at using an 8 channel relay board but it looks a messy way of doing it, would mosfets be better for keeping it all on one board and if so can anyone recomend one as I'm lost on datasheets, I need to switch the +12v side.
 

AllyCat

Senior Member
Hi,
Do you require direction and speed control?
Indeed, and how many is "some"? What's "messy" about using 4 or 8 encapsulated relays on a commercially-designed PCB?

A High-side switched Mosfet design will need at least a (NPN) driver transistor, several resistors, probably a P-Channel FET and of course the commutating ("protection") diode for each output signal. Also, if you're not experienced in mixed high-current and microcontroller specification / design / layout, etc. , then it would probably be far better to use/design separate PCBs for the PICaxe and high-current driving electronics. That may avoid issues with common (ground) impedances and the concept of "star points", etc.., particularly if based on commercial modular designs.

Cheers, Alan..
 

inglewoodpete

Senior Member
Depending on the distances between PICAXE and motor/s, it may be necessary to use optoisolators between the low and high current circuits. They can be powered by the same power supply but use completely separate wiring all the way back to the power supply (as Alan mentions above: "star wiring".

With careful design, the system can be very reliable. Without, it can be a nightmare of rebooting microcontrollers (not specifically a PICAXE problem).
 

Captain Haddock

Senior Member
I think I jumped the gun a bit posting the question as I have found some 5v dpdt relays rated at 8A and I have a couple of 7 & 8 way darlington ic's in my box of tricks along with 3A rectifier diodes to give a bit of protection with so should be able to a single board job of it, also using dpdt relays I can probably cut down to 5 relays instead of the 8 I would have needed with spdt relays, I had it in my head I was going to use the relays I had till I looked at the contact ratings and realised I had to go a different way.
Thank you very much for the input all the same, help is always appreciated and it's given me some more things to consider (or be confused about :rolleyes:).
The project is a windscreen wiper/washer controller on a boat, it has two wiper motors with two speeds on each and self park, I already have a working controller that gives 6 intermittant settings as well as both speeds and wash/single wipe done with picaxe but it always does both together which is great on rivers but at sea it's almost always from one side which means one side gets lots of water to clear but the other just gets fine spray which soon ends up as dry salt crystals, the sideways nature of the wind always blows the washers off the salt crusted side too which means badly scratched glass, and I've just had new glass fitted so time to separate the wash/wipe so I can do one side at a time.
 

hippy

Technical Support
Staff member
It might be worth considering automotive relays and corresponding mounting sockets. Insulated blade connectors can be used on some which will save on finding the correct sockets.

They will often be high DC current rated, specified for 12V operation, should be long lasting, environmentally protected, and easy to replace if that is ever needed.

If the electronics should fail, you can probably easily swap in a physical switch to activate the coils and get you through a voyage.
 

AllyCat

Senior Member
Hi,

Yes, a motor "rated" at 3A will take well over 10 Amps when starting/stalled, which is why we're warning about specification and layout issues. You can estimate the starting current by using Ohms Law for the dc resistance of the motor (e.g. measured using a multimeter) and 14 volts (a Lead Acid Battery being charged).

A little-known and useful principle if you have a relay (or switch) with multiple poles (but need only one) is that you can increase the "rating" of the contacts for high current and voltage (spike) Inductive loads (e.g. a motor) by connecting the poles (contacts) in series. The reason is that the effective speed of separation of the contacts forming a "spark gap" is increased, so any arcing is extinguished more quickly. And in the extreme case, if a pair of contacts weld together (a common failure mode, particularly of Reed Relays) then any additional poles in series may help to retain the intended functionality.

Cheers, Alan.
 

erco

Senior Member
A little-known and useful principle if you have a relay (or switch) with multiple poles (but need only one) is that you can increase the "rating" of the contacts for high current and voltage (spike) Inductive loads (e.g. a motor) by connecting the poles (contacts) in series. The reason is that the effective speed of separation of the contacts forming a "spark gap" is increased, so any arcing is extinguished more quickly. And in the extreme case, if a pair of contacts weld together (a common failure mode, particularly of Reed Relays) then any additional poles in series may help to retain the intended functionality.
Very interesting. I can attest that it folly to use 12V automotive lighting relays to switch an electric bike motor. The contacts welded themselves "ON" under load on the very first test ride. Exciting and dangerous at once. :)
 

techElder

Well-known member
Exciting and dangerous at once.
Inspecting pipe in the oilfields use to consist of a bank (trailer full) of 12V lead acid batteries, a lot of 4/0 copper wire and a giant railroad engine contactor with pneumatic control of the switching. You haven't seen "exciting" until you've seen one of these units try to find the weak link at 5K to 10K amps when the contacts welded shut. Everyone backs off. :D

Cap'n I would think that automotive starter motor contactors (or the equivalent for a motorcycle) would be sufficient and offer some redundancy (as Hippy has stated.)
 

tommo_NZ

New Member
I did some experiments using logic level MOSFETs, directly connected to the PicAxe output pins, driving a 50w spotlight lamp. The main thing I was interested in was volt drop across the MOSFET, which I found to be so low it was not a concern. The dissipated energy only just slightly warmed the MOSFET and it worked perfectly through hundreds of cycles. These came from "Element 13 in Australia, just remember to purchase enough stuff to qualify for the free shipping, I didn't and it cost me about $30 in freight for $10 of components. I now see there is a NZ branch so it may be elsewhere as well by now.
 

hippy

Technical Support
Staff member
I was presuming automotive relays would be able to switch windscreen wiper motors in a boat because they are used to do exactly that in some cars.
 

tommo_NZ

New Member
I was presuming automotive relays would be able to switch windscreen wiper motors in a boat because they are used to do exactly that in some cars.
As a retired Auto Mechanic, and avid experimenter, I can assure you the small motor load would be nothing to an auto relay of the type used on headlights etc. The inductive load may require a capacitor across the contacts whereas a resistive load like lamps would not.
 

erco

Senior Member
Quite so, hippy. I only mentioned that my bike motor was a no-go, which is a very different animal at 15+ amps inductive load.
 

AllyCat

Senior Member
Hi,

Perhaps I should emphasise that the "series contacts" principle (in #7) is specifically for Inductive loads, which can generate a very large "overswing" voltage as the contacts open, when an arc can burn the contact surfaces (or worse). A capacitor (perhaps with a series resistor) across the contact(s) helps to "tame" the overswing, hopefully lowering the resonant frequency sufficiently that the contacts can be far enough apart when the peak voltage is reached. Similarly a diode (again perhaps with series resistor) across the load will maintain the current flow, thus preventing a high voltage being generated. But beware that the continued current flow may slow (delay) the release of a driven relay. Conversely, short-circuiting a motor can act as a brake (eddy current), or even recover some of the energy (regenerative braking).

For purely resistive loads, connecting contacts in parallel might help (a little), but as hippy has implied it's a matter of "horses for courses". Putting contacts in parallel may help the "running" voltage drop a little, but when the relay opens or closes, one contact will probably move before the other and one will see the full current, just at the point when the contact resistance is at its maximum.

Cheers, Alan.
 
Top