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

[FR] Trigorilla Pro STM32 - Power loss detection #27244

Open
van0014 opened this issue Jul 5, 2024 · 2 comments
Open

[FR] Trigorilla Pro STM32 - Power loss detection #27244

van0014 opened this issue Jul 5, 2024 · 2 comments
Labels
T: Feature Request Features requested by users.

Comments

@van0014
Copy link

van0014 commented Jul 5, 2024

Is your feature request related to a problem? Please describe.

There is a bit of information on the Trigorilla Pro board, and it seems practical to implement this. There's a nice pin debug system in Marlin, and this was enough for me to do some tests with. I just couldn't implement it.

I would try to do it myself, but am not experienced enough with C. Only with Arduino, which isn't as advanced.

Are you looking for hardware support?

Anycubic Delta - Trigorilla Pro, STM32

Describe the feature you want

Power loss detection with the stock Trigorilla Pro, STM32 hardware

The hardware may not yet be fully understood. The power loss circuit must first be activated before the onboard capacitor is charged. And i'm not certain whether the capacitor or FET needs to be soft started

Additional context

There is some schematics on thingyverse, as well as pin function explainations.

https://www.thingiverse.com/thing:4271636

-The cap charge/activate pin is on Pin PG4 (Pin 100)
-The comparator is on Pin PG2 (Pin 98). Pin seems to be LOW normally, and HIGH when 24v power is off
@van0014 van0014 added the T: Feature Request Features requested by users. label Jul 5, 2024
@van0014 van0014 changed the title [FR] Blind PWM Charging a power loss recovery capacitor via a transistor [FR] Charging a power loss capacitor, via a transistor Jul 5, 2024
@van0014 van0014 changed the title [FR] Charging a power loss capacitor, via a transistor [FR] Charging a power loss capacitor with PWM Jul 5, 2024
@rondlh
Copy link
Contributor

rondlh commented Jul 11, 2024

I don't fully understand, what would be the benefit of this feature?
Don't these backup power modules have a power fail signal/pin, that is used by Marlin to handle some last minute activities?

@van0014
Copy link
Author

van0014 commented Jul 11, 2024

Yes, so basically power loss isn't working with stock trigorilla pro hardware. They have a pin to signal power loss. They also have a 1F capacitor, but it's FET driven.

If it's safe, the FET can just be turned on when power loss detection is needed. Otherwise, a basic PWM soft start should be all it needs. It seems that once it's charged, it should continue powering the 5v rail via a FET that's powered from the charged capacitor. Possibly the power loss circuit just needs a quick pulse, before there's enough voltage in the cap for the 5v side FET to remain on

The comparator may only work properly once the 'charge' pin is off again, because the cap 'charge' pin is linked to the comparator positive.

I've done some basic tests with Marlin's debug feature. Unfortunately because I changed my stepper motors, I cannot easily run stock firmware to properly test how it functions when charging and during power loss

image

@van0014 van0014 changed the title [FR] Charging a power loss capacitor with PWM [FR] Trigorilla Pro STM32 - Power loss detection Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Feature Request Features requested by users.
Projects
None yet
Development

No branches or pull requests

2 participants