-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interference with pulseIn function #3
Comments
Are you able to produce a minimal example or share some of the code that goes into this? In particular, do you know of any particular pulse sequences (after massaging) that don't get the desired response? |
A simple use of pulseIn (xxx,HIGH); to read a servo input from a servo
tester, reverse it (yyy=3000-xxx) and output it using precision servo
results in continual twitching of the servo. Servo tests OK, precision
servo works OK with a "sweep" sketch.
…_____________________________
John Kallend
Professor Emeritus
Department of Mechanical, Materials and Aerospace Engineering
Department of Physics
IIT, Chicago
On Fri, May 6, 2022 at 6:02 PM Timothy Moore ***@***.***> wrote:
Are you able to produce a minimal example or share some of the code that
goes into this? In particular, do you know of any particular pulse
sequences (after massaging) that don't get the desired response?
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AO6OKKKYT3YFDC4BRZOG4WLVIWQGTANCNFSM5UGHW2FQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
To confirm, do you have a voltage regulator in the circuit? For example, L7805CV |
No.
…_____________________________
John Kallend
Professor Emeritus
Department of Mechanical, Materials and Aerospace Engineering
Department of Physics
IIT, Chicago
On Sun, May 8, 2022 at 10:43 AM Timothy Moore ***@***.***> wrote:
To confirm, do you have a voltage regulator in the circuit? For example,
L7805CV
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AO6OKKKG4LAA5DS3W3E6RPLVI7OI7ANCNFSM5UGHW2FQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
From when we were testing without a voltage regular the servo can behave very unexpectedly, and one of those things we saw was the type of twitching you describe. This is particularly exacerbated when running from battery, since the voltage from the battery will change based on its capacity (google a battery charge voltage graph or battery capacity voltage graph), and will change based on the temperature I would strongly encourage burning off some of the electricity to get a more stable voltage via a linear voltage regulator and seeing if that helps with the twitching. linear regulators are very cheap (under a dollar) and absolutely worth it Watch out though - linear voltage regulators can only step down the voltage by increasing resistance, so ensure that the input voltage is higher than the target voltage. For example, target 5v with a 6v battery. You know you're overdoing it if the regulator gets too hot, and under-doing it if you don't get a consistent voltage off a voltmeter |
I want to read an input pulse on PB1, modify/massage it, and then output the modified pulse on PB0 to a servo using PrecisionServo.
The output works fine and gives very precise servo pulses, however PrecisionServo seems to screw up the pulseIn( , ) function.
ATtiny85 running at 1MHz.
Any suggestions?
The text was updated successfully, but these errors were encountered: