Showing posts with label limits switches. Show all posts
Showing posts with label limits switches. Show all posts

Wednesday, July 27, 2011

Bogdan makes a measurement suggestion...



After I got the x and y axes operating independently, Bogdan suggested that I measure the steps between the limits switches to see how much difference in measurements might be attributable to the mechanical microswitches that I am using.  I had already been recording that with the y axis, so I decided to extend the monitoring code a bit.


With the y-axis, I had been simply writing the number of pulses to an SD card whenever a limit switch was tripped.  In that I was running the axes at 65 mm/sec, I was getting a rather substantial thump whenever a switch was encountered.  When I thought about it, I began to suspect that the impact was a result of the time it was taking the write to the SD card to happen in that I was doing that immediately after the switch was tripped.  I changed the code to record a set number of triggering events for each axis and then exit the stepper loop and print the whole set of measurements at one time.  That reduced the noise of switch triggering on the x axis to almost nothing.  It also reduced the noise from triggering events on the y axis, but not as much.  Considering the y-axis is shifting the whole weight of the x axis assembly, the extra momentum generated thereby is probably causing the larger thump.


I first took a set of 50 triggering events running at 65 mm/sec.








You can see that the two limits switches on serving the x axis trigger with slightly different sensitivities, one triggering about 0.3 mm greater than the other {transition is running at 0.89 mm/step for both axes}. The both y axis limits switches trigger at the same place except that occasionally one gets moody and triggers 8 steps {~0.6-0.7 mm} longer than the first.


I then took another set of measurements at 32.5 mm/sec. The NEMA 23s were near resonance frequencies at this speed raising the noise level of the printer considerably. I will have to see about damping this.








What you can see is that the variation on the x-axis stayed about the same while the moodiness of the one limit switch on the y axis disappeared. Notice also that the steps between switches are down.


From there, I took a set of measurements at my usual printing speed for Rapman at 22 mm/sec.








Decreasing the transition velocity got us further away from the resonance frequencies of the NEMA 23s. It must be said, however, that the printer was still louder than when I was running it at 65 mm/sec. You can notice here that the variation in limit switch triggering has dropped to 1-2 steps.


This has been an interesting exercise. One thing that is obvious now is that to control noise levels I should be controlling the stepper speed both by the delays between steps and by adjusting the level of microstepping that I am using.


Wednesday, July 20, 2011

Leveraging Bogdan's anti-bounce circuit for Sampo...



In developing the Darwin-derivative, Rapman-derivative Sampo 3D printer project as a kaizen exercise I utilized the same sort of microswitches for limits checking as are specified in the Rapman design.  I soon discovered that the switches have a formidable electronic bounce.  I was able to control that using the button function in my firmware compiler for the y-axis.  The computations taken for a firmware fix, however, were going to put a terrific drag of my MCU that I didn't want to have to deal with.


Enter Bogdan Kecman with helpful suggestions on how to put together an antibounce circuit for the limits switches.






I had last built an antibounce circuit in 1981, so his help was greatly appreciated.  I built a lashup of the circuit to check to see that the component values were right and then went on to design a board to handle all six limts switches.  I wanted six instead of Rapman's three because a lot of problems that I'd had with Rapman stemmed from the fact that it has limits switches only on one end of its axes.  When things went bad one could find steppers trying to skate off of the unchecked far end of axes.  As well, Rapman limits checking only seems to be done when one is resetting the axes at the beginning of a print.  I want to do better than that.


I bought components and dug out my stripboard and had a go at the design.  Some time before I put together a stripboard design program after having had no luck with the ones I was able to access on the web.  Eventually, I evolved this board.


Frontside...






Backside...








It has been some time since I built a board, so I found putting this one together quite frustrating.  I was about to give up this evening after making a bunch of mistakes and then got angry to the point of rage.  The adrenalin let me get the @#$#@$ thing finished.








Tomorrow I will drill out the breaks in the strips, check the board for continuity and, if I have enough time, try to rig it into Sampo and extend the firmware to utilize it. I suspect that will have to wait till the weekend, however.