AI Fusion Lab PWM does not work properly!

Hi! I bought my AI Fusion Lab at the end of March 2026, I received it on the 31st and I’ve been going thru the exercises and examples in the ai-lab-kit and fusion-hat directories, and I think that either my Fusion Hat or your libraries or modules don’t work properly at least with the PWM part. It started when I constructed the included camera, pushing the zero button did not work, no blinking of the on board led like in the video or any movement from the servo, so using your SunFounder PCA9685 servo driver I zeroed the servos. When I ran the 1.4 Passive buzzer lesson the music was really and I mean really off, so I rewrote the tune to a tune that I know (Ô Canada) and that came out again bad. I then proceeded to test the PWM module with your PWM_test.py and my oscilloscope and found that the maximum frequency I could obtain was 549 Hz, the duty cycle % is not constant from one run to an another. Do you have a problem with your Fusion Hat and modules or do I? Do I need to send the hat back?

The homing button has been pre‑programmed with code on the chip before leaving the factory. Generally, after connecting a battery to the Fusion HAT and pressing the power switch on the Fusion HAT, the two yellow power indicator LEDs will light up. Then, quickly press the homing button twice to make the servo return to its zero position.

Please take a photo of the Fusion HAT after it is powered on and send it to us.

Regarding the issue with the music not playing correctly in Lesson 1.4, could you take a video and send it to us?

Are you using the image we provided? We need a bit more information to test and see if we can reproduce the issue on our end.

Ok. I finally understood your youtube video, where you do not say that the Pi must not be ON for the zeroing of the Servos and it does not say that you have to press the zeroing button twice.

So now I can make the zeroing button work, so thank you for the info and maybe add that information to your text and video. I also noticed that there is a little difference between your zero degree and the one from a script. I’ve made my own zeroing script for the PAN & TILT servo and when I CTRL+C out of the script it makes the pan go to zero degree and -30 degrees for the optimum position for the camera to view my center area of view.

My script for zeroing and setup for optimum view of my desk area with the camera:

#calibre_Servo_2026_04_01.py pour placer la caméra ou un servo où l’on veut. Il s’agit de choisir les broches
#PWM où les servos sont branchés et donner l’angle que l’on veut à la sortie du script (CTRL+C)

#Les librairies
from fusion_hat.servo import Servo # Importation de la classe (“class”) Servo
from time import sleep # Importation de sleep pour les délais

Déclaration et initialisation des classes servo2 (PAN) sur la broche PWM2 et servo3 (TILT) sur la broche PWM3

servo2 = Servo(2)
servo3 = Servo(3)

#Boucle où l’on place les servos à zéro degrés. Pan -90 vers la gauche Tilt -90 en haut
try:
while True:
servo2.angle(0) #On peut changer l’angle ici à ce que l’on veut (-90 à +90) ATTENTION aux fils
sleep(0.1) # délais
servo3.angle(0) #Faire attention ici si c’est le tilt de la caméra. Plage MAXIMUM (-90 à +30)
sleep(0.1) # délais

la sortie On place les servo à la position à laquelle on veut les avoir pour OpenCV etc (pour moi pan=0 tilt=-30)
except KeyboardInterrupt:

arrêt du programme avec Ctrl+C

servo2.angle(0) # Retour du servo à la position voulue
servo3.angle(-30) # Retour du servo à la position voulue
sleep(0.1)

(attachments)

Thank you for your suggestion. Are you referring to this video of ours? It does emphasize the need to press the power button on the Fusion HAT to turn it on, and to press it twice for zeroing — perhaps you missed that.

Also, the zero degree position and the one from a script are generally consistent. There may be a slight offset of a few degrees due to gear backlash in the servo horn. But an offset of 30° likely indicates an assembly issue on your end.

You can remove the servo from the horn, press the Zero Button, and then reattach the horn so that it faces straight forward. Finally, tighten the servo screw.

Of course, after reassembling, you can fine‑tune the angles of both servos using your own code.

Thank you for your insight, but there was no error in the assembly, only a couple of degrees difference from scketch to zero button. And the part of the PWM on your Hat is not working properly on my end. I know this because I’ve been working with your SunFounder PCA9685 16 Channel 12 bit PWM Servo Driver for Arduino and Raspberry Pi and the PWM on my fusion hat does not have the same behavior has the PCA9685. And how about the fact that if I use the PWM1 pin the tilt servo (PWM2) moves!!!

But again thank you for your help. As always I do appreciate the fact that you try your best.

Charles

Envoyé de mon iPad

Please specify about this issue “PWM is not working properly”.

You can run the following example to see if the servo rotates back and forth between -90 and 90 degrees.

cd ~/ai-lab-kit/python/
sudo python3 1.7_Servo.py

As for the issue where PWM2 moves simultaneously when controlling PWM1 — this is very unusual. It may be that the PCA9685 library you are using is not compatible with the Fusion HAT.

We recommend testing with the Fusion HAT library instead.

You could also send us a video so we can check whether the Fusion HAT itself might be faulty.Please upload the video to Google Drive and share the link with us.

Hello! I’ve been communicating with you for multiple times and you always comme back with another question or the same one. So for the last time: the servo works properly, I am not using the PCA9685 library with the Fusion Hat I’m using the fusion_hat.pwm library. And I can only get around 550 Hz as a frequency and it is always off by more than 10%. The pulse_width_percent is always off and I have to run the script more then once to get it to the right percentage. And the most annoying is when I use the PWM(P1) it makes my servo (connected on P2) move. But I guess I will try to buy elsewhere from another producer from now on. This is simply a waste of my time.

Thank you and have a nice day.

Charles

Envoyé de mon iPad

Thank you for your continued patience and for sharing the detailed issue.

To resolve this for you as quickly as possible, please contact our support team at service@sunfounder.com with your original order number and shipping address. We will arrange to send you a replacement Fusion HAT that has been fully tested before shipping.

Hello! I bought my AI Fusion Lab Kit on Amazon with the Order # ‫701-5696238-0445049

I received the kit on March 31st or April 1st. My coordinates are:

NAME: Charles Menard
ADDRESS: 2040 Notre Dame est, apt #1
CITY: Victoriaville
PROVINCE: Qc
COUNTRY: Canada
POSTAL CODE: G6P 4B9

Have a good day.

Charles Menard

Envoyé de mon iPad