suppression for DC motors..

Tesla

Member
Hi there
Just a quick nuance and may be some light shed on suppression from DC motors ( small eccentric motor type=
Operating from a battery supply, 08M2 chip and using BCX38C, 4001 diode protection( although would love to know if the1N5819) Schottky Diode would be more suitable?
using PWM for driving the motor and later switching to Haptic Drives using H Bridge driver chip. Although have had the problem using PIN high to drive motor through BCX38C

Ok, so we can place a Suppression Cap ( polyester 220nf across motor)

A few questions..isolated a few obvious problems and curiosities before I post that could be the answer..or contribute to a better working more reliable and protected circuit-
The obvious been the cap missing across the motor. But there seems to be no pics of a cap across the Chip rails, although its mentioned, should this only be used with regulated power supplies and not needed with batteries. .?

All good and well,, But .
1)Do we need to have protection across the rails running from a battery supply? its not shown( or I have missed it) in the manual 3 interfacing .? (Not got any, what would you suggest?)

2)does or should the base/gate of BCX38C be tied to ground with a 10K resistor like a Mosfet would? ( any technical expert can step in here, just curious)

3) is the 1K critical between output pin and base of BCX38C? ( I have not included it, due to this device not needing it with another microcontroller and worked fine)?

The Reason I ask this, is because if I use simple HIGH commands to drive DC motor for short bursts, not often(weeks without), but sometimes, the motor will just flip into constant running until I cut the power..
4) I did not have suppression cap protection across the motor..

I will include a schematic hopefully tonight as i know a pic tells a thousand words.

Regards
Tesla
 
Last edited:

BeanieBots

Moderator
The cap across the PICAXE is required no matter what your power is. Always fit one.
A base resistor is ESSENTIAL but the value is not critical. Without one, you could damage the PICAXE and / or the transistor.
The lack of base resistor is the most likely cause of your problems.
No base pull-down is required.
Use of a schottky diode will not improve things much but a faster diode than a 1N4001 will help if you have noise problems.

What is the stall current of your motor and can a BCX38C cope with that level of current?
A schematic will help to give any further advice.
 

Goeytex

Senior Member
1)Do we need to have protection across the rails running from a battery supply? its not shown( or I have missed it) in the manual 3 interfacing .? (Not got any, what would you suggest?)
Depending upon the current drawn by the motor and the noise put on the the rail, it is probably a good idea to have a bulk/filter cap, and 1 or more suppression diodes. The bulk capacitor will prevent/ minimize voltage droop when the motor starts. Suggest > 1000uf (depending upon motor current). A 100nf and 100pf capacitor can also be added to the rail for added noise suppression.

2)does or should the base/gate of BCX38C be tied to ground with a 10K resistor like a Mosfet would? ( any technical expert can step in here, just curious)
No. Unlike a MOSFET, a BJT does not turn on when the base is left floating

3) is the 1K critical between output pin and base of BCX38C? ( I have not included it, due to this device not needing it with another microcontroller and worked fine)?
Yes. While the circuit might seem to work without one, there is no good reason not to have it. It not only protects the Picaxe, but also may help to suppresses noise that may find its way back into to Picaxe. Leave this resistor out and you are asking for trouble. With the transistor having an Hfe of > 5000 the value is not that critical. 1K is OK but you could go up 4K7 and beyond with no problems. That's the whole idea behind using a Darlington .... controlling / switching a large current with a very low current. If I were designing the circuit, I would use the higher value. It is always good practice to use a base resistor on this type of circuit regardless of what may have "worked" on another circuit.

The Reason I ask this, is because if I use simple HIGH commands to drive DC motor for short bursts, not often(weeks without), but sometimes, the motor will just flip into constant running until I cut the power..
4) I did not have suppression cap protection across the motor..
For the motor to not turn off with a LOW applied to the base of the transistor suggests that the LOW is not going low enough and the transistor is remaining on. My guess is that adding the gate resistor and proper suppression components will remedy this. It is also "possible" that the transistor is flaky or that the ground to the Picaxe and the ground to the emitter of the transistor are not at the same potential. Check your grounds and use "star" grounding if possible.
 

Tesla

Member
I might add, that the problem with the motor running constantly only happened a few times and that I have done around 10 circuits, some work with no problem!
I am also programming the chips first in the Development boards!
OK Original SETUP
Schematictimer.png

So now I have this new Set up, is this a more reliable set up?
Schematictimernew.png
The 1K can be between (1K to 4K7 )as pointed out kindly
Polyester Caps 100nf across motor and across Chip power supply,close as possible.
I also know about the voltage drop through the Darlingtons 1.2V as I recall. 3.2V power -1.2V drop = 2V voltage at motor.!
So to Date Gentleman, this would be fine for small vibrational Motors used in pagers at around 200ma.?

Developments
I wish to run it from a 3V lithium so thinking of adding a low current motor 69ma see Further notes below..!

FURTHER NOTES and possible later additions These are very interesting devices, used in Watches for the Blind for example. going to

Added option to make the timer more efficient is swapping the 200 ma DC motors (tried a few different models)for these units below be using a dedicated H Drive circuit linked to the 08M2
https://catalog.precisionmicrodrives.com/order-parts/product/c10-100-10mm-linear-resonant-actuator-3-6mm-type

I should also add that I wanted to add a faster switching diode to deal with 175Hz pulses from the 08M2 for driving PWM linear motors instead of the DC motors that you get in phone vibrators . These operate on this exact frequency, but only require around 70Mato produce feedback that you can feel.
Body Diameter 10 mm Body Length 3.6 mm Typical Operating Current 69 mA
Typical Normalised Amplitude 1.4 G Rated Voltage 2 V Rated Resonant Frequency 175 Hz
Lead Length 100 mm Lead Wire Gauge 32 AWG
https://catalog.precisionmicrodrives.com/order-parts/product/c10-100-10mm-linear-resonant-actuator-3-6mm-type
:_________________________________________________________________________________________________
I have had these working with PWM straight from the O8M2 using the WIZZARD to generate the 175 Hz :)

Any obvious problems gentleman, then please add comments!
And thank you for your clarification on a few things from everyone, I really appreciate this and I am sure this will help others.
Tesla
 
Last edited:

Dippy

Moderator
Regarding your motor circuit:-
The motor staying on could be bad driving or a form of latch-up.
This could be due to noise from motor or poor circuit design/layout.

As you didn't acknowledge Goeytex's advice then I'm not sure if you've understood/read his final sentence.
I've attached a scruffmatic of how the wiring should go.
i.e. don't let the power lines to the PICAXE share the power lines to the noisy device. (Or keep to a minimum in reality).
In addition, I suggest an extra cap by the motor. This acts as a local reservoir and thus reduces noise in the power lines.
A low-Z electro or Tantalum would be good. Maybe need a slightly higher v rating than i typed in . I was guessing value.

You may be able to replace the BCX with a LL MOSFET. Far more efficient and 175Hz wouldn't need a driver.
 

Attachments

SteveT

Senior Member
STOP! If I am reading correctly....

> Body Diameter 10 mm Body Length 3.6 mm Typical Operating Current 69 mA

> I have had these working with PWM straight from the O8M2 using the WIZZARD to generate the 175 Hz :)

Picaxe outputs can not handle this amount of current. Max current per output is in the order of 20 to 25 mA.
 

Tesla

Member
STOP! If I am reading correctly....

> Body Diameter 10 mm Body Length 3.6 mm Typical Operating Current 69 mA

> I have had these working with PWM straight from the O8M2 using the WIZZARD to generate the 175 Hz :)

Picaxe outputs can not handle this amount of current. Max current per output is in the order of 20 to 25 mA.

Through the BCX38C, my apologies, not straight from the Chip! :-0 Microdrive have an H bridge driver for these to brake the motor after a pulse goes low, but ran them from the 175 Hz needed to drive them, this is the natural resonating frequency.
 

Tesla

Member
Hi Dippy
I followed Goeytex suggestions and they made sense, I just were not sure of how the star configuration should be implemented for the Ground. and unless I had separate power supplies sharing only ground how I could isolate the noise any further. That would have been my next question :)
I also now follow how the cap keeps the noise to a minimum also on the ground by introducing the second cap suggested. Much Appreciated to everyone that has helped. As an mechanical engineer, I like to follow the KISS principle (keep it short, simple), so I always like to know the minimum circuit design that can be implemented without over engineering something. But I suppose in the realms of electronics, adding a few precautionary details is not overbearing on the overall cost like it is with mechanical engineering.
Again thanks for everything. .
So Dippy a Tant will suffice.., will redo circuit this week, get the meter on it and check a few things..!
 

Tesla

Member
A Big Thanks to everyone ..

Thanks Dippy, Goeytex, Beeniebots, SteveT, and anyone else that showed an interest , much appreciated!
Its one of the things that attracts me into using Picaxe devices is the fantastic support offered by people on this forum.

Hmm one last note, should there be a 1K resistor on the Pic side between the 10K on the input line (switch)..? to protect the Pic when switching High?
Regards
Tesla
 

John West

Senior Member
Not necessary, as the input voltage to the pin will never exceed the PICAXE power supply voltage, as they are the same voltage. The reason to protect an input pin is in case the input exceeds the chip power supply voltage. Of course, you do have to make certain the power supply voltage stays withing the chip spec, something that can go out of bounds even in a battery powered circuit if there are unfiltered inductive loads being driven.

You do have a good reason to be concerned about input protection though, as many internal chip architectures get very unhappy when the input voltages get more than a diode drop above the chip power supply voltage, or go below the chip ground reference. If either of these conditions are a possibility, then an input current limiting resistor is a good idea if you want your circuit to live a long and happy life.
 
Last edited:

Tesla

Member
Not necessary, as the input voltage to the pin will never exceed the PICAXE power supply voltage, as they are the same voltage. The reason to protect an input pin is in case the input exceeds the chip power supply voltage. Of course, you do have to make certain the power supply voltage stays withing the chip spec, something that can go out of bounds even in a battery powered circuit if there are unfiltered inductive loads being driven.

You do have a good reason to be concerned about input protection though, as many internal chip architectures get very unhappy when the input voltages get more than a diode drop above the chip power supply voltage, or go below the chip ground reference. If either of these conditions are a possibility, then an input current limiting resistor is a good idea if you want your circuit to live a long and happy life.
Hi John West
Thanks for the info, much appreciated.!
Tesla
 

Goeytex

Senior Member
Hmm one last note, should there be a 1K resistor on the Pic side between the 10K on the input line (switch)..? to protect the Pic when switching High?
Adding to what John said....

With no resistor and with the switch depressed, should a mishap in code cause the pin to become an output then the positive supply would be directly connected to ground through the Picaxe I/O. This can cause a catastrophic failure of the Picaxe. With the resistor fitted, the current will be limited to prevent such a failure. In my projects, I place this resistor as standard practice and consider it a part of a minimal design.
 

John West

Senior Member
Good point. I hadn't considered that possibility. In the "bullet-proof" PICAXE control circuit I built for the controller in my motor-home, I put 470 Ohm resistors on all possible inputs and outputs.
 
Top