Skip to main content

Timeline for PID control arduino

Current License: CC BY-SA 3.0

7 events
when toggle format what by license comment
Dec 5, 2022 at 16:48 comment added Dave X Is the cycle time between reporting/looping mostly the time it takes to print each ~50char line at 9600 baud? Is the input changing due to just you wiggling the accelerometer? Why use the map() rather than use the measurements and setpoints directly? If you want to think in terms of '336' being level, you should use it drectle and scale your pid parameters to translate units of error into units of output.
May 27, 2016 at 23:18 answer added slightlynybbled timeline score: 2
May 27, 2016 at 22:49 comment added Chris Stratton You appear to be slamming to the alternate output limits. To investigate this type of problem, generally try reducing the gain, look at how the default sample interval means the calculation may only be performed on some loop iterations, and make sure you don't have any "all or nothing" integer vs. floating point conversions. You may want to move the PID code into your sketch and add debug output to it.
May 27, 2016 at 22:28 history edited lightro CC BY-SA 3.0
added 877 characters in body; edited tags
May 27, 2016 at 22:21 history migrated from electronics.stackexchange.com (revisions)
May 27, 2016 at 22:02 comment added Transistor (1) I don't see the make, model and link to datasheet of your sensor in your question. (2) I don't see a schematic. (There's a button on the editor toolbar.) (3) You haven't posted any voltage readings on the analog input to confirm that the accelerometer is working properly.
May 27, 2016 at 21:58 history asked lightro CC BY-SA 3.0