Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Motor shield V2 and interrupt
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Motor shield V2 and interrupt

by purlwind on Wed Jul 01, 2020 7:41 pm

Hello, I am building project 41 from Arduino Workshop by Boxall. I am using the mini robot https://www.adafruit.com/product/2939 with the v2 motor shield. All work fine except for this project with a microswitch and interrupt to detect collision (diagram attached). When I turn on the motor power supply, and the motors are running, the interrupt is continuous (can see in the serial monitor). Please advise. If it is a motor noise problem and I need to add capacitors, how can I do this with these enclosed servos?

Thanks for the assistance,
Scott
Project_41_diagram.jpg
Project_41_diagram.jpg (41.03 KiB) Viewed 51 times

purlwind
 
Posts: 5
Joined: Wed Jul 01, 2020 7:18 pm

Re: Motor shield V2 and interrupt

by purlwind on Mon Jul 06, 2020 5:44 pm

Hi, I did not know I needed to post this information:
Adafruit Motor/Stepper/Servo Shield for Arduino v2 Kit (v2.3) [ID:1438]
Mini Robot Rover Chassis Kit - 2WD with DC Motors[ID:2939]

Order Confirmation No: 2249560-6586377803
purchased 2/6/2020

purlwind
 
Posts: 5
Joined: Wed Jul 01, 2020 7:18 pm

Re: Motor shield V2 and interrupt

by adafruit_support_bill on Mon Jul 06, 2020 6:02 pm

That is most likely a motor noise issue. The V2 shield uses only SDA and SCL, so it is not a pin conflict problem.

Adding capacitors to those motors directly would be difficult. But you can try adding some to the motor terminals on the shield. Also make sure that your motor wiring is separated from your switch wiring as much as possible to minimize coupling.

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

Re: Motor shield V2 and interrupt

by purlwind on Wed Jul 08, 2020 5:23 pm

Hi Bill,

The motor wiring is separate from the switch wiring. I added 0.1 microF capacitors across the M1 and M2 terminals and the interrupt is still going on when the motor power is on. Any other suggestions? How do other people handle noise problems with this mini-robot? Or do you just avoid any other wiring besides motor power for this particular chassis?

Thanks for the assistance,
Scott

purlwind
 
Posts: 5
Joined: Wed Jul 01, 2020 7:18 pm

Re: Motor shield V2 and interrupt

by adafruit_support_bill on Wed Jul 08, 2020 6:18 pm

If you post some photos of your build we can take a look and try to spot the problem.

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

Re: Motor shield V2 and interrupt

by purlwind on Wed Jul 08, 2020 6:30 pm

I've already took it apart and I am going to try adding caps to the servo motors. There seems to be barely enough room to do this.

Will send photo of build if it does not work out.

purlwind
 
Posts: 5
Joined: Wed Jul 01, 2020 7:18 pm

Re: Motor shield V2 and interrupt

by purlwind on Thu Jul 09, 2020 5:11 pm

Was able to fit the three caps into the servo. Put it back together and it worked; no more spurious interrupt when motors are on. Thanks for the support.
servo_caps1.jpg
servo_caps1.jpg (530.17 KiB) Viewed 25 times

purlwind
 
Posts: 5
Joined: Wed Jul 01, 2020 7:18 pm

Re: Motor shield V2 and interrupt

by adafruit_support_bill on Thu Jul 09, 2020 6:54 pm

Good to hear that solved it. Thanks for the follow-up.

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

Please be positive and constructive with your questions and comments.


cron