tag:blogger.com,1999:blog-4047932423337247732.post6014882056380144139..comments2024-03-05T22:38:34.199-08:00Comments on peter's tinkering: Yet Another Arduino Magnetic LevitatorPeterhttp://www.blogger.com/profile/13835034827173647543noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-4047932423337247732.post-12727558319761220182017-01-17T07:26:15.664-08:002017-01-17T07:26:15.664-08:00Sorry, here
https://www.youtube.com/watch?v=tEYj...Sorry, here <br />https://www.youtube.com/watch?v=tEYjYxpJ1o8<br />joehttps://www.blogger.com/profile/12493077096803386519noreply@blogger.comtag:blogger.com,1999:blog-4047932423337247732.post-39596411500780843542017-01-17T05:26:00.461-08:002017-01-17T05:26:00.461-08:00Hi Peter,
Just to tell you I finally made it! I...Hi Peter, <br /><br /> Just to tell you I finally made it! I used ir led sensors instead, but my setup includes both (hall & ir leds). You can have a look here:<br />https://www.youtube.com/edit?o=U&video_id=tEYjYxpJ1o8<br /><br />Thanks a lot for your help!<br /><br />Regards,joehttps://www.blogger.com/profile/12493077096803386519noreply@blogger.comtag:blogger.com,1999:blog-4047932423337247732.post-56184014400290204992016-12-20T18:45:49.719-08:002016-12-20T18:45:49.719-08:00Yes, I did the calibration calculation average wit...Yes, I did the calibration calculation average with the levitating magnet removed from the coil. That corrects for any movement in the hall effect sensors that affects their sensitivity, and tells the program what the hall effect sensors would see without any additional magnets, so it can figure out what the effect of the magnet is.<br /><br />If the heuristic tuning techniques aren't working, I'd recommend just trying to brute force it. Keep the derivative and integral values at zero, and find a proportional value that works the best (it still probably won't work well enough for it to be stable). Then, slowly increase the integral coefficient until it works slightly better. Finally, add the derivative coefficient and tweak the other two coefficients around until it works.<br /><br />If that still doesn't work, it is possible that the power supply and coil combination aren't strong enough to make any combination work. Mine just barely works - any lower voltage on the coil, or fewer turns on the electromagnet, and it probably wouldn't function regardless of the tuning. You might want to give some attention to improving the electromagnet part if the tuning just isn't working out no matter what parameters you try. <br /><br />I also found that the mass and shape of the levitated object has a big impact - wide, well balanced objects like the screwdriver in the picture were much easier to make stable than small compact objects like a single bare magnet (which I never managed to keep stable).Peterhttps://www.blogger.com/profile/13835034827173647543noreply@blogger.comtag:blogger.com,1999:blog-4047932423337247732.post-9908997604495362362016-12-20T05:38:41.260-08:002016-12-20T05:38:41.260-08:00Hi there again...
I am about to change it to ir-le...Hi there again...<br />I am about to change it to ir-led, because the correctedval does not seem to respond to the desired speed. Am I supposed to do the average calculations with the ball removed or placed at the desired setpoint? I tried to used instead HallB- HallA readings, but it goes up and down before moving. I've also tried with matlab and simulink, system identification process...but my skills seem to reach just linear models, not non-linear models. I have quite a good hint about the values, but I got saturation. Any help?? <br />joehttps://www.blogger.com/profile/12493077096803386519noreply@blogger.comtag:blogger.com,1999:blog-4047932423337247732.post-4295615251357623552016-10-12T19:20:48.105-07:002016-10-12T19:20:48.105-07:00It should work then if it's stationary.
For ...It should work then if it's stationary. <br /><br />For mapping double (or float) values, I've used the function here before - http://forum.arduino.cc/index.php?topic=3922.0<br /><br />I did all of the tuning for mine by brute force, and it took a really long time. Every time I changed something (different power supply voltage, different magnet), I had to go through the entire process again, so I'd be interested to hear if you have success with the Ziegler Nichols technique.Peterhttps://www.blogger.com/profile/13835034827173647543noreply@blogger.comtag:blogger.com,1999:blog-4047932423337247732.post-34742717667426578492016-10-11T05:22:16.785-07:002016-10-11T05:22:16.785-07:00Hi, thanks for your reply. It would be stationary,...Hi, thanks for your reply. It would be stationary, in order to increase the Setpoint. <br /><br />I also want to do the PID calibration by mapping the Output to <br />MyOutput = map(Power, 0,255, SetPoint*.5, SetPoint*1.5) <br /><br />and try the Ziegler Nichols tunning through this process:<br />1. Place the magnet close to the SetPoint<br />2. Kd, Ki = 0<br />3. Change the setpoint to find the constant proportional Kg that gives the more stable wave , and then do the calculations <br />Serial.print(SetPoint);<br />Serial.print(" ");<br />Serial.println(MyOutput);<br /><br />I guess MyOutput will move along with the setpoint in order to find the optimum<br />I am having trouble with the map, since the data is double, but I don't know yet how to do so. <br /><br />Do you think my aproach should work?<br /><br />Regards<br />joehttps://www.blogger.com/profile/12493077096803386519noreply@blogger.comtag:blogger.com,1999:blog-4047932423337247732.post-26718812773469370932016-10-10T19:56:45.524-07:002016-10-10T19:56:45.524-07:00It depends. Would the magnet be moving or stationa...It depends. Would the magnet be moving or stationary? If stationary, yes, the code should work. It will see a constant magnetic force that it will cancel out when it performs the initial calibration. If the top magnet is moving, the top hall effect sensor will not be able to properly cancel out the electromagnet's effect on the bottom magnet.Peterhttps://www.blogger.com/profile/13835034827173647543noreply@blogger.comtag:blogger.com,1999:blog-4047932423337247732.post-24352201039115183792016-10-09T22:52:59.486-07:002016-10-09T22:52:59.486-07:00Hi, nice job.I have a cuestión. If I put a magnet ...Hi, nice job.I have a cuestión. If I put a magnet over the top hall sensor, would the code work as well? If so, what parameters could be affected? Thanksjoehttps://www.blogger.com/profile/12493077096803386519noreply@blogger.com