What I'd like help with from the community: (see bottom of message, above edits)
Images in POST #10
Wiring Diagram in POST#11
What I'm trying to do (condensed):
- control a stepper to start and stop when I tell it to and always continue returning until it reaches "home"
- variable speed with foot pedal while its supposed to run
My experience:
- I'm new to Arduino
- No experience with C++
- Limited experience with other program languages, mostly HTML and recovering vintage Dell Latitude D-series brick laptops.
- LOTS of electrical experience
- very limited no electrical experience with chips and transistor arrays (count it as nil)
- extremely high level of ability and experience with anything mechanical and physical, including solving issues others can't. (but not when it comes to code lol)
What I'm trying to do (expanded)
- I'm trying to run a stepper motor that is belt driven at a variable speed controlled by a foot pedal control and have it return to home. The stepper will drive the object via a cogged timing belt but has the potential to occasionally slip since the driving end of the belt will be in contact with the smooth side of the belt so I want to place a microswitch on the driven component to tell the stepper it has reached "home". I want to microswitch to do nothing while the foot pedal is in operation though. I want the Arduino to hold the stepper in place when its powered on but has the foot pedal disabled. I want a knob for both the low and the high motor speed limit speeds (these will be inside my final enclosure so they don't get messed with by other people or accidentally bumped.
What I've tried:
- I've searched the internet for many hours on how to make this work and keep finding snippets of code but can't seem to figure out how to like them together. I've played with basic Arduino codes and successfully uploaded them and tinkered with changing elements to change the outcomes. I've not determined if I need to supply the motor shield with 5V or 12V.
I haven't determined what pins connect to what motor shield connections. I think I have a basic enough design that I can use a single transistor assy. on the breadboard to do what I need but am not sure of this. I think I need to purchase a 2004 transistor assy. for hooking up my motor since my motor is a 4-wire.
What I have:
- Arduino Uno R3
- Arduino MEGA 2650 R3
- NEMA 23 stepper motor, bipolar, 2.8A, 4-wire [Link (NON-affiliate)](JoyNano Nema 23 Stepper Motor Bipolar 2.8A 1.89N.m Holding Torque 2-Phase 4-Wire 1.8 Deg 76mm Body for 3D Printer or CNC Machine Amazon.com)
- NEMA 17 Stepper motors (spares for my Creality CP-01 3-in-1 3D printer)
- TB6600 NEMA stepper motor driver, 4A [Link (NON-affiliate)](Usongshine TB6600 4A 9-42V Nema 17 Stepper Motor Driver CNC Controller Single Axes Phase Hybrid Stepper Motor for CNC/42 57 86 Stepper Motorļ¼1 pcs) Amazon.com)
- Motor shield for Arduino Uno
- 5V power supply(s)
- 12V power supply(s)
- Cogged 10mm timing belt
- micro switches (momentary, NO)
- variable resistor foot pedal
- Relay shield for Arduino Uno
- Prototyping Shield for Arduino Uno
How I want it to work:
- plug in Arduino
- power to Arduino, lock stepper in place
- push button
- turn "on", motor not moving (yet) [permit foot pedal control]
- variable foot pedal input
- change speed of motor in relation to how much I push on the foot pedal, with a small area at the start of pushing that the motor stays still
- release foot pedal
- motor continue to turn, but at predetermined minimum speed until it reaches "home"
- push button
- disable foot pedal (keep Arduino on but prevent motor from turning, lock stepper in position)
- IF: push added "home" button
THEN: move stepper at predetermined minimum speed until it reaches home (this would be for if I managed to knock the stepper out of home (I don't want it to try this without me telling it to do so because I don't want my hand in the way) - unplug arduino
- turn system off completely, stepper unlocked
If anyone can help with this code and how to properly connect (motor shield vs breadboard, 5v/12v supply to shield/breadboard, required chips, etc) it would be greatly appreciated.
If I can get it together, I'll post my project here for you all to see the finished project, a lot of us that use a lot of small wires could really appreciate this tool when its done!
I'll try to post how it's coming as I get help and clarify any questions you have for me to the best of my ability. In the meantime, I'll be 3D printing & laser cutting the main components of the project and assembling them.
Thanks in advance for any help!
EDITS:
10-06-2023 @ 8:45pm
- Motor must continue "forward" until it reaches "home", it cannot back up in the final design.
- Motor type and size is open for a change in the end, NEMA 17 can work but an upgrade would likely occur. motor could be DC geared if "self-locking", quiet, and stops predictably with long service life. Typically NEMA steppers meet these specs whereas DC gear motors don't always.
10-08-2023 @ 12:42am
- I have settled on a belt drive (with a tensioner (Thanks @Paul_KD7HB)) due to a few constraints:
- A direct contact wheel with the stepper would stop moving every time the opening came around because it would lose contact
- A gear drive would stop moving every time the opening came around because the gear teeth would not be in contact.
10-08-2023 @ 1:25pm
- I have added pictures to this project, see message #10 below:
10-09-2023 @ 9:41pm
- I've added a schematic, see message #11 below:
10-11-2023 @ 9:41am
- Arduino cook book arrived yesterday
- Purchased larger stepper motor
- Purchased 4A motor driver
10-11-2023 @ 9:52am
- Iām working on a flowchart of how the system should work when finished to better help the readers of my overly long posts.
10-11-2023 @2:59pm
- Updated project materials list above, see bold items.