Trinket Pro 5V Servo Jitter with FTDI cable connected

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
airscapes
 
Posts: 52
Joined: Mon Jan 25, 2016 12:24 pm

Trinket Pro 5V Servo Jitter with FTDI cable connected

Post by airscapes »

Working on a servo project and running into a jitter problem when running the potentiometer server sketch. I am powering everything from and external 5v source and the without the FTDI cable installed the servo does not jitter, when I have it plugged in so I can monitor the serial console it jitter like crazy and is rather useless. I tired a cap between power and ground within the servo power circuit which does nothing to help. As soon as the FTDI cable is removed all is well.
Is it possible that USB power from the computer is at a slightly different voltage then my 5v external USB power supply I am using?
Any ideas? This is not on a bread board, it is fully wired and complete so can not easily power the servo from a different source. I really would like to be able to run this with the console while writing the code.
The end application is a mechanical control of dimmer knobs on a LED grow panel to bring up the light slowly to the set value (pot) over an hour after power on, and the back down before night time (power off). I will also want to manually control the dimmer with pot, after initial startup function completes and that new position will be needed of the power down function, so a good bit of code to write and monitor
Thanks in advance!
Doug

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: Trinket Pro 5V Servo Jitter with FTDI cable connected

Post by adafruit_support_bill »

If you have a lot of serial output it might cause some interrupt contention and affect the timing of the servo pulses.

User avatar
airscapes
 
Posts: 52
Joined: Mon Jan 25, 2016 12:24 pm

Re: Trinket Pro 5V Servo Jitter with FTDI cable connected

Post by airscapes »

makes sense, will comment the prints and if it fixes it!

User avatar
airscapes
 
Posts: 52
Joined: Mon Jan 25, 2016 12:24 pm

Re: Trinket Pro 5V Servo Jitter with FTDI cable connected

Post by airscapes »

That was the problem!!

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: Trinket Pro 5V Servo Jitter with FTDI cable connected

Post by adafruit_support_bill »

There are a couple ways to deal with that - assuming that you still need the serial output. One is to slow down the rate of the serial data. The other is to off-load the servo signal generation to another board like one of the PWM/Servo breakout boards.

User avatar
airscapes
 
Posts: 52
Joined: Mon Jan 25, 2016 12:24 pm

Re: Trinket Pro 5V Servo Jitter with FTDI cable connected

Post by airscapes »

I think at this point if I need the data it will only be for debugging purposes as I have figured out my max and min pulse rates for both servos. So the constant output really was never "needed" it was in the example sketch for servos with a pot and I just assumed it was ok and should work. Just a reminder to me this is not a SBC and just a little looping counter with limited resources :-)
Have a great day and thanks again!
Doug

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”