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
0answers
26 views

Controlling LED from Aux Switch on RC Controller thru Arduino Uno

I am trying to control an LED to go on and off using the Aux Switch (SwA) of an RC controller (FS-iA6B). I have gotten the serial read to work but am stuck trying to implement basic Arduino LED code ...
3
votes
1answer
35 views

(Arduino Uno) PWM output (and servo plugged on it) becomes unstable if I use 1Wire on another pin

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 ...
1
vote
3answers
56 views

Arduino Pro Mini PWM issue

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 ...
0
votes
0answers
28 views

I need to change a library to output on pin 3 instead of pin 11(It involves PWM and timers on the arduino)

I read into how the timers on the Arduino work, and I know that pin 3 is OC2B and pin 11 is OC2A. I tried to understand the datasheet and changed the code a bit, but nothing I did worked. This is the ...
0
votes
1answer
35 views

Always HIGHT line on Oscilloscope when UNO's Fast PWM TOP ICR1

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 ...
0
votes
0answers
103 views

Arduino two sketch add to single sketch based on timers [duplicate]

How to add two sketch in single sketch and run same time because one sketch timer1 used and another sketch used timer0 and timer2 both sketch have setup()and loop () so how to add please help us with ...
1
vote
1answer
39 views

How the light brightness stays constant when we increase the frequency of stroboscope

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 ...
2
votes
1answer
70 views

Arduino Wifi Rev2, bug when reading PWM duty cycle value on pin 6

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

Dimming this ~30V led with PWM, what do I need?

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 ...
2
votes
2answers
56 views

Is it possible to have long wire connections from an NodeMCU to a servo motor or button?

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

Brushless motor vibration/jitter/noise - arduino uno

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 ...
1
vote
1answer
38 views

How can I PWM 4 LEDs from 0 to full brightness using a two axiz resistive joystick?

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 ...
0
votes
1answer
41 views

Deriving the exact relationship between PWM and steering

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 ...
0
votes
0answers
78 views

LEDs lighting up when off due to servo motor being on

Within my arduino project I have began to run out of GND ports on my arduino so I am having to resort to using 1 GND port for lots of electric components. I have 2 LEDs that are each connected to a ...
0
votes
1answer
83 views

Can't turn off fan using PWM and analogWrite(x, 0)

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&...
0
votes
1answer
48 views

Can I use this camera switcher?

I am wondering 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 ...
0
votes
1answer
62 views

I just want to control a 48 volt and 30 amp current with pwm singnal…i don't nkow what components is needed for this [closed]

I just want to adjust voltage of a dc dc converter output with pwm signal...i used MOSFET but i get some heating effect..please tell me what model of MOSFET or ijbt or anything else which components ...
2
votes
2answers
59 views

Switched from 3ft to 10ft connection wires. My setup doesnt run correctly now. Timing issues?

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 ...
3
votes
5answers
1k views

How do I convert 0-5v PWM to a 0-12v PWM

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 ...
2
votes
1answer
39 views

How to use PWM with DRV8870?

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 ...
2
votes
1answer
49 views

Fast PWM: Resolution in hertz

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 ...
1
vote
2answers
65 views

Output voltage range between 0-5v

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 ...
2
votes
1answer
55 views

Maintain constant PWM voltage with changing Vcc

I am making an arduino project with a single lithium ion battery, and want to be able to maintain a constant PWM voltage, even when the battery goes from 4.2-3.2v. I have been able to read the Vcc ...
1
vote
1answer
129 views

Timers, PWM pins and digital outputs on Arduino Mega

I'm using an Arduino Mega to control motors via PWM and Adafruit DRV8871 motor drivers. I also use TIMER1 for a timed interrupt. After adding the TIMER1 interrupt I discovered I had problems with ...
1
vote
0answers
36 views

74hc595 brightness control

I can change the led brightness when I connect the led's + pin to 74hc595. I use pwm with output enable pin.But I want to use 74hc595 with led's - pin(gnd). So figure this.Will this work ?
0
votes
1answer
116 views

ARDUINO expected ';' before 'delay' [duplicate]

I want to shine LED in 64 of 255 duty cycles = level of brightness but it pops up this error (see picture). Can anybody tell me why and help me ? Thank you. void setup() { // put your setup code ...
1
vote
1answer
45 views

Do I need a resistor to control a servo with a PWM signal?

I working with Arduino Nano Every that has several analog PWM pins. I want to use one to control a small servo. Do I need to put a resistor between PWM pin and the servo signal?
2
votes
1answer
50 views

Timer question: Phase Correct PWM at specific frequency

I am trying to create a sinusoidal wave segmented in 64 Frame, each holding a Duty cycle precisely varying from 0x00 to 0xff. This is for an Arduino Nano. I have trouble understanding the following: ...
0
votes
1answer
53 views

Why delay of more than 64 millisecond stops the servo motor from rotating? I am not using “Servo.h” instead i am just managing the length of pulse

The code I used was this int servo = 5; int angle; void setup() { pinMode(servo, OUTPUT); } void loop() { for (angle = 0;angle<180;angle++){ digitalWrite(servo, HIGH); ...
0
votes
1answer
68 views

Can't read PWM signal from 2-pin fan header

I'm trying to get PWM values from a 2-pin fan header on DuetWifi board (it is a 3D Printer Controller Board). Here is some info about the fan connection on that board. From their forum, I got to know ...
0
votes
1answer
268 views

3.3V to 5V PWM level shift

I need to shift a PWM signal from a ESP32 (3.3V) to receiver that supports 5V. The signal is at maximum of 400Hz. Can this shifter do the job ?
0
votes
2answers
51 views

Speed control of BLDC with an integrated controller (Hall out, PWM in)

I am aiming at precise speed control of this BLDC motor: it has an integrated controller, outputting digital Hall signal (period 20.8ms on oscilloscope, w/o load) and taking PWM as input for speed ...
0
votes
1answer
86 views

3pin (GND, 12V, tach) 12v FAN control using PWM

I know there are fans out there that have a dedicated PWM input, but I like to know if I can PWM control a fan that does not have such a dedicated PWM input. So... If I have a 3 pin 12v fan like the ...
2
votes
1answer
108 views

Mega: attachInterrupt on pin 18/19/20/21 not working

Task: I'm trying to create a fan-control with the arduino mega. I'm generating a PWM signal on pin 6 and 7 and want to use interrups to measure the rpm of the fans. Problem: On pin 2 and 3 everything ...
-1
votes
2answers
66 views

Why am I getting erratic Analog.read() readings?

Im trying to make an arduino controlled PWM fan using a potentiometer. Ive connected the circuit as in the diagram below (The transistor is a TIP120 if it's hard to read): Here is my code: int fan = ...
1
vote
0answers
50 views

I'm trying to control the ESC using remotexy, esp8266 and arduino mega but I think there is a problem with the PWM signal in the slider. Please help [closed]

{ define REMOTEXY_MODE__ESP8266_HARDSERIAL_POINT include // RemoteXY connection settings define REMOTEXY_SERIAL Serial3 define REMOTEXY_SERIAL_SPEED 115200 define REMOTEXY_WIFI_SSID "RemoteXY" ...
0
votes
1answer
137 views

Fading LED with different frequencies

I have a potentiometer attached to one analog port of arduino (assume A0) I'm reading the value of that using input_voltage = analogRead (A0); which is a value between 0-1023. So I want to map this ...
1
vote
0answers
77 views

Chance light intensity in a pwm pin using LDR using Arduino UNO

I am using proteus and Arduino software to simulate my circuit. What I need to do, is to have an LDR in my Arduino uno. When light intensity increases in my LDR, I need another LED which is connected ...
0
votes
0answers
30 views

combinate two codes [duplicate]

i am trying to put these two codes together someone would be so kind to help me. ""#include const int photores = A0; // Photo resistor input const int pot = A1; // Potentiometer input const int led =...
0
votes
1answer
53 views

very small PWM when timer says zero

I'am getting a little PWM signal when my potentiometer is at zero and OCR2B always reads zero on the serial monitor. My LED has low forward voltage but I still get a little PWM on the pin when I prob ...
0
votes
1answer
58 views

PWM Input Pins Never Receive a Value from Working Receiver?

I have a very simple sketch that's supposed to intercept the signal from an RC receiver and print the pulse duration from that channel. Sketch int PwmPin = 9; unsigned long duration; void setup() { ...
0
votes
1answer
64 views

How to generate 3 PWM signals

I have 2560 mega, and I Want to generate 3-phase PWM signal at 62.5khz, synced and shifted 120 degrees apart. I need that for 3-phase split-coil boost converter (or even isolated flyback converter), ...
0
votes
2answers
242 views

Using SDA and SCL with analog inputs at the same time

I'm trying to build a robot arm based on Arduino UNO and PCA9685 controlled by few potentiometers. The easiest way that I figure out and find on internet is using two Arduino's, one as master and ...
0
votes
0answers
41 views

How can I add PWM to my BLDC code using port manipulation?

I have the following code, which currently uses 6 output pins (pins 8 - 13) from the Arduino to my inverter circuit, which controls a BLDC motor. The code is fine and it works, however I want to add ...
-1
votes
1answer
66 views

PWM supplying led breaks down at near to zero threshold

I use timer1, mode 8, on both pin 9 and 10 at 1 kHz my PWM signal breaks down when I turn the potentiometer just above where I set the zero at, no matter where I set the zero at. I power the Arduino ...
0
votes
1answer
99 views

“Manually” generating a PWM signal

I've been trying, just out of curiosity, to write my own function that generates a PWM signal, just like analogWrite(), and to make it light up an LED. Here's my attempt so far: const int pin = 3; ...
0
votes
0answers
30 views

Motors would make the car go extreme left instead of forward (Self Driving car)

This is my very first day in the community, please bear me until I make myself comfortable here. Coming to my question, I'm making a self Driving car. My car instead of moving forward it moves on the ...
0
votes
1answer
489 views

Problem with PWM pins on Arduino uno [duplicate]

I am working on an Arduino Uno Project of a car with two motors. The motor driver board is an L9110 H-Bridge. Here is how everything is connected: And here is the code I am trying to run: //Define ...
2
votes
4answers
137 views

Issue with incrementing PWM over time

First post here. So I have an issue, which I have identified, but I'm not quite sure how to fix it. I'd really appreciate some input and suggestions. I realize that my "pwmDelta" is the problem, but I ...
0
votes
2answers
235 views

problem with decrement in a loop

I am trying to write a sketch wherein the led brightness increases in increments of 15 until it reaches 255. At that point I want to make decrements of 15 until it reaches 0. The increment part of the ...

1
2 3 4 5
9