Is it possible to connect 17+ micro switches http://www.adafruit.com/products/819 to the Adafruit motor shield http://www.adafruit.com/products/1438 ?
I will have 17 or more micro switches in my project that when triggered will start a specific stepper motor's rotation.
I was hoping I could solder them onto the Adafruit motor shield or connect them somehow to the Arduino Uno, the motor shield is on top of.
Micro Switch triggering stepper motors
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Micro Switch triggering stepper motors
The problem is going to be a shortage of pins on the Uno. You need 2 (A4 & A5) pins to control the motor shield and it's a good idea to keep pins 0 & 1 free for programming & debugging. That leaves 12 digital pins and 4 analog pins - or 16 total.
You could go to a Mega which has many more pins (54 digital, 16 analog). Or you could wire in a port expander: http://www.adafruit.com/products/732
You could go to a Mega which has many more pins (54 digital, 16 analog). Or you could wire in a port expander: http://www.adafruit.com/products/732
- jbc
- Posts: 159
- Joined: Wed Aug 14, 2013 7:18 pm
Re: Micro Switch triggering stepper motors
The mega it is.
I got the mega with the Uno from Adafruit when I got your motor shields so I like solution.
The Uno will have all of the motor shields stacked on top.
I planned on using the Mega to handle other features so now it will also handle the sensors.
I am guessing the sketch I upload to the Mega will be looking for input from just one of the wires.
Do you have any links or tutorials that will help me hook up the switch and a link for the code which will wait for input from this 'three wire switch' ?
I got the mega with the Uno from Adafruit when I got your motor shields so I like solution.
The Uno will have all of the motor shields stacked on top.
I planned on using the Mega to handle other features so now it will also handle the sensors.
I am guessing the sketch I upload to the Mega will be looking for input from just one of the wires.
Do you have any links or tutorials that will help me hook up the switch and a link for the code which will wait for input from this 'three wire switch' ?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Micro Switch triggering stepper motors
Lesson 6 explains how to connect and program switches to digital inputs: http://learn.adafruit.com/adafruit-ardu ... s/overview
- jbc
- Posts: 159
- Joined: Wed Aug 14, 2013 7:18 pm
Re: Micro Switch triggering stepper motors
You are the reason why I shop at Adafruit.
- jbc
- Posts: 159
- Joined: Wed Aug 14, 2013 7:18 pm
Re: Micro Switch triggering stepper motors
Ready for a facepalm?
Do I really need a breadboard?
Do I really need a breadboard?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Micro Switch triggering stepper motors
Breadboards are real handy for prototyping. For a more permanent installation I usually solder things to a proto-shield. There is one for the mega here: http://www.adafruit.com/products/192Do I really need a breadboard?
- jbc
- Posts: 159
- Joined: Wed Aug 14, 2013 7:18 pm
Re: Micro Switch triggering stepper motors
Perfect.
I now have that on order.
Thank you.
I now have that on order.
Thank you.
- jbc
- Posts: 159
- Joined: Wed Aug 14, 2013 7:18 pm
Re: Micro Switch triggering stepper motors
Is it possible to combine my two orders together to save some shipping costs?
I placed the orders separately through PayPal.
I placed the orders separately through PayPal.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Micro Switch triggering stepper motors
Unfortunately, no.
- jbc
- Posts: 159
- Joined: Wed Aug 14, 2013 7:18 pm
Re: Micro Switch triggering stepper motors
I'm embarrassed to ask but I can't find what I am looking for and I don't want to fry anything else.
Earlier I mentioned the need to connect 17 micro switches to my project.
Right now I would like to connect four micro switches to either:
1) Adrduino Uno (it has 10 adafruit motor shields stacked on top (motor shield V2)
2) the top motor shield (does not have stacking headers on it so those pins are soldered and sealed.
3) toss that soldered and sealed motor shield and attach the micro switches to available pins a stacking header attaches too.
The example bill linked in the earlier example showed a breadboard being used.
But..Who has two thumbs and wants to connect FOUR micro switches to one board and is afraid?
THIS GUY!
Earlier I mentioned the need to connect 17 micro switches to my project.
Right now I would like to connect four micro switches to either:
1) Adrduino Uno (it has 10 adafruit motor shields stacked on top (motor shield V2)
2) the top motor shield (does not have stacking headers on it so those pins are soldered and sealed.
3) toss that soldered and sealed motor shield and attach the micro switches to available pins a stacking header attaches too.
The example bill linked in the earlier example showed a breadboard being used.
But..Who has two thumbs and wants to connect FOUR micro switches to one board and is afraid?
THIS GUY!
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Micro Switch triggering stepper motors
The V2 motor shield has a prototyping area (that big array of holes). You could solder the switches there and run jumpers to the breakout holes that run parallel to the headers.
- jbc
- Posts: 159
- Joined: Wed Aug 14, 2013 7:18 pm
Re: Micro Switch triggering stepper motors
If there were 8 days in a week would you work that day too?
Bill you are like 'Adafruit's Siri.' Always ON.
Can I pick any hole in the prototyping area for one wire and attach another wire to a pin (0-13)? (I'm learning quickly but started from zero!)
(the micro switches I have on my 3D printer used only two wires-on a different board)
Bill you are like 'Adafruit's Siri.' Always ON.
Can I pick any hole in the prototyping area for one wire and attach another wire to a pin (0-13)? (I'm learning quickly but started from zero!)
(the micro switches I have on my 3D printer used only two wires-on a different board)
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Micro Switch triggering stepper motors
You will need to connect a jumper from one of the switch pins to ground, and one from the other pin to an Arduino pin. You can use any holes in the prototyping area, they are just there to give you convenient soldering points.
- jbc
- Posts: 159
- Joined: Wed Aug 14, 2013 7:18 pm
Re: Micro Switch triggering stepper motors
I think I get it.
Does this look right or does it induce involuntary vomiting?
Does this look right or does it induce involuntary vomiting?
- Attachments
-
- micro switch wiring.JPG (178.69 KiB) Viewed 1069 times
Please be positive and constructive with your questions and comments.