Johan4668 Posted March 29, 2023 Author Share Posted March 29, 2023 17 minutes ago, Vinc_Vega said: Hi Johan, why don't you use the full range of the km disk stepper during calibration (630 steps)? Imagine, if your disk has moved more than 460 steps away from the lower stop (already should be the case for adding the offset to the 460 steps), it will only go 460 steps back to zero itself and than to the offset to set a new zero. In that case you don't have the zero mark at 0 step position after the next calibration cycle. Try to start the arduino for several times and wait for the zero function for stepper0. At least it should add 12 steps for each calibration circle to the zero mark. The jumps around the zero position of the needle stepper may be caused by the IR sensor's gap width and the disk's detection slot width. I think that a combination of smaller sensor gap and smaller slot may bring you forward. At least a smaller slot should reduce the jumps. As long as that jumps only are while zeroing the pressure and not when flying, I wouldn't care about it. Regards, Vinc When I leave it on 630 the disk goes to the end and keeps pushing to the end for more them a second.. that's a horrible sound and the km is going faster then dcs on disk on 4 k and dcs 2.2 I'll make a movie of it... now it is on point.. the 0 on the stwpper is not the 0 written on the disk... I need to remake the disk that 0 stepper is also the 0 on the disk.. The needle is only doing that when you go up.. and after the ir detection.. when it sees the gap on 0 the needle when going up goes back 0.05 and that is there right place.. and passes the detection no problem.. and on the 0.05 it hops back to 1.. so strange.. the gap I already made that so small that its detection I 2 degrees a mm before and a mm after 0.. so the 0n 0.01 the ir is off.. and stays off till the zero.. When I come home I shall test it when after detection I take the detection wire out of the aeduino and see what it does.. the only thing I can think of is a reflection... but that is slimm.. Thanks again Vince you are a great help.. can't say it enough.. Link to comment Share on other sites More sharing options...
Vinc_Vega Posted March 29, 2023 Share Posted March 29, 2023 (edited) Hi Johan, going to the end stops should be the normal calibration procedure for that kind of stepper motors. I think that they already are designed to that. https://www.yumpu.com/fr/document/view/19008880/vid29-power-on-reset-procedure-guy-carpenter You may go back to the lower stop only by turning just from the 13 km mark to the stop and back to the offset. You also may use the offset not in the calibration procedure but in the mapping function. Than you should not have the problem of adding offsets for each reset. Regards, Vinc Edited March 29, 2023 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Johan4668 Posted March 29, 2023 Author Share Posted March 29, 2023 (edited) 1 hour ago, Vinc_Vega said: Hi Johan, going to the end stops should be the normal calibration procedure for that kind of stepper motors. I think that they already are designed to that. https://www.yumpu.com/fr/document/view/19008880/vid29-power-on-reset-procedure-guy-carpenter You may go back to the lower stop only by turning just from the 13 km mark to the stop and back to the offset. You also may use the offset not in the calibration procedure but in the mapping function. Than you should not have the problem of adding offsets for each reset. Regards, Vinc Where is that? The mapping what line? And this stepper is not moving 315 degrees I just don't understand that.. I thought that when you expand or make the rotation smaller you need to reduce the steps... The speedo is around 400 degrees then the steps to the end is more? 480 for around 140 degrees 630 for 315 degrees 1000 for 400 degrees... like the speedindicator I know the steps are not exactly correct but for me to understand.. Edited March 29, 2023 by Johan4668 Link to comment Share on other sites More sharing options...
Vinc_Vega Posted March 29, 2023 Share Posted March 29, 2023 (edited) 11 minutes ago, Johan4668 said: Where is that? The mapping what line? Hi Johan, I already explained that at the previous page. You may declare an offset variable and use it in the mapping function. int offset = 12; stepper0.runToNewPosition(map(newValue, 0, 65535, 0+offset, 290+offset)); // for the km disk in FULL4WIRE mode If the name "offset" already is in use, you have to choose a different name. Nevertheless you have to zero the stepper (not the disk) each time after booting the Arduino. Regards, Vinc Edited March 29, 2023 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Johan4668 Posted March 30, 2023 Author Share Posted March 30, 2023 11 hours ago, Vinc_Vega said: Hi Johan, I already explained that at the previous page. You may declare an offset variable and use it in the mapping function. int offset = 12; stepper0.runToNewPosition(map(newValue, 0, 65535, 0+offset, 290+offset)); // for the km disk in FULL4WIRE mode If the name "offset" already is in use, you have to choose a different name. Nevertheless you have to zero the stepper (not the disk) each time after booting the Arduino. Regards, Vinc Ye... and the problem is indeed the IR... closing the gap.. And i understand the offset testing tonight your the best Johan Link to comment Share on other sites More sharing options...
Johan4668 Posted March 31, 2023 Author Share Posted March 31, 2023 (edited) When I fixed the gap, it now 0.2mm and gives the needle 3 mm working on that to make it even smaller.. See the YouTube. Now to test the rs connection Edited April 1, 2023 by Johan4668 Link to comment Share on other sites More sharing options...
Recommended Posts