Go Down

Topic: PWM controls current or voltage? (Read 559 times) previous topic - next topic

raschemmel

#15
Jul 31, 2015, 12:39 am Last Edit: Jul 31, 2015, 12:45 am by raschemmel
Quote
Ohm's Law is a law of nature and it's always true.
Quote
You might want to read up a bit more about that...
You know what he meant. He meant that
Quote
The law was named after the German physicist Georg Ohm, who, in a treatise published in 1827, described measurements of applied voltage and current through simple electrical circuits  
The physics principles upon which Ohm's Law is based are based on laws of physics, which you could say are part of nature because they are natural laws.

The fact that this may not be readily apparent to you from the way he chose his words does not in any way change the fact that the REST OF US know what he meant.

I find it amusing that someone with a Post count of 464 and a Karma count of 12 would have the gall to try to correct someone with a Post count of 2308 and a Karma count of 95.  
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

jack wp

I find it refreshing that anyone on the forum can voice their opinion (may it be the same as yours or not). If you disagree, then you are free to say so, and hope you can explain why.

raschemmel

Refreshing?
To suggest thst DVDDoug has any misconceptions about Ohm's Law is nothing short of absurd.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Coding Badly

#18
Jul 31, 2015, 01:50 am Last Edit: Jul 31, 2015, 01:50 am by Coding Badly

I find it refreshing that the next post will be on-topic.

The topic at hand can be found here...
http://forum.arduino.cc/index.php?topic=338809.msg2335818#msg2335818


jack wp

I think the PWM changes current and voltage. It does not change resistance.

raschemmel

The ON/OFF states of the transistors running in PWM mode changes the collector to emitter resistance but since PWM is duty cycle controlled , these changes in resistance are reflected differently in lighting devices like LEDs than in inductive devices like motors.
Light travels at , well , the speed of light, so inertia is not a factor. Your eye sees the photons emitted from every pulse but POV, makes it seem like it's on all the time , whereas with motors, the sudden drop in resistance when it turns on does not result in an instantaneous result in the motor shaft because it needs some time to overcome inertia.
Once it is up to speed then the shaft speed can change quicker but still not immediately.
The bottom line is that the change in resistance is realized immediately with light but not so with motors.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Wawa

If you only read OP's posts, you will see that he has trouble understanding the Arduino > base resistor > base-emitter junction part. And we all are overwhelming him with things that happen behind that transistor.
Back to basics....

An Arduino output pin can only have two states. High or low.
On a 5volt Arduino, high is 5volt, and low is 0volt.

Let's connect a LED to the pin.
We know that the LED has a working voltage of 2volts.

If we connect the LED between the Arduino pin and ground, something could go wrong.
Because the LED can't go higher than 2volt, and the Arduino pin tries to give it 5volt.

If we connect a resistor between Arduino pin and LED, both are happy again.
The resistor takes care of the 3volt difference.

By using the right value resistor, we can control the current from the Arduino pin to the LED.

By making the pin high or low, we can turn the LED on or off.
We can do that slow or fast.

If we turn the LED on/off very fast, our eyes/brain can't see the switching anymore.
We think it's dim.
Arduino can do that fast switching for us automatically.

Arduino can turn the LED on 50% of the time, and off 50% of the time.
Or on 20% of the time, and off 80% of the time.
This is called PWM.
PWM controls the on/off time, and our eyes see it as dimming.

Driving a NPN transistor is much the same as driving a LED.
We only drive the base-emitter diode of the transistor.
The base-emitter diode has a forward voltage of 0.7volt.

By using the right pin-to-base resistor, be can set the base current.

Arduino pin > LED voltage difference was 3volt.
Arduino pin > base-emitter diode difference is 4.3volt.
Arduino pins prefer a current upto 20mA, and 40mA is the absolute maximum.
With these facts we can calculate the ideal resistor.

* Some things have been left out for clarity
Leo..













raschemmel

"Details are omitted for clarity...."
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Go Up