5 Replies Latest reply on Mar 25, 2020 3:30 PM by fmilburn

    raspberry pi project

    enesss

      Hello. I'm Enes. I just joinned you.  I have a project like the link as  PID based DC motor controller Project   .  I don't have rpm sensor right now. Can i do without this sensor? Can you also send the electronic diagram of the circuit?

        • Re: raspberry pi project
          fmilburn

          Hi Enes,

           

          Welcome. PID needs a sensor giving feedback on the actual speed to the controller or it cannot make adjustments. There are various ways to make your own sensor if you have access to say a photodetector, hall sensor and magnet, or even a wire making contact as it spins around.  Giving more information about your application would help give a better answer.

          2 of 2 people found this helpful
            • Re: raspberry pi project
              enesss

              my project is inverted pendulum based on image processing.  I just started. i will use pid controller. but i dont know how.

                • Re: raspberry pi project
                  fmilburn

                  In that case the camera used in the image processing is the sensor.  There is no RPM - the error fed back to the controller will be the amount of displacement of the pendulum from the desired vertical position as determined by the camera and image processing.  There is no circuit really, assuming you are using a Pi and associated camera.

                   

                  This is not a problem that I have worked on and I can only suggest doing a Google search.  This seems to be a popular problem for University students and MATLAB has tutorials as well as others based on a quick look.  MATLAB has free trials if I remember correctly and student options and has PID built in.  You can use MATLAB on a PC to generate C code on a Raspberry Pi. There may be information on using a Pi with camera and Python, I haven’t looked.

                   

                  edit:  are you constrained in the computer language used?

                  1 of 1 people found this helpful
                    • Re: raspberry pi project
                      enesss

                      I have matlab. but I wanted to know the motor control thoroughly before processing the image. thank you for your answers.

                        • Re: raspberry pi project
                          fmilburn

                          Again, this is not a problem I have worked but am assuming you will use the output of the controller to vary the direction and speed a motor turns.   The input to the PID controller will be pendulum displacement as determined from the camera (sensor).  From that the controller will calculate error, change in error, and integral and thus output.

                           

                          It is an interesting problem.  I am sure Element14 members would like to hear the details of your solution and issues you encountered along the way when you finish.

                           

                          Frank