0
Offline
Jr. Member
Karma: 0
Posts: 95
Arduino rocks
|
 |
« Reply #105 on: January 12, 2011, 07:57:11 am » |
checked all the switches. everything is correct :/
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 95
Arduino rocks
|
 |
« Reply #106 on: January 12, 2011, 08:11:10 am » |
i tried the following: when i disconect all switches from the arduino all axis move how and where they should. i checkt the wiring and everything is fine and i doublechecked the switches which are fine. strange world.
|
|
|
|
|
Logged
|
|
|
|
|
Leighton Buzzard, UK
Offline
Edison Member
Karma: 11
Posts: 1049
|
 |
« Reply #107 on: January 12, 2011, 08:19:29 am » |
ok a common problem is noise the motors make electrical noise (as well as singing to you) that can make the Arduino think the switch came on
maybe small capacitors (0.1 microFarad) from the arduino microswitch pins to ground may help
they need to be at the arduino end of the wire, not the microswitch end btw
|
|
|
|
« Last Edit: January 12, 2011, 08:35:12 am by mmcp42 »
|
Logged
|
there are only 10 types of people them that understands binary and them that doesn't
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 95
Arduino rocks
|
 |
« Reply #108 on: January 12, 2011, 08:30:01 am » |
ok. this meand the capacitors should be where the resistors are now. is this correct?
|
|
|
|
|
Logged
|
|
|
|
|
Leighton Buzzard, UK
Offline
Edison Member
Karma: 11
Posts: 1049
|
 |
« Reply #109 on: January 12, 2011, 08:35:00 am » |
I hope the resistors are directly connected at the arduino - then yes! 
|
|
|
|
« Last Edit: January 12, 2011, 08:35:36 am by mmcp42 »
|
Logged
|
there are only 10 types of people them that understands binary and them that doesn't
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 95
Arduino rocks
|
 |
« Reply #110 on: January 12, 2011, 08:48:50 am » |
the wire that comes back from a switch is connected to arduino. on this wire there is also the 10k resistor connected which goes to gnd on the arduino.
|
|
|
|
|
Logged
|
|
|
|
|
Leighton Buzzard, UK
Offline
Edison Member
Karma: 11
Posts: 1049
|
 |
« Reply #111 on: January 12, 2011, 08:51:58 am » |
that's good add the capacitors there
|
|
|
|
|
Logged
|
there are only 10 types of people them that understands binary and them that doesn't
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 95
Arduino rocks
|
 |
« Reply #112 on: January 13, 2011, 04:42:08 am » |
good morning. got some 0.1 400V capacitors (getting electronic components in tyrol is like looking for kangaroos in austria). i will try them out. readying some more threads on makecnc.com i found out that noise on limit switches is quite a common problem and it seems that this issue is always solved with 0.1 capacitors. i never found anything about 10k resistors so maybe i don´t need them. we´ll see and i keep you informed!
|
|
|
|
|
Logged
|
|
|
|
|
Leighton Buzzard, UK
Offline
Edison Member
Karma: 11
Posts: 1049
|
 |
« Reply #113 on: January 13, 2011, 05:27:02 am » |
 noise is a common problem, glad to hear the "usual" solution is 0.1 microfarad capacitors (400v is overkill, but does no harm; and probably all you can get anyway!) you will need the resistors to ensure the inputs aren't floating, so I would use both
|
|
|
|
|
Logged
|
there are only 10 types of people them that understands binary and them that doesn't
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 95
Arduino rocks
|
 |
« Reply #114 on: January 13, 2011, 05:45:17 am » |
i am just messing around with the capacitors. classic noob question: do capacitors have a "direction". on one pin of the capacitor it says "hi" at the moment this is where i have the wire coming back from the switch connected. and it does not work.
so my idea is to do the following:
the wire coming back from the switch goes to the according pin on the arduino. then i will add a resistor on the wire that comes back from the switch. then i will add a capacitor there and connect it to the pin which says "hi" the other pin will be connected to gnd on the arduino.
basially thats how i had it already just with a capacitor added in the line. or should i wire the capacitors and the resistors parallel?
how about that?
|
|
|
|
« Last Edit: January 13, 2011, 06:07:14 am by theMPloc »
|
Logged
|
|
|
|
|
Leighton Buzzard, UK
Offline
Edison Member
Karma: 11
Posts: 1049
|
 |
« Reply #115 on: January 13, 2011, 06:09:44 am » |
some capacitors (high value ones) are polarised, so it DOES matter which way round they go they are usually marked with a + and - low value (the sort you are using) are generally not, so it doesn't matter which way round you connec them one end of the capacitor should go to ground, the other should go to the input pin
|
|
|
|
|
Logged
|
there are only 10 types of people them that understands binary and them that doesn't
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 95
Arduino rocks
|
 |
« Reply #116 on: January 13, 2011, 06:36:18 am » |
tried and failed. machine moved a little. now it says all switches are 1.
|
|
|
|
|
Logged
|
|
|
|
|
Leighton Buzzard, UK
Offline
Edison Member
Karma: 11
Posts: 1049
|
 |
« Reply #117 on: January 13, 2011, 06:48:39 am » |
well we're definitely poking the right place very odd
wild guess instead of connecting one ond of the capacitor to ground, connect it to +5 (think that means it's in parallel with the resistor but that's ok)
|
|
|
|
|
Logged
|
there are only 10 types of people them that understands binary and them that doesn't
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 95
Arduino rocks
|
 |
« Reply #118 on: January 13, 2011, 07:02:12 am » |
to make sure: that is how i have it now: 
|
|
|
|
|
Logged
|
|
|
|
|
Leighton Buzzard, UK
Offline
Edison Member
Karma: 11
Posts: 1049
|
 |
« Reply #119 on: January 13, 2011, 07:17:15 am » |
Nooooooooooooooooooooooooooo +5v to switch is good one side of10k to other side of switch is good other side of 10k should go to ground capacitor should be in parallel with resistor
try that!
|
|
|
|
|
Logged
|
there are only 10 types of people them that understands binary and them that doesn't
|
|
|
|
|