Hello,
I'm sort of new with Arduino projects and was hoping I could get a recommendation on how best to connect 3 solenoids and a stepper motor to an Arudino Uno R3. The project has a couple other aspects, but my limited knowledge of stepper motors and solenoids has me a little confused.
It was suggested that I should use three of the Arduino Motor Shields stack to control the solenoids and stepper motor. However, through my own research the Arduino Motor Shields are not stackable, due to the need to use multiple pwm pins and the shields are well stacked and thus can't change the pins.
So I came across the Adafruit Motor shields which communicate over I2C to control up to 32 boards. This seems to make more sense to me. However, as I looked into it more it appears operating a solenoid from a motor shield appears to be overkill. Would it make more sense for me to use a protoshield, uno sized, to wire up a power transistor and a diode, as its suggested on one of the Adafruit Solenoid pages, for each of the Solenoids, and a motor shield for the Stepper motor? What makes the most sense?
Hardware selection for 3 solenoids and a stepper moto
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mascenzi80
- Posts: 33
- Joined: Mon Jan 23, 2017 5:19 pm
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: Hardware selection for 3 solenoids and a stepper moto
You need to start by deciding which solenoids and stepper motors you want to connect. The electrical requirements of those devices will determine what kind of driver is necessary to control them.was hoping I could get a recommendation on how best to connect 3 solenoids and a stepper motor to an Arudino Uno R3.
- mascenzi80
- Posts: 33
- Joined: Mon Jan 23, 2017 5:19 pm
Re: Hardware selection for 3 solenoids and a stepper moto
Thank you for getting back to me so fast.adafruit_support_bill wrote: ↑Mon Jan 09, 2023 10:08 amYou need to start by deciding which solenoids and stepper motors you want to connect. The electrical requirements of those devices will determine what kind of driver is necessary to control them.was hoping I could get a recommendation on how best to connect 3 solenoids and a stepper motor to an Arudino Uno R3.
The stepper that has already been selected is a nema 8 Stepper Motor
While the solenoids are Uxcell DC 12v 10mm Stroke Pull Linear motion
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: Hardware selection for 3 solenoids and a stepper moto
It would be possible to run those all with motor shields. But you would need two power supplies (6v and 12v) and separate shields for the solenoids and motor. Coding for the solenoids would be a little awkward as well since the motor shield library was not designed with that in mind.
A better option would allow you to use a single 12v power supply. The options below would give you better stepper performance and simplify the coding for the solenoids.
For the stepper, I'd use a current limiting driver such as this one: https://www.pololu.com/product/2128
With the current limit set to 0.6A/phase per the motor specs. https://www.youtube.com/watch?v=89BHS9hfSUk
For the solenoids, I'd use these MOSFET drivers. https://www.adafruit.com/product/5648
A better option would allow you to use a single 12v power supply. The options below would give you better stepper performance and simplify the coding for the solenoids.
For the stepper, I'd use a current limiting driver such as this one: https://www.pololu.com/product/2128
With the current limit set to 0.6A/phase per the motor specs. https://www.youtube.com/watch?v=89BHS9hfSUk
For the solenoids, I'd use these MOSFET drivers. https://www.adafruit.com/product/5648
- mascenzi80
- Posts: 33
- Joined: Mon Jan 23, 2017 5:19 pm
Re: Hardware selection for 3 solenoids and a stepper moto
Thank you! I appreciate your time and support.
- mascenzi80
- Posts: 33
- Joined: Mon Jan 23, 2017 5:19 pm
Re: Hardware selection for 3 solenoids and a stepper moto
@adafruit_support_bill, so I have a new bit of information as to why the motor shields were selected in the first place. I wasn't informed until recently they chose the motors shields because they wanted to control the Solenoids with PWM in order to actuate the solenoid to varying degrees. I need to control the the push/pull of the solenoid to different heights.
How would this change the hardware that you originally recommended?
How would this change the hardware that you originally recommended?
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: Hardware selection for 3 solenoids and a stepper moto
The recommendation would be the same. The UNO has several PWM-capable pins and you can use those to drive the MOSFETs.
That said, I'm not sure how much luck you will have controlling the solenoid position with any precision via PWM. PWM will change the strength of the magnetic field. You need a very strong field to start, and less current as the slug gets pulled into the center of the coil. Typically PWM is just used to reduce the holding current once the solenoid has been actuated.
That said, I'm not sure how much luck you will have controlling the solenoid position with any precision via PWM. PWM will change the strength of the magnetic field. You need a very strong field to start, and less current as the slug gets pulled into the center of the coil. Typically PWM is just used to reduce the holding current once the solenoid has been actuated.
- mascenzi80
- Posts: 33
- Joined: Mon Jan 23, 2017 5:19 pm
Re: Hardware selection for 3 solenoids and a stepper moto
"Typically PWM is just used to reduce the holding current once the solenoid has been actuated."
Can you elaborate on what you mean by holding current? Would you be referring to the strength of the magnetic force that is preventing the solenoid from returning to its original position? If that is the case, It might work for what we are attempting to do. I guess I won't know until the solenoids arrive and I can actually start testing it.
Thank you for the feed back.
Can you elaborate on what you mean by holding current? Would you be referring to the strength of the magnetic force that is preventing the solenoid from returning to its original position? If that is the case, It might work for what we are attempting to do. I guess I won't know until the solenoids arrive and I can actually start testing it.
Thank you for the feed back.
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: Hardware selection for 3 solenoids and a stepper moto
A solenoid works by pulling a magnetically permeable 'slug' or 'plunger' into the middle of a magnetic coil. When de-energized, a spring pushes the slug out to the end of the coil. When energized, the slug is pulled back into the magnetic field of the coil.Can you elaborate on what you mean by holding current?
When the slug is mostly out of the coil, it takes a pretty strong magnetic field to pull it back in. As it gets pulled closer to the center of the coil, it takes much less power to hold it there.
Once the slug is pulled into the coil's field, you can use PWM to reduce the power to hold it there. This substantially reduces the energy requirements as well as the amount of heat that needs to be dissipated by the coil.
If you reduce the power enough, the spring will start to push the slug back out. So you will probably have some control over the position. But I would not expect the response to be very linear.
Please be positive and constructive with your questions and comments.