Questions tagged [pwm]

PWM (Pulse-width modulation) is a technique for controlling power to electrical devices, made practical by modern electronic power switches.

468 questions
1
vote
2 answers

How can I create a phase-shifted pwm signal ? The frequency and duty (%50)are fixed STM32F407

I want four pwm signals and same duty cycle (%50) and same frequency (100kHz) . And ı want this signals phase shift (for ex:45 degrees)
Bjorn
  • 11
  • 3
1
vote
0 answers

DIY car not moving in a straight line

I'm working on a project, in which I have assembled a 4 wheeled small DIY car, it has 4 DC motors, a raspberry pi 3b+, an L289D H bridge and two optical wheel encoders, one on each wheel on each side. The problem that I'm currently facing is that…
Rzer2000
  • 11
  • 1
1
vote
0 answers

Measure PWM Duty Cycle on RP2040 using micropython

I'm trying to use a Raspberry Pi Pico to measure an incoming PWM signal duty cycle and use the value to drive an I2C digital potentiometer. I'd like to use micropython as I know some of this already. The I2C output I have working with no problems.…
1
vote
1 answer

How can PWM be generated on the Raspberry Pi using wiringPi with C?

I'm trying to learn C and want to be able to generate a PWM signal on the GPIO pins of a Raspberry Pi. However, most of the tutorials I've followed have led to nothing working. Heres the code im currently using: #include #include…
invisabuble
  • 149
  • 1
  • 3
  • 12
1
vote
1 answer

STM32F7 Two Timer Channels Share One DMA Channel

I am trying to write a driver that sends DShot commands to an ESC. I am using an STM32F722 MCU. The DShot protocol is similar to addressable LEDs where 1/3 duty cycle represents a 0 and a 2/3 duty cycle represents a 1. The frequency is 600kHz for…
Jeremy Wolfe
  • 81
  • 2
  • 5
1
vote
0 answers

How To make Raspberry Pi Hardware PWM off after startup

I am driving motor using ESC with Hardware PWM signal comes from Raspberry Pi ,I set the GPIO 19 (PIN 35) to be PWM1 , the problem is when the Raspberry Pi startup it gives output value to PWM1 (GPIO 19) which causing the motor to start spinning at…
0ussama
  • 21
  • 3
1
vote
2 answers

PWM settings in PIC24FJ64GA002

Good day, I am working with a PIC24FJ64GA002 microcontroller and am struggling to get the PWM working for a servo I want to use. My code is as follows: // PIC24FJ64GA002 Configuration Bit Settings // 'C' source line config statements //…
Bottle
  • 23
  • 4
1
vote
1 answer

Controlling DC-Motor low speeds from Encoder pulse signals C using ATmega88

I have given the following C-Code to test a 60V DC motor with gear box ratio 16:1 and incremental encoder to see if the code calculates the speed by reading the Pulse signal as feedback for µcontroller from encoder. The µcontroller is ATmega88A-UA.…
hsj17
  • 11
  • 1
  • 2
1
vote
1 answer

Efficient algorithm to reduce peak power from multiple pwm output?

I have multiple power mosfet pwm controlled and connected to a single main power supply. Thee pwm signals operate all at the same frequency and their duty factor is determined otherwise and can change frequently. It can can vary between 0 and…
jf_vt
  • 123
  • 4
1
vote
1 answer

Raspberry PI 3 and SG90 mini servo unknown problem

Connection schema servo to GPIO: servo minus (brown wire) - to pin #9 (GND) servo plus (red wire) - to pin #2 (5VO) servo signal (yellow wire) - to pin #11 (GPIO 17) python code - ! works fine from gpiozero import Servo from time import…
GFB
  • 345
  • 1
  • 5
  • 15
1
vote
0 answers

Can't get an interrupt at compare match of PWM Timer on STM32f103

I need to get interrupt at compare match of PWM. I am using STM32CubeIDE 1.6.1, STM32Cube FW_F1 V1.8.3 even tried LL library instead of HAL inside \STM32Cube\Repository\STM32Cube_FW_F1_V1.8.3\Projects\STM32F103RB-Nucleo\Examples_LL\TIM directory but…
Amir Saeed
  • 11
  • 2
1
vote
0 answers

STM32F4xx phase shift of carrier wave (timers)

I just want to generate PWM signals for single phase cascade H bridge inverter. Theortically speaking, I need to shift carrier wave (triangular or sawtooth) in order to get sinusoidal PWM (see picture). I don't know how to obtain these shifted waves…
1
vote
2 answers

Driver for Beaglebone Motor Cape

Are there any existing driver libraries (C/C++ preferred) for the Beaglebone Motor Cape? If not, what would be the best examples/tutorials to follow for starting to interact directly with this cape? I have previously used the Robot Control Library…
neal
  • 617
  • 5
  • 12
1
vote
1 answer

Small PWM module?

I'm trying to find a fitting module/component for a project, but have a hard time finding the right thing. I need a PWM module/component that can provide a PWM signal and can be controlled via Arduino, preferably TX/RX. I've used this one…
1
vote
1 answer

STM32F401RE PWM Mode doesn't work in Protues

I'm trying to generate PWM wave but it seems that proteus has a problem with it. I've tried to do so using CMSIS and CubeMX and neither of them works. tested timers: TIM 1, 2, 4, 5 with all their channels Timer configuration in CubeMX Proteus…
Mehdi
  • 62
  • 6