Questions tagged [pid]

A PID controller is a control loop feedback mechanism (controller) commonly used in industrial control systems. Use this tag for discussions about PID algorithms and libraries.

Filter by
Sorted by
Tagged with
1 vote
0 answers
62 views

PID cooler temperature control

Hello Hello I am making a controller of a small cooler (dry ice) PID but Im not sure if I am using the indicated mosfet Im trying with a NPN 222a and my second option is IRFZ44 Which would be the best ...
user avatar
1 vote
2 answers
109 views

PID control doesn't work. After computing the values, the values just become equal to 0

So, I have a working code of the stabilizer project using 2 servo motors, mpu6050, Arduino Uno. However, I want to add PID part for tuning the servo motors movement. I followed the example PID library ...
user avatar
1 vote
0 answers
97 views

Arduino Nano PID Controller with Potentiometer + IBT-2 Motor Control Board

I have a potentiometer connected to an analog pin A1 and would like to implement PID Control to move a robot arm up and down based on to a given serial command. For this to work I will need PID out ...
user avatar
1 vote
1 answer
42 views

Mixed SHARP IR Sensor Readings

I'm using the GP2Y0A21YK Sharp IR Sensor in a ball and beam system where I'm trying to balance the ball in the center of the beam using the IR Sensor as a distance locator and a servo motor to tilt ...
user avatar
2 votes
0 answers
47 views

I need help making an arduino control system [closed]

My project is to use an Arduino to control two solenoid valves with pwm and receive an input signal from a sensor as feedback. As can be seen from the picture, the valves direct the flow of water ...
user avatar
2 votes
0 answers
59 views

Bug in code of Self-Balancing Bot [closed]

1)The values drifts to the extreme every time I run this , I guess this is due to my mistake in the calculation of angles or in the filter that I have applied which I have been trying to but can't ...
user avatar
2 votes
2 answers
103 views

Assistance with PID DC Motor Acceleration

I'm working on a project that uses an Arduino UNO and a motorized fader to send and receive MIDI data from my computer/musical keyboard. I'm trying to set up my motor with PID to control the position ...
user avatar
1 vote
1 answer
88 views

PID Arduino UNO

I want to implement a PD controller in Arduino using the PID library. Should I put Ki=0 and the rest of the constants as desired? /* BALL BALANCING USING A PID CONTROL with 6" resistive ...
user avatar
  • 21
1 vote
0 answers
87 views

Arduino PID Library

I hope you're doing well. I have some questions regarding the PID functions. Can you please explain to me the following commands? I shall be very thankful to you. PID myPIDX(&InputX, &OutputX,...
user avatar
  • 21
1 vote
0 answers
27 views

How do I synch the Arduino PID library with an external timer for turn-rate control?

I have been trying to use the Arduino PID library for controlling the rate of turn (in deg/sec) of a wall-following robot. The robot's operating system uses TIMER5 on an Arduino MEGA2560 to update a ...
user avatar
2 votes
0 answers
24 views

Brushless ESC Recommendations

I've got a project in which I'll be controlling 8 24V/10A brushless DC motors with an Arduino Due on a quadrupedal robot. I've been having trouble finding ESCs that would work well for this ...
user avatar
4 votes
1 answer
452 views

Arduino timer interrupts for PID

I'm working on a robotics project where an arduino nano is acting as the motion controller. I'm trying to use a trapezoidal motion profile generator and PID loop to follow that profile, but I found ...
user avatar
  • 99
2 votes
2 answers
2k views

ESP32: How to run two independent PID controllers, one per core?

I want to control 2 independent processes with 2 PID controllers. Is it possible to run each controller on a separate core? I'm using this PID library. According to its documentation, the PID::Compute(...
user avatar
  • 61
0 votes
2 answers
136 views

Speed control of BLDC with an integrated controller (Hall out, PWM in)

I am aiming at precise speed control of this BLDC motor: it has an integrated controller, outputting digital Hall signal (period 20.8ms on oscilloscope, w/o load) and taking PWM as input for speed ...
user avatar
  • 159
2 votes
2 answers
581 views

Arduino PID controller for Triac

I am designing a new soldering station which will use a 24 V ac soldering iron. I started to make some research and I designed a few steps of the soldering station. I will use a 24Vac/100VA toroidal ...
user avatar
1 vote
0 answers
2k views

How would i add PID control to this servo motor control program. potentiometer

I have installed an AutoPID library (by ryan downing version 1.0.3) to my arduino IDE, but im not sure which parts i will have remove to get the PID to control the servo angle. Thanks for the reply, ...
user avatar
1 vote
1 answer
598 views

Trying to control DC motor speed with PID

i'm trying to control a DC motor with PID. I have already made a code where i control the motor with an ultrasonic sensor (for distance) but now i need to run the motor at a given RPM (the Output). I ...
user avatar
0 votes
0 answers
141 views

speed motor test with IR sensor and PID algorithm

I'm trying to control motor speed (RPM) using an IR sensor , All I've done is to control it without PID algorithm . and it works . can someone help me with implantation with PID . I'm using Arduino ...
user avatar
  • 7
0 votes
1 answer
242 views

Remote Controlled Self-Balancing Robot - how to mix control input with IMU input?

I'm building a two-wheeled, self-balancing, remote-controlled robot. I'm familiar enough with the IMU and PID to get it working to just stand up but I need to drive it via remote control. I've got no ...
user avatar
0 votes
1 answer
503 views

Making a PID Controller for BAR 30 pressure sensor

I am having issues with my PID controller for a BAR 30 depth sensor. The issue that I have is my ESC have two initial start up { 1500 - 1900} is min - max respectively clockwise and { 1500-1900} is ...
user avatar
2 votes
1 answer
157 views

Switch Control Between Two Different Techniques

I have implemented PID control of a generator governor to maintain a constant RPM using an Arduino Uno. It works pretty well, but there is a tradeoff between stabilty and response time. Using PID ...
user avatar
1 vote
0 answers
909 views

PID controlled DC Motor Speed

I'm writing a PID program for a simple DC Motor. This motor has an encoder at the bottom which allows me to read motor speed. The goal of the project is to provide a constant speed if there is light ...
user avatar
  • 11
0 votes
1 answer
943 views

Passing variables for a PID in an interrupt

I'm needing to pass variables from my timerIsr() function to my loop() function. I have little experience with the Arduino language, I'm mostly familiar with Python so this has been quite difficult ...
user avatar
  • 11
0 votes
1 answer
224 views

How to stabilize magnetic levitation system?

I followed everything from this project but still, the magnet is not levitating - https://www.hackster.io/jsirgado/magnet-levitation-with-arduino-eeeee4 The best I can do is to make the magnet jump ...
user avatar
  • 85
0 votes
1 answer
848 views

How to Simulate and Tune a PID

I've been trying to simulate a PID using Brett Beauregard's PID library in order to understand it better. Here is my code. #include <PID_v1.h> const unsigned int numReadings = 500; double ...
user avatar
2 votes
1 answer
837 views

Cascaded Control loop Arduino [closed]

I am trying to implement cascaded control system, with velocity inner loop and position outer loop. Separately and without cascaded control, I have implemented position control and velocity control ...
user avatar
2 votes
0 answers
264 views

Quadcopter oscillation using PID

I am building an Arduino based flight controller for a quadcopter and have got it flying but it is not performing how I want it to. The drone is flying but when I release the sticks the drone does ...
user avatar
1 vote
1 answer
194 views

SIlly PID question using the PID library

I'm new to PID. My goal: control the motor to get it to run a given RPM by a potmeter (which is setpoint). Sensor is optical (detects white line, reflections), counts 100 round in x amount of time. ...
user avatar
1 vote
1 answer
350 views

Frequent ON OFF in SSR

I am working on a project on Arduino OLED MAX6675 thermocouple and SSR for my oven. My problem is when my SSR goes in LOW or HIGH state it turn ON and OFF several times before going to permanent HIGH ...
user avatar
  • 113
0 votes
1 answer
330 views

What is better approach for non blocking pid algorithm?

I'm developing software side for 3 axes robot where are 360° continuous rotating servos used Documentation here these servos have its own feedback system so it's possible to control it's position ...
user avatar
0 votes
0 answers
244 views

Use of a logic level converter with Arduino Due PWM

Maybe I am way over my head here, but here it is: I am trying to regulate a spindle RPM. The tachymeter part is now working flawlessly. Now I am on the PID part, to control and regulate that speed. ...
user avatar
  • 175
0 votes
1 answer
218 views

P I D AND GY80 10 DOF

I am running the program for GY80 10 DOF , and runs fine . Date is printed on the serial monitor How ever I have failed to use this program for my WalkerBot (walker bot is a Robotic suit that I want ...
user avatar
1 vote
2 answers
118 views

Can removing lines of code destroy a motor driver and make it catch fire?

I am making a pid line follower robot. So I was tinkering with code to optimize my line follower when i removed two lines of code unknowingly. As soon as I uploaded my code and started the line ...
user avatar
2 votes
2 answers
2k views

How can an Arduino-Quadcopter be stabilized?

I have built an arduino quad-copter and I am using an MPU6050 to read the rotational position and velocity of the aircraft. The problem is that I cannot get the thing to stabilize. Watch this video ...
user avatar
  • 63
0 votes
2 answers
942 views

How to calibrate a PID?

I'm working on a pid-controlled levitating magnet device. It uses a hall-sensor to turn on and off an electro magnet in ordet to achieve levitation. When I hold a magnet close to the hallsensor, I ...
user avatar
  • 191
1 vote
1 answer
423 views

Float to integer conversion for control program crashes arduino

I have a program which estimates battery capacity, range as well as runs different control loops on an arduino MEGA2560 to control an eBike. I was using floating points which gave me quite a slow ...
user avatar
  • 131
1 vote
3 answers
143 views

Need help modelling and coding a feedback scenario

Above illustration is the basic setup for the question. The scenario will be the following: A potentiometer(providing 0 to 5V) is an analog input to A0. This potentiometer voltage is converted to ...
user avatar
  • 227
0 votes
2 answers
406 views

How can I convert PID correction values to an PWM brushless command?

Please I'm working on a quadcopter, and I have to made my own flight controller based on arduino uno. First of all please how can I get a filtred angular velocity and linear acceleration from the ...
user avatar
6 votes
2 answers
508 views

What is the proper way to implement PID?

I'm having some trouble conceptualizing how to go about implementing PID into my drone. There are a few ways I'm thinking about implementing the pipeline: Having one PID Object for each of the six ...
user avatar
  • 205
0 votes
1 answer
2k views

PID control arduino

I am hooking up an accelerometer to an arduino uno and running it through this pid controller. However the output isnt going to my setpoint. When i move the accelerometer back and forth the data goes ...
user avatar
4 votes
1 answer
6k views

QuadCopter PID using MPU6050

I am using Arduino Uno, with PID library and Jeff Rowberg library for MPU6050 i.e I2Cdev.h, MPU6050_6Axis_MotionApps20.h. There is one PID for each axis i.e Pitch and Roll, I am getting output that ...
user avatar
1 vote
2 answers
2k views

MPU 6050 stuck on same values

I'm having a problem with my MPU6050. I'm using PID to speed up a motor with the MPU values. What could the problem be? Here is a link to a previous question that I asked concerning a problem with ...
user avatar
  • 77
1 vote
2 answers
2k views

PID not working correctly

I'm currently working on a project where I need to use PID to get the correct speed for a motor when it is angled a certain amount. The problem is that I'm only getting 0.00 and 255.00 as the speed. ...
user avatar
  • 77
1 vote
2 answers
642 views

How does the PID controller actually work?

Preferably PID functions on an Arduino uno or any other examples. I have been researching but many of the the websites really do not explain it. P.S is there an algorithm for a PID? Thanks
user avatar
-2 votes
1 answer
59 views

Is there any realy working setup for multicopter with codes

I'm searching pc controlled quadrotor code projects. I tried to do strangedev's project but not works for me. Is any one test this project. PID commands works like relays. suddenley speeds up and ...
user avatar
  • 235
1 vote
1 answer
6k views

Regulation of the temperature using PID

I'm making a control system for the heating of a plate using a PID control. the goal is to regulate the temperature of the plate by changing the power dissipated by the resistance. By using a sensor ...
user avatar
  • 47
3 votes
0 answers
226 views

Why doesn't PWM work on arduino in this code?

I am trying to control a dc motor speed with PWM. When I test it with simple program like spin in one direction with set PWM value it works. If PWM>70 the motor will start spinning and max is 255. ...
user avatar
  • 31
1 vote
2 answers
3k views

How to read RC receiver channels without using pulsein() command with arduino

I am building a quad-copter, the problem is of stability and for better stability lesser sampling time is required. For lesser sampling time I need to have faster loop() function. But the Pulsein() ...
user avatar
0 votes
2 answers
13k views

PID control for Motor Speed control

I was trying to apply PI controller to a motor using Arduino. I have somewhat achieved the task but the problem is that it oscillates too much. Also i couldn't figure out what to do when pwm signal ...
user avatar
  • 21
4 votes
5 answers
40k views

Control Speed of DC FAN Using Arduino PID Library

I want to make a circuit that control speed of DC fan Using Arduino PID Library to get thing at specific temperature. The circuit looks like this but can be changed, The dc fan motor connected to PWM ...
user avatar