Skip to content
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

[POWER/TWIST API] Connection/Disconnect capacitor functions inverted #95

Open
pierre-haessig opened this issue Jan 15, 2025 · 1 comment
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Comments

@pierre-haessig
Copy link
Contributor

Together with @jalinei, we noticed that the TwistAPI::disconnectAllCapacitor function does the opposite of what it says, in the 0.9.0 branch. That is, to disconnect the Aluminium electrolytic capatictor, one needs to call connectAllCapacitor instead!

To Reproduce
Steps to reproduce the behavior:

  1. Load the Voltage mode example, using the 0.9.0 branch
  2. Compile and upload the code
  3. Check the status of the Capacitor 1 and 2 pins of the SPIN µC: I don't remember the logic behind the capacitor connection exactly, but the pin voltage is opposite of what it should be
@pierre-haessig pierre-haessig added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Jan 15, 2025
@jalinei
Copy link
Contributor

jalinei commented Jan 15, 2025

MCU signal disconnect goes through the optocoupler that inverts the logic:

  • When GPIO is low, photodiode is off, phototransistor is opened and gate signal is high through the pull-up resistor.
  • When GPIO is high, photodiode is on, phototransistor is closed, so gate signal is pulled to ground.

image

@luizvilla can you take care of that one ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants