Fix: Increase caselight PWM frequency to eliminate LM3407MY inductor whine#10
Open
a-github-username wants to merge 1 commit intoMotorDynamicsLab:masterfrom
Open
Fix: Increase caselight PWM frequency to eliminate LM3407MY inductor whine#10a-github-username wants to merge 1 commit intoMotorDynamicsLab:masterfrom
a-github-username wants to merge 1 commit intoMotorDynamicsLab:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
Despite the LM3407MY having an internal clock rate beyond the audible range (300kHz to 1MHz), the MCU controller PWM signal to the actual LM3407MY chip was set to 4kHz. This was switching the entire LM3407MY chip off and on in the audible range which was causing the L1 inductor to "whine" at 4kHz.
So the assumption that just because the LED control chip has a clock rate beyond the audible range doesn't mean that it can't necessarily have inductor whine given the entire chip is essentially subject to the cycle rate of the MCU PWM pinout. Therefore the internal switching frequency of the LED controller is actually completely irrelevant here.
The fix:
[output_pin caselight]
pin: PE6
pwm:true
hardware_pwm: False
value: 0.20 #startup value
shutdown_value: 0
#value:1
cycle_time: 0.00025 (4kHz) --->>> 0.0000164 (61kHz -- I chose a prime number to further prevent any resonance frequencies)
**Note that I contacted LDO support on the West3D Discord channel and provided video evidence of the exact issue.