STEPPER CONTROL WITH MOTOR SHIELD V2

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
ribbonman
 
Posts: 74
Joined: Tue Dec 06, 2016 8:50 pm

Re: STEPPER CONTROL WITH MOTOR SHIELD V2

Post by ribbonman »

adafruit_support_bill wrote:Not sure how you have everything connected. But it should be possible to override the relay with your foot pedal.

One possible explanation for what is causing your program to restart is electrical interference. It could be either a voltage sag when the solenoid is energized, or a reverse EMF spike from when it is de-energized.

in the picture the yellow and blue wires are coming from the foot pedal and the red and black wires are coming from the relay, should I run them differently to minimize interference or can I install something on the relay lines to combat the problem.
Attachments
IMG_0485.jpg
IMG_0485.jpg (70.55 KiB) Viewed 375 times

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: STEPPER CONTROL WITH MOTOR SHIELD V2

Post by adafruit_support_bill »

It would help to understand the nature of the interference. Does the reset happen on energizing or de-energizing the solenoid? If it is a voltage dip on energizing, then some bypass capacitance may help. If it is a reverse EMF spike on de-energizing, it may be coupling either directly or inductively & the remedies would be different.

User avatar
ribbonman
 
Posts: 74
Joined: Tue Dec 06, 2016 8:50 pm

Re: STEPPER CONTROL WITH MOTOR SHIELD V2

Post by ribbonman »

adafruit_support_bill wrote:It would help to understand the nature of the interference. Does the reset happen on energizing or de-energizing the solenoid? If it is a voltage dip on energizing, then some bypass capacitance may help. If it is a reverse EMF spike on de-energizing, it may be coupling either directly or inductively & the remedies would be different.
The program runs as soon as I step on the foot pedal, the solenoid is normally open so I would think that it is happening on the energizing of the solenoid.

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: STEPPER CONTROL WITH MOTOR SHIELD V2

Post by adafruit_support_bill »

In that case, it may be due to a voltage dip due to the added power needed to energize the capacitor. It may be that you need a bigger power supply. Adding some bypass capacitance near the solenoid and/or the Arduino may help also.

User avatar
ribbonman
 
Posts: 74
Joined: Tue Dec 06, 2016 8:50 pm

Re: STEPPER CONTROL WITH MOTOR SHIELD V2

Post by ribbonman »

adafruit_support_bill wrote:In that case, it may be due to a voltage dip due to the added power needed to energize the capacitor. It may be that you need a bigger power supply. Adding some bypass capacitance near the solenoid and/or the Arduino may help also.

Hey Bill,
I removed the motors & button from the equation and worked with just the relay and foot pedal last night and I think it the problem might be on the de-energize of the solenoid.
When I step on the foot pedal the led for the relay doesn't turn on until I let off the pedal and then it will continue to turn on and off, if I hit the pedal a couple of times quickly then it will finally turn off.
Not sure what that is telling me but the learning process is interesting.

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: STEPPER CONTROL WITH MOTOR SHIELD V2

Post by adafruit_support_bill »

When you de-energize a solenoid (or any type of inductive coil device) the collapsing magnetic field sends a reverse voltage spike back through the wire.

This can couple directly into the power supply and cause problems that way. It can also couple inductively through the air to nearby wiring.

A 'flyback' or' snubber' diode will limit the reverse voltage spike. https://en.wikipedia.org/wiki/Flyback_diode

User avatar
ribbonman
 
Posts: 74
Joined: Tue Dec 06, 2016 8:50 pm

Re: STEPPER CONTROL WITH MOTOR SHIELD V2

Post by ribbonman »

adafruit_support_bill wrote:When you de-energize a solenoid (or any type of inductive coil device) the collapsing magnetic field sends a reverse voltage spike back through the wire.

This can couple directly into the power supply and cause problems that way. It can also couple inductively through the air to nearby wiring.

A 'flyback' or' snubber' diode will limit the reverse voltage spike. https://en.wikipedia.org/wiki/Flyback_diode

I thought the seeed relay shield had flyback diodes on it? I will have to look at my spec sheet.
I did the arduino circuit example 11 using the relay with a flyback diode but that was on the breadboard.
My question would be where do I install the diode now, solder it into the wire going to the solenoid, I have looked online but everything is about why you use it and to install it on your breadboard but not where to put it without a pcb to install it on.

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: STEPPER CONTROL WITH MOTOR SHIELD V2

Post by adafruit_support_bill »

I'm not familiar with the Seeed board. But I suspect that if it has flyback diodes, they would be for the relay coils - not the load.

Wiring would be in parallel with the solenoid coil as shown in the diagram on the wikipedia page. I don't know enough about your circuit to say where is the best place to make the connections.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”