Skip to main content

Questions tagged [pwm]

PWM is a form of signal modulation that allows digital output to approximate an analog signal. Use this for questions about using the PWM pins (marked with ~).

Filter by
Sorted by
Tagged with
0 votes
1 answer
279 views

I'm controlling a car instrument panel with Arduino using the tone() function, however with Arduino Uno's minimum 31Hz frequency I can only set the speedometer at ~12mph or more. I'd like to be able ...
Piotr's user avatar
  • 3
3 votes
1 answer
529 views

I'm working on a project where I need to run multiple servos. For now though, I'm trying to get a single MG90S servo running with a PCA9685 servo driver but I'm unable to get any movement from the ...
johnb7716's user avatar
1 vote
0 answers
256 views

I need variable frequency output - 0-5000Hz with some duty cycle. I do not want to change timers, because I am using delays, serial and CAN, so I do not want them to be affected by changed timers. I ...
Voyze's user avatar
  • 11
0 votes
1 answer
2k views

I am trying to communicate between two Seeeduino XIAO (chip: ATSAMD21G18A-MU) by way of TCC capture using register timers. Square wave pulse duration varies from 200ns to 4us. I found these two code ...
MeSo2's user avatar
  • 177
2 votes
0 answers
136 views

I am working on communicating 4 switch states across multiple Arduinos using only one pin. It must be as fast as conceivably possible. Currently I have a master Arduino reading all 4 switches (...
MeSo2's user avatar
  • 177
2 votes
0 answers
634 views

I wonder if someone could help me with figuring out how to control XL6009 Boost converter via Arduino. I have this popular board, and it has potentiometer to adjust the output voltage. However, I want ...
Twoface's user avatar
  • 21
1 vote
1 answer
164 views

How can I use a MC33926 Motor Driver like it is offered for Arduino to drive forwards, backwards with a PWM and a direction control. The problem is that the MC33926 has Inputs IN1 and IN2 and not PWM ...
cat's user avatar
  • 177
3 votes
1 answer
625 views

I need 2 PWM pins to oscillate at 25 KHz but they need to oscillate inverse to each other. When one is high, the other must be low and vise-versa. I want to do this with a Nano.
Curtis's user avatar
  • 151
0 votes
2 answers
791 views

For this device are the enable pins meant to be connected to PWM pins? If so then how am I able to use this device with an arduino uno? The uno does not have any pwm pins right?
Sanchez2009's user avatar
1 vote
1 answer
1k views

I am trying to get the serial monitor to prompt me to input two settings - the PWM level and the Resonance level. I am being prompted to input the PWM level, but before I can input the Resonance level ...
PrematureCorn's user avatar
1 vote
0 answers
122 views

Trying to get the duty cycle % from an input (pin27) on my ESP32 that is currently used for analog input to read out the voltage provided by a GM driver. Anybody has an idea on how could I achieve ...
Don Zalmrol's user avatar
1 vote
1 answer
3k views

I'm not sure why this has been so difficult for me, but I'm trying to control the acceleration of a 10v DC motor with an Arduino UNO and an L298n H-Bridge. Using a 12v regulated power supply to power ...
zRockafellow's user avatar
2 votes
2 answers
2k views

I'm trying to control a heating element with PWM with an Arduino Nano, but the problem is even if I set the duty cycle to 0 it gives a tiny spike. I want to generate a square wave of 1Hz and that's ...
Sumithran's user avatar
  • 131
3 votes
1 answer
105 views

This code works and it can fade three LEDs without any problem, obviously you can even add more of them : ) // Pins Definition const int button1 = 13; const int button2 = 12; const int button3 = 11; ...
alessandromrc's user avatar
2 votes
2 answers
226 views

I have had to use Timer0 with phase correct PWM and a prescaler of 1. This results in a 32khz PWM frequency and obviously impacts millis, delay and micros. (Timer1 and Timer 2 are also in use so ...
Simm's user avatar
  • 51
1 vote
1 answer
327 views

When I turn on DC motor with a button I get a a fixed PWM value that goes into a loop till button state changes. What should I change that I could change X value with potentiometer in a loop? int X = ...
Jimmy's user avatar
  • 13
1 vote
0 answers
385 views

I was supposed to first create a 4x1 MUX using AND and NOT gates. The 4 input data lines (io,i1,i2,i3) were 4 PWM pins from the arduino (3,5,6,9), with analogWrite() values as 100,150,200,250 ...
satan 29's user avatar
  • 169
2 votes
1 answer
2k views

So, I managed to fry my cheap servo/ESC (electronic speed controller) and decided to make my own using an ATTiny13A on some perfboard. But, I have run into some issues getting the servo to respond. I'...
Rearthbound's user avatar
2 votes
0 answers
77 views

I need a 2KHz complimentary PWM waves with adjustable duty and phase that is triggered by an external 4KHz source. After reading the datasheet I think there might be 2 way to do this: Use a TC unit in ...
7E10FC9A's user avatar
  • 209
0 votes
1 answer
1k views

trying to create this simple circuit where a rectangular voltage input is transferred to a sine wave output. the process is quite simple, but I couldn't see the actual sine wave when connecting an ...
Hadar Sharvit's user avatar
1 vote
1 answer
747 views

I'm trying to generate some basic thumping stereo sound using Arduino's PWM pins along with low-pass filters. This is the frequency spectrum for the sound I want to play using Arduino UNO's PWM pins: ...
TheReal_Skywalker's user avatar
1 vote
1 answer
461 views

Hello to the community! I am using ATTINY85 and I am programming it through the AVRISP using an Arduino UNO. This is the code I am using : #include <avr/io.h> #include <avr/interrupt.h> ...
Johny Arduino's user avatar
2 votes
1 answer
274 views

I am trying to generate stereo sound using an Arduino UNO. Instead of using a separate DAC chip (as shown here), can I use the PWM pins on the UNO along with a low-pass filter? Also, would I need any ...
TheReal_Skywalker's user avatar
1 vote
2 answers
299 views

I'm converting a 0-5v PWM signal to an analog signal using an LM358D. I've connected the output to an oscilloscope to look at the signal but I'm not really sure what I'm looking at. The PWM looks ok ...
tryingHard's user avatar
0 votes
1 answer
37 views

I turn on the transmission of one key that works to open the door, but after a certain time I need to close the door, and for this I need to use the second key. I want to do without additional buttons,...
Антон's user avatar
1 vote
1 answer
177 views

Using arduino, I'm trying to rotate a 360 servo that will move clockwise 5 seconds,pause and counterclockwise for 5 seconds and then completely stop. However, my servo just continuously keeps on ...
Asif's user avatar
  • 11
1 vote
0 answers
318 views

I'm working on a self-balancing robot. The self-balancing is not the issue. The issue is that the motors don't respond as they are supposed to. I would understand if it were unable to balance, but the ...
Sergei Glimis's user avatar
1 vote
0 answers
150 views

I have trouble with my laser sensor it doesn't work properly. When I connect all pins its doesn't work, when I remove GND and connect just the signal pin and VCC it works but the laser light is dim(I ...
Shushan Abovyan's user avatar
0 votes
1 answer
421 views

I am using the potentiometer to control the duty cycle of a PWM signal to the MOSFET trigger switch module, thus controlling the motor speed. In my code, I have used the map function to utilize the ...
Curiousone's user avatar
2 votes
1 answer
80 views

Requirement: I have input 4KHz pulse input Divide it's frequency in half Arbitrarily adjust phase Arbitrarily adjust duty Out put the modified pulse My solution (CPU): uint8_t cnt = 0; uint16_t t1 = ...
7E10FC9A's user avatar
  • 209
-1 votes
1 answer
218 views

I have a sketch that sends an IR code every second. It works fine (the correct code is received by my receiving Arduino next to it) on the Arduino but when I try to move the sketch to an ATMega328P-PU,...
Patrick's user avatar
7 votes
6 answers
6k views

I want to generate a 15 kHz pulse with an Arduino using Timer1, but the problem is that if we want a 15000 Hz clock we need to initialize the timer with 1/15000 seconds or 66.66 microseconds, but we ...
astrick's user avatar
  • 193
1 vote
2 answers
218 views

I've been learning Arduino for a while, and for my next project I'm attempting to build a drone. When I tested the motors that I purchased before, they seemed to work fine using the PWM pins and I saw ...
john papp's user avatar
3 votes
1 answer
244 views

Unnecessary context but hey I'm guessing you might be interested Hi, I want to build a PID temperature regulator with a servo that presses on a silicon pipe to adjust the flux of liquid passing ...
Guillaume Deshors's user avatar
1 vote
3 answers
704 views

I want to create a small LED strip driver/controller with 2 channels (Cold/Warm white) using Arduino Pro Mini (5V/16MHz). I have connected the parts per the following diagram I have pins 5 and 6 ...
Aleš Kovářík's user avatar
0 votes
1 answer
115 views

I have been trying to get an answer my question for a 2 days already. It's good for knowledge collecting and playing with different things, but there haven't been a solution so far. I'm trying to ...
Ivan's user avatar
  • 3
1 vote
1 answer
138 views

Well I am trying to make a Stroboscop. I found this code at blow: and tried. It works normally. But if I increase the RPM so decrease the "strobeDelay" time, the brightness of the LEDs goes ...
mehmet's user avatar
  • 297
2 votes
1 answer
255 views

I am trying to read the PWM duty cycle set for pin 6 on the Arduino Wifi Rev2. By default, the timer used is TCB0, used in 8-bit PWM mode. The 16-bit Compare channel CCMP is used as two 8-bit ...
Wind's user avatar
  • 31
0 votes
2 answers
1k views

I have a street lamp with a led and simple driver in it, I don't know the exact led voltage but the driver (image attached) says 27-36V DC output, MODEL: 50W. Is there a part I could place between ...
adrianTNT's user avatar
  • 252
2 votes
2 answers
415 views

For my proyect, I need to conect my NodeMCU to a servo motor as well as a push button, the thing is, the distance from the NodeMCU and both components has to have a distance of around 6.10 meters (or ...
Marcelo_M's user avatar
  • 121
2 votes
0 answers
178 views

I am currently using these motors and driving them off these drivers and an arduino uno, and alternatively trying to make them turn using the setup in step 6 (both with l298n and without) in this ...
Andrew Li's user avatar
1 vote
1 answer
115 views

I am trying to use the Arduino MAP function to allow me to PWM 4 LEDs between 0 and full brightness. I guess the tricky part is that the joystick neutral position is at the venter of the range of the ...
Tokthebloke's user avatar
0 votes
1 answer
535 views

I am using a L298n driver to make a basic RC car. I realise that PWM is used to control the speed of the motors and that the car would turn when the wheels on one side of the car have a rpm different ...
idunno's user avatar
  • 67
-1 votes
1 answer
865 views

I'm trying to make PWM Signal Generator with Arduino Uno. I'm trying to control 230V 50hz "NRG118" combi boiler fan. The fan powered by AC and have 3pins for PWM control. "vcc,gnd,pwm&...
Morphinz's user avatar
1 vote
1 answer
278 views

I am wondering if can I use this bicks camera switcher with the Arduino since it uses a PWM signal. If I can do I just put it on one of the PWM outputs or do I need to wire I add something to make it ...
Lil man's user avatar
  • 23
3 votes
2 answers
158 views

Running a DC motor(6.5A max input), motor driver (MD10C 7Amp peak output), and Arduino Mega. I am stabilizing an object with an accelerometer as my sensor. I switched to longer wires so I can have my ...
Thunder Dornhofer's user avatar
3 votes
5 answers
13k views

I have a Arduino which I would like to use to control a 12v PWM fan for speed control. I know about the 0-3.3v to 0-5v logic level shifter, is there a similar option for 0-5v to 0-12v? Or is there a ...
MrEditor97's user avatar
2 votes
1 answer
431 views

I'm using Arduino nano and I'm struggling working with the DRV8870 IC on PWM mode. When I use analogWrite(_pin, duty_cycle); the motor makes weird noises. I thought it's because of the PWM frequency ...
KD Technology's user avatar
2 votes
1 answer
124 views

I am trying to get a nice sounding varying PWM to DAC, and intend to use a Sallen Key as part of an active low pass filter. I set the Fast PWM at a max of 255 (WGM1[0-3] = 5) and set/clear OC1A upon ...
B7th's user avatar
  • 167
0 votes
2 answers
6k views

I am using arduino Uno/Mega. I am trying to output a range of 0-5v volts using PWM. Is it possible to do it? It’s would be nice to see some code or instructions, as far I have seen, they used external ...
Itzik.B's user avatar
  • 131

1
2
3 4 5
10