Welcome! Log In Create A New Profile

Advanced

Gen 7 Ver 1.5 Endstop Pull up resistor.

Posted by hobergenix 
Gen 7 Ver 1.5 Endstop Pull up resistor.
January 02, 2014 02:01AM
I am bringing up my gen 7 V1.5 board and have loaded the Tcup firmware. I have motors moving
and it is seeing my opto endstops. I am in the process of moving the electronics off my test bed
and onto my Hadron Ordbot frame.

I am going to be useing Microswitches for the endstops until I get proper mounting and sensor trips
in place for the opto sensors.

I have the microswitches wired with the common side to ground and the N/C to signal on the board.
I will be adding a pull up resistor to make it work properly.

Should I add the pull up resistor on the gen 7 board or run another wire and add it at the microswitch.
I am concerned about electrical noise.

I have read that this can be done by modifing the Config.H file in the Tcup firmware but I am new to all
of this and would lie to do that later.

Mike
Re: Gen 7 Ver 1.5 Endstop Pull up resistor.
January 02, 2014 03:37AM
Personally, I think the board should be designed to include the pullup, so that if the wire is accidentally removed/mistakenly not fitted, then the endstop is always seen as tripped - that means a change to the design, but could be done by adding a surface mounted resistor between signal and power on the board (or make it a pulldown and invert the logic in the firmware?)

I put the resistor into the cable for my endstops (microswitches also) then have the signal wired to common and ground connected to N/C (power is not connected) this way, when the contact is made (and the N/C becomes open) the pullup pulls the signal high. Another way of doing it is to run all three wires to the switch (Signal to Common, Ground to N/C and Power to N/O) with a pullup across the switch contacts between N/O and N/C - this will pull up during the millisecond or so that the switch is between states and go to a high current High state when the switch is all the way made.
Re: Gen 7 Ver 1.5 Endstop Pull up resistor.
January 02, 2014 07:32AM
ATmegas have such a pullup resistors built in, so there's no need for adding another one on the board. With Teacup, you enable this internal pullup with USE_INTERNAL_PULLUPS in config.h.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen 7 Ver 1.5 Endstop Pull up resistor.
January 02, 2014 04:45PM
I did some reading and am aware of the internal pull up resistors in the ATmega. I am not sure how to
modify or add that to the config.h file as of yet. I am new to all of this and just learning the ropes so to
speak. I used the config.h file that was for the Ver 1.4 board and renamed it to config.h file.

I see the following line in the config.h file

/** \def USE_INTERNAL_PULLUPS
internal pullup resistors
the ATmega has internal pullup resistors on it's input pins which are counterproductive with the commonly used eletronic endstops, so they should be switched off. For other endstops, like mechanical ones, you may want to uncomment this.
*/

I am not sure how to modify it to add the use of internal pull up resistors. I was also under the impression
that each limit sensor could be modified as well as the polarity so that the microswitch could be set up
to run as either Normaly open or normally closed.

Mike
Re: Gen 7 Ver 1.5 Endstop Pull up resistor.
January 03, 2014 04:45AM
I believe Marlin has a similar option also - I can't recall seeing a note in the circuit diagram explaining that they are handled in the IC - but having it in there (as an unpopulated option?) doesn't cause problems, and if a new version of a chip comes out without the pullup, it's still compatible (but I'm a lazy designer and I don't like to engineer things twice)
Re: Gen 7 Ver 1.5 Endstop Pull up resistor.
January 03, 2014 05:34AM
Quote

I am not sure how to modify it to add the use of internal pull up resistors.

Remove the // in front of the line following the comment you cited.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Gen 7 Ver 1.5 Endstop Pull up resistor.
January 04, 2014 04:35PM
Thanks for all the help and comments.

I now have my Hadron Ordbot X any Y axis up and running with the software
seeing the Microswitches. I have to get another two Polou driver boards to
bring up my Z and extruder steppers.

For now I load a STL file just excersize the X and Y axis. I have not built anything
in a while and was extremely pleased with my Gen 7 1.5 board. I was a little concerned
soldering the USB chip in place. I made one mistake when soldering the two capacitors
in for the oscillator but after correcting the error I started to see my steppers move!

Mike
Sorry, only registered users may post in this forum.

Click here to login