Twitching servo when used with Crowpanel 7.0

Hello,
In my project I am using a Crowpanel 7.0 in conjunction with a Crowtail servo plugged in the GPIO_D port.
I am witnessing something weird, which is that, when I touch anywhere on the screen (not only on sections that would cause the servo to be operated), the servo begins to twitch (it does not change position, but there seems to be some kind of vibration/white noise occurring in it).
I tried to test the Lesson 09 tutorial code to see if I had the same behavior, but I did not manage to get it running (the screen is showing black when the code finished loading). I used a modified version of the ino file that I got from https://www.elecrow.com/wiki/ESP32_Display_7.0-inch_HMI_Arduino_Tutorial.html#design-ui-file-with-squareline-studio, and that I modified a little bit as well. You will find the ino file linked to this message. I changed the type to txt in order to be able to link it.
Have you witnessed this kind of behavior before? If so, can you give me some tips on how to solve it, please?
Have a great day!

Comments

  • I am going to make a stab at this, the GPIO pin PWM cycle is being disturbed by the the touch sensor of the screen. You might want to add PCA9685 and connect the controller to the PCA9685 via i2c. This is a 16 Channel 12-Bit PWM Servo Motor Driver and around $7 per board. Two advantages, stable signal to PWM, and separate power so not to cause noise back in the controller. Very easy to use. The other possibility is to add a small secondary processor like the seeed xiao to control the servo

Sign In or Register to comment.