Тёмный

Raspberry Pi PWM is jittery (seen with oscilloscope and logic analyzer) 

Scott Harden (SWHarden)
Подписаться 6 тыс.
Просмотров 2,7 тыс.
50% 1

Опубликовано:

 

22 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 4   
@PelDaddy
@PelDaddy 8 лет назад
Pretty normal for a Pi. You can use a Pi to drive an Arduino, or other MCU, or just a PWM chip to get a nice clean PWM from it. But something tells me you already knew that. It sounded like you wanted to generate a DC voltage from the Pi. You can get a reasonably stable voltage output with smoothed PWM from the Pi, if your smoothing is strong enough. I have used it to control analog meters with very little fluctuation with a good sized cap.
@laharl2k
@laharl2k 8 лет назад
are you using a real time OS? That extra delay looks like the delay from the scheduler. Even on a PC you have delays like that, the only way to fix it is using a rt os or recompiling the kernel with a shorter period / setting it as real time.
@akunog3665
@akunog3665 3 года назад
It looks like I'm a bit late to the party, But the pwm is indeed noisy/crappy compared to a nice hardware pwm solution. I tried to use it as the pwm signal for some LED lighting drivers by using a transistor to pwm the dim+ and dim- wires open/closed, but the lights were a bit flickery, sometimes jumping to full brightness when the pi would stumble a bit. However after switching approaches and filtering the signal with an RC filter, then feeding it to an op-amp powered with 12v I was able to get a very clean 0.7-10v signal when modulating the pwm wave. I used enough capacitance to get about a 3 second response time, so the filter is averaging about 3 seconds worth of pulses, at 1000 hz, that's 3000 pulses it's averaging.. if they are all a little different it's okay.. after averaging 3000 of them a few errant pulses and spikes will be invisible. In a simulator I was able to make a random noise signal come out to a perfect 5v (1/2 on 1/2 off). The key is sacrificing changing speed.. if you need the system to respond to change in milliseconds the pi will not work.. but if you don't care that it takes a few seconds for the power to come up to value it's fine. Raspberrypi fourm post : Creating a 0-10V voltage range for ballasts is where I got/stole the majority of the design.
@sarfata
@sarfata 7 лет назад
You should try pi-blaster. I wrote this (based on servoblaster) to fix this very problem. It uses the DMA controller to generate a stable pwm output: github.com/sarfata/pi-blaster Glad to see you back posting stuff!
Далее
Logical Analyzer from Aliexpress, Saleae Logic Clone
9:57
What’s your height?🩷🙀💚
00:59
Просмотров 4,6 млн
#839 Rigol MSO5000 Logic Analyzer
8:37
Просмотров 13 тыс.
Cheap logic analyzer SPI i2c UART
8:03
Просмотров 220 тыс.
WavetablePi: Better PWM audio
7:18
Просмотров 2,1 тыс.
The Petabyte Pi Project
22:27
Просмотров 2,2 млн
6 Horribly Common PCB Design Mistakes
10:40
Просмотров 209 тыс.
HP 9825 Repair Part 3: HP Logic Analyzer to the Rescue
20:37
How to Use an Oscilloscope - Mega Guide
18:53
Просмотров 168 тыс.
The Magic of RISC-V Vector Processing
16:56
Просмотров 318 тыс.
What’s your height?🩷🙀💚
00:59
Просмотров 4,6 млн