Timeline for Requesting help with CNC Project using Arduino
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 23, 2019 at 17:55 | comment | added | chrisl |
About Serial: As I already wrote in the answer, if you just have commands consisting of 1 byte/character, you can just use Serial.read(), which reads exactly 1 character. About PWM: This is a a typical situation for a control cycle. Using PID is the best here. It get's you the desired output fastest and without oscillation. If you only calibrate the PWM values (mapping PWM values to RPMs by testing), that disregards the load on the motor and will not be accurate. Ultimately it is your decision, what you need. PID with the linked library is not difficult.
|
|
| Sep 23, 2019 at 16:58 | comment | added | Shreeniket Joshi | hi Chrisl, as for the PWM function. Yes I do have a tachometer. I am not sure if I want to use a PID, can you suggest as to how I can calibrate it manually? | |
| Sep 23, 2019 at 16:52 | comment | added | Shreeniket Joshi | A big thank you for your help! I will implement your suggestions one by one and see how the code improves. Your help has enabled me to start thinking like a programer and I can't thank you enough for this. As to respond to the action_permit. Yes its a normally closed button, also when I remove action_permit from any place in the code (I have tried removing it one by one at all places), the lines of code near that statement start misbehaving. In regards to your comment about the reading the input from the user, can you suggest a better alternative as to how to read 'y' and 'n'? Thankyou again! | |
| Sep 22, 2019 at 14:03 | history | answered | chrisl | CC BY-SA 4.0 |