Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Analog output malfunction on AO2 #95

Closed
i-herrera opened this issue Aug 3, 2022 · 2 comments · Fixed by arduino/mbed-os#31
Closed

Analog output malfunction on AO2 #95

i-herrera opened this issue Aug 3, 2022 · 2 comments · Fixed by arduino/mbed-os#31
Labels
conclusion: off topic Off topic for this repository conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project

Comments

@i-herrera
Copy link

It seems like AO2 pin is not correctly configured for PWM. There must be an issue in the AnalogOutClass section of the Arduino_MachineControl lib:
https://github.com/arduino-libraries/Arduino_MachineControl/blob/master/src/Arduino_MachineControl.h#:~:text=class%20AnalogOutClass%20%7B

The issue was discovered as follows: Even when AO2 is set to output 0V it always outputs 10V. I managed to replicate this result using the 'Analog_Out' sketch from Arduino_MachineControl library and configuring the Ao" as follows:

inside setup(): analog_out.period_ms(2, 4);
in loop(): analog_out.write(2, 0);

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Aug 3, 2022
@bradmartin333
Copy link

I was able to set AO2 to different values, but the initial value for this IO is 10V
Here is a video I made demonstrating this

@leonardocavagnis
Copy link
Collaborator

Hi @i-herrera, @bradmartin333,
This issue is caused by an erroneous management of the mbed-os core for the High-Resolution timer connected to AO2 pin.
Refer to the linked PR.

@per1234 per1234 added conclusion: off topic Off topic for this repository conclusion: resolved Issue was resolved labels Oct 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
conclusion: off topic Off topic for this repository conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants