0

M0 Feather reset when running DC motor with Motor FeatherWin
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

M0 Feather reset when running DC motor with Motor FeatherWin

by IoTAll on Wed Nov 22, 2017 2:32 am

Hi!

I am having a DC motor connected to the motor FeatherWing and stacked on a M0 Feather.
The spec of the DC motor is (3-6 Volt, 0.4-1.5 Watt)

I am powering the motor wing with the USB power pin and ground pin of the Feather. Basically I added 2 wires from USB and Ground pins to the Motor wing 5-12v power termnal block.
shot.JPG
shot.JPG (128.09 KiB) Viewed 1068 times


I did this after the discussion I had here: viewtopic.php?f=57&t=125580

Now the motors runs fine up to the speed 80 on 255 but as soon as I go over 100, the feather resets.

I am powering the feather wih smart phone charger, rated at 1A.
When I am running the DC motor at this speed(~80), I measure a current from the USB charger at around 350mA.

Is this a power problem? Theoritically it should work I guess but I might be missign something. Or something else?

Another question, if the power supply is the problem. Can I supply for instance 12v to the motor Feather Wing if I am using 6v DC motors?

Thank you!

IoTAll
 
Posts: 133
Joined: Wed May 31, 2017 6:34 pm

Re: M0 Feather reset when running DC motor with Motor Feathe

by adafruit_support_bill on Wed Nov 22, 2017 7:07 am

The spec of the DC motor is (3-6 Volt, 0.4-1.5 Watt)

That's a pretty vague spec. But assuming that it pulls 1.5 W at 6v, you should expect about 1.25 W at 5v. That translates to 250mA.

When I am running the DC motor at this speed(~80), I measure a current from the USB charger at around 350mA.

That is already way more than 250mA. I suspect that the motor spec is for a 'no load' current draw. Startup and stall currents are probably going to be several amps at least

Code: Select all | TOGGLE FULL SIZE
I am powering the motor wing with the USB power pin and ground pin of the Feather.

So you are sharing a power supply between the motor and the processor. DC motors are one of the noisiest possible loads for a power supply. And all the brush-noise and power fluctuations inherent in driving your motor will be feeding into your processor power power rails.

You may be able to filter some of that by wiring a large-ish capacitor between the + and - power terminals on the Wing. https://www.adafruit.com/product/2192

Code: Select all | TOGGLE FULL SIZE
Another question, if the power supply is the problem. Can I supply for instance 12v to the motor Feather Wing if I am using 6v DC motors?

You can do that, but you should try to keep the maximum PWM duty-cycle under 50% (127) to avoid overheating the motor.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: M0 Feather reset when running DC motor with Motor Feathe

by IoTAll on Wed Nov 22, 2017 4:37 pm

Thank you for those explanations!

My purpose doing this wiring is to have one unique cable from the 5V and 1Amp power supply to power the whole thing: M0 Feather, motor wings and other different wings.

I understand for the 220uF capacitor decoupler.

Is there a robust way to avoid having two power supply for this? Mixing different capacitors or something else?

Thank you!
Last edited by IoTAll on Wed Nov 22, 2017 5:47 pm, edited 1 time in total.

IoTAll
 
Posts: 133
Joined: Wed May 31, 2017 6:34 pm

Re: M0 Feather reset when running DC motor with Motor Feathe

by adafruit_support_bill on Wed Nov 22, 2017 5:10 pm

Single supplies can work. They sometimes just need extra care to decouple the noise. I'd try the capacitor solution first. A large electrolytic should smooth out most of the voltage fluctuations. A .1mF or so ceramic cap in parallel with that will suppress some of the higher-frequency brush noise.

You may also be pushing the limits of your 1A supply if you try to drive it at full throttle. Extrapolating from 350mA at a speed of 80, you would get around 1116mA at 255. Accelerations and/or increases in load could push it even higher.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: M0 Feather reset when running DC motor with Motor Feathe

by IoTAll on Wed Nov 22, 2017 5:46 pm

Great, just bought some of those capacitors from your website. Will try it this weekend with the 2 capacitors in parallel!

I saw you sell also an 4700uF 10v Electrolytic Capacitor.
In my application, would it be even better than the 220uF you proposed?
Is it for this specific case with DC motor decoupling, the bigger capacitor the better?

Thanks again!

IoTAll
 
Posts: 133
Joined: Wed May 31, 2017 6:34 pm

Re: M0 Feather reset when running DC motor with Motor Feathe

by adafruit_support_bill on Wed Nov 22, 2017 5:54 pm

For the most part, bigger is better. As long as you have the room for it, the higher capacitance will do a better job of filtering. But at some point, the current required to charge a huge capacitor at startup will start stressing your power supply. 4700uF should be OK for your 1A charger. But too much larger than that might cause startup overloads.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: M0 Feather reset when running DC motor with Motor Feathe

by IoTAll on Thu Nov 23, 2017 2:42 pm

Ok make sense. Thanks a lot!

A last question: I am having the different featherwings and the feather stacked on a FeatherWing Tripler Mini Kit.

Would that work if I weld those capacitors on the tripler wing between the ground and USB pin? Or maybe they would too "far away" from the feather and I should weld those directly on the M0 Feather pinout?

Those tripler wing has a lot of space to weld any components so just wondering.

Thank you.

IoTAll
 
Posts: 133
Joined: Wed May 31, 2017 6:34 pm

Re: M0 Feather reset when running DC motor with Motor Feathe

by adafruit_support_bill on Thu Nov 23, 2017 3:03 pm

The best place for the capacitors is on the motor wing. You can attach them to the motor power terminals.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: M0 Feather reset when running DC motor with Motor Feathe

by IoTAll on Mon Nov 27, 2017 6:12 pm

Hi!
Just received the capacitors from Adafruit.
I placed those 2 capacitors (220uF and 0.1uF) in parallel between the USB (+5V) and ground pins of the Feather and the Motor FeatherWing power input.
shot3.jpg
shot3.jpg (136.54 KiB) Viewed 909 times


This didn't help. The feather reset when I power the motor above the same approximate speed.

Reading again your last message, I realized I read it too fast and you actually said to place those capacitors at the motor power output terminal of the motor featherwing and not at the Featherwing power input, am I right?
In this case I would need capacitors at each motor output.

Is there a way to solve the problem placing different kind of capacitors (maybe bigger or different?) at the Motor Featherwing power input? Maybe bigger capacitors or more of the same capacitor in parallel? This would be in order to de-couple the motor featherwing from the M0 feather. Still a beginner so I am discovering all this.

Thanks a lot!!

IoTAll
 
Posts: 133
Joined: Wed May 31, 2017 6:34 pm

Re: M0 Feather reset when running DC motor with Motor Feathe

by adafruit_support_bill on Mon Nov 27, 2017 8:03 pm

Reading again your last message, I realized I read it too fast and you actually said to place those capacitors at the motor power output terminal of the motor featherwing

The capacitors should be at the motor power input terminals as you have them in your diagram.
In this case I would need capacitors at each motor output.

If you have multiple motors drawing >350mA, you will probably need to consider a separate power supply for your motors.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: M0 Feather reset when running DC motor with Motor Feathe

by IoTAll on Thu Nov 30, 2017 3:48 pm

Hi!

I am still having a lot of difficulties to make the DC motor work reliably with the motor Feather wing.

Here are few tests and observations I made the past days:
- I continued to test with the setup I described in my previous post and I noticed that some motors trigger the M0 feather reset more often than others
- I powered the motor wing with a separate power supply, (5V and 2Amps) and I have the impression the FeatherWing resets a little less but still resetting very often as soon as I increase the DC motor speed.
- The feather resets and the sketch seems to "reboot" which stops the motors. But quiet often, I see that the Serial output stop showing any outputs and the LED matrix stops updating as it should, but the DC motors continues to run anyway. I need then to unplug the USB cable manually to force the sketch to reboot.
- Using the voltage and amp testing device I bought on your website, the voltage from USB is around 5.1V and current is about ~100 to 250 mA when all is powered through the USB (no separate power supply). So it is far away from the 1 or 1.5 Amp the USB power supply can deliver.

Would you have any idea why the M0 Feather resets even when the motor wing is powered by a separate power supply?

Could it be a faulty Motor Feather wing? Should I add some capacitors somewhere?

Any help would be Really appreciated!!
Thanks!!

IoTAll
 
Posts: 133
Joined: Wed May 31, 2017 6:34 pm

Re: M0 Feather reset when running DC motor with Motor Feathe

by adafruit_support_bill on Thu Nov 30, 2017 7:58 pm

What motors are you using? Motors in general, and brushed DC motors in particular are difficult loads with spiky current demands and lots of EMI. Separate power supplies should eliminate the current demand issues, but EMI can couple into the system inductively and cause probems. Please post a link to the motor you are using and some photos showing your wiring.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: M0 Feather reset when running DC motor with Motor Feathe

by IoTAll on Sun Dec 10, 2017 4:03 pm

Sorry for the late reply. I didn't have the time to spend on the project lately.
Here is the motor I am using:
https://www.aliexpress.com/store/produc ... 05440.html

What I did meanwhile is to have the 2 capacitors just at the motor wing power input (on the bottom side of the PCB, under the terminal), and not on the trippler shield as I did before. Basically I put it closer.
As a trial, I added a 0.1uF capacitor between the ground and the 3.3v pin of the feather. Not sure this has any impact at all.
It seems to be working better but need to do some more tests to be sure.

One thing about EMI. My sensor cables and motor cable are placed against each other.
Should I separate them somehow?

I will post an update when I have the time to test more!

Thanks a lot for the support!!

IoTAll
 
Posts: 133
Joined: Wed May 31, 2017 6:34 pm

Re: M0 Feather reset when running DC motor with Motor Feathe

by adafruit_support_bill on Sun Dec 10, 2017 4:35 pm

I don't have any experience with that particular motor. It does look like a relatively small one. But some of those small DC motors do put out enough EMI to disrupt a processor.

Putting the capacitors closer to the source of the noise generally helps. When possible I like to solder small ceramic caps right at the motor case. That is not practical to do in a sealed unit like this one, but the closer you can get them the better.

One thing about EMI. My sensor cables and motor cable are placed against each other.
Should I separate them somehow?

Definitely separate them if you can. The cables act like an antenna and noise can couple between them inductively. If separating them is difficult, shielding and/or twisted-pair wiring can help reject noise as well.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: M0 Feather reset when running DC motor with Motor Feathe

by IoTAll on Sun Feb 18, 2018 10:30 am

Hi!

Coming back to this post, I am still having those reset problems when using those DC motors.
At the moment, it feels that it is behaving in a random way.
Sometimes I can run one of those DC motors without issues for more than an hour, sometimes even 2 at the same time.
But sometimes the M0 feather reset after 2 seconds after one motor is switched on..

I am wondering now how I can really debug this for good and one thing I read was that using an osciloscope could be a good way to really understand where the problem is happening, where the noise is generated. Basically I was thinking that this could be a good way to understand where to put what capacitors and see the effect of those.

Is that the right way to go? Or is it an overkill? or maybe another better way?

Thank you very much again!

IoTAll
 
Posts: 133
Joined: Wed May 31, 2017 6:34 pm

Please be positive and constructive with your questions and comments.