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
0
votes
2 answers

Using STM32L TIM PWM to control Servo Motor

So I'm trying to control a servo by PWM using STM32L1. below is the full code, no library needed. When I upload and run this code, the servo ticks several times instead of actually moving smoothly to the required positions 600(0*), 1100(50*),…
lightworks
  • 21
  • 1
  • 9
0
votes
1 answer

Stm32 Advanced timers Complementary channels can be individually controlled?

I need to design a device that generates up to 25 independent PWM outputs, and the four normal timers and two advanced timers of the stm32f103vc can generate 24 independent PWM outputs, so I can see if you can use the advanced timer Of the…
viggo
  • 23
  • 5
0
votes
2 answers

Speed Control in dc motor Stepper (motor: NEMA 17 ; driver: drv8825) [frequency regulation]

I'm doing a school project using a few stepper motors driven by drv8825 drivers (actually, it will be an overhead travelling crane), with an Arduino UNO. First of all, we haven't got a huge amount of money to spend. Now, the problem is this: we are…
Jacopo
  • 1
  • 2
0
votes
1 answer

Running Multiple Servos With Timer/Counters

I am currently working with a project for school in which I am building a small cart that will scan an area for the most intense source of light and drive towards it. I have programmed an SG90 180 degree servo to scan a 180 degree area, use the info…
0
votes
2 answers

cortex_m3 disable pwm after n pulses

using cortex M3, arduino due does anyone know if its possible so get a pwm channel to disable itself after so many pulses. what i want to try out is something like this Interrupt 1 fires (timer0), it sets the delay of the pwm and how many cycles to…
joe blogs
  • 142
  • 4
  • 16
0
votes
2 answers

Servo with Arduino

this is not my first time that work with servo motor on arduino mega adk, but this time something went wrong! I'm connecting my servo Motor to an arduino as it should be. and then I wrote my code as mentioned here: #include Servo…
Mehdi Ben Hamida
  • 893
  • 4
  • 16
  • 38
0
votes
1 answer

Arduino HC-SR04 pwm interfere

I have been struggling with arduino and ultrasonic sensor HC-SR04 and PWM. I am using arduino pro mini. Also using NewPing library. the newping library example works perfectly if I have just the sonar attached and I get about 170cm when pointing…
Ou Tsei
  • 470
  • 7
  • 24
0
votes
1 answer

Raspberry Pi B+, l293d and two dc motors, variable speed with PWM, code in c/c++, but not working

Here my Code, it run, no errors, but no rotation on wheels. My Setup: 1. Raspberry Pi B+ 2. L293D for dc motors 3. two dc motors 4. use wiringPi library Example 1: #include #include #include using namespace…
david
  • 83
  • 1
  • 13
0
votes
0 answers

Trying to use C to have an ATTiny85 utilize Fast PWM to dim and brighten an LED over time. The code should be working but it is not

Trying to get an LED to fade on and off using Fast PWM on a AATiny85. Have tried both configuring this to be on then shut off as well as using the for loop to gradually turn it back off. The issue we have when we compile and program the code is…
David Pee
  • 15
  • 1
  • 3
0
votes
1 answer

PWM with ATMega164PA

I am trying to increase the brightness of an LED using PWM with Timer0 on the ATMega164PA. After running my code below the LED just stays emitted and doesn't vary its brightness. Please take a look at my code and tell me if there is something I am…
LoneCoder
  • 45
  • 6
0
votes
2 answers

control led brightness of microcontroller rtos/bios

i'm trying to control my led in 256 (0-255) different levels of brightness. my controller is set to 80mhz and running on rtos. i'm setting the clock module to interrupt every 5 microseconds and the brightness e.g. to 150. the led is dimming, but i'm…
Liam
  • 3
  • 2
0
votes
0 answers

Issues with Arduino Timing

I am working with an Arduino on a project for which timing is very important. I use TimerOne to trigger timer interrupts and use micros() for delays (delayMicroseconds() was causing problems worse than the one explained below). The program is…
dts
  • 121
  • 6
0
votes
1 answer

arduino uno with PWM driven motor and 433mhz wireless receiver don't work

I am fairly new to the arduino topic and try to get a few things to work together. First i tried setting up a DC motor that can be controlled via PWM, which works perfectly when used standalone. I can start/stop the motor and change speed depending…
Olli
  • 1,708
  • 10
  • 21
0
votes
1 answer

How to remove jitter in a train of pulses in Arduino UNO?

This is my first practical project with an Arduino UNO, and the truth is that I have not touched anything easy :( I need to convert my Arduino into a 14-bit encoder driver for this I need to generate a 14-pulse train to A fixed frequency greater…
cgalcala
  • 1
  • 2
0
votes
0 answers

BeagleBone PWM configuration in kernel space

I'm beginner in kernel module development. I'm running Debian 8 in BeagleBone Black with cape-universaln loaded. The module pwm_tiehrpwm is loaded. I can configure pwm signal through the respective /sys/class/pwm/pwmchipN. I have checked the signal…
dczanella
  • 1
  • 2