Hi,
i have problems with my D5 on arduino uno. Im using this pin as pwm output to controll speed of motor. However my pin only gives around 2.9V insted of 5V when writing 255.
You will need to show us how it is connected and what hardware you are using.
And links to the actual device information.
We also need to know what sort of Arduino you have.
EDIT I now see you have edited the first page to make reply look stupid. Thanks a lot for that.
(do you know what irony means?)
Im not home at the time. Im using arduino uno clone, but same issue i had on arduino uno original. Im using joystick and nrf10L to send data from other arduino. How ever that is totaly fine because when i connect speed control to other pin it works how it sould.
You have not connected the ground from your Arduino to the ground on that board. That is why it is not working correctly.
I did that. My problem is arduino uno is not giving enough voltage when analogWrite(5, 255); not any problem with motor driver. I also mesured pin with multimeter and voltage is around only 2.9V when writeing 255.
Then it would have been good to show that on your physical layout diagram would it not?
You don't seem to understand the concept of a common ground. Without that any signal you sent would be floating and that in itself will cause problems like you are describing.
So how are you measuring this? A digital voltmeter will not always measure a PWM signal correctly. What are the results for other values you are writing?
A PWM value of 255 on a 328P will result in digitalWrite(somePin, HIGH)
Did you measure without anything connected to the Uno (except USB)?
I tried to find help, i thought if someone had same problem as me, but i just found people that just cant help and will only doubt your work. I'm not trying find help here ever again.
Yes, but also connected with everytning i need for my project. Its still the same issue, also with another arduino uno original.
This is not so much about 'doubting your work', but trying to figure out what's going wrong. The ATMega328P on your Arduino board will put out 5V on any of its PWM pins if set to HIGH (or analogWrite a value of 255, which is the same thing). If this doesn't happen, something is evidently amiss, which virtually certainly means you made a mistake at some point. There's no shame in that; we all mess up from time to time and it's perfectly fine to ask help with that.
So far, people are trying to establish a problem in either of the following areas:
- A pre-existing hardware defect on the Arduino (unlikely in this instance, but conceivable in the case of previous mistakes in using it)
- A connection/wiring error
- A measurement error
- A coding error
To be able to track down the problem, it helps to have a clear schematic of your setup, a photograph that clearly shows how you have connected everything together and the actual code you're running that exhibits the problem.
Furthermore, I'd start in this case by disconnecting everything from the Arduino except the USB cable, and run a sketch that only sets D5 as an OUTPUT and writes HIGH to it. Then measure the voltage between D5 and GND. This should be 5V. This will give you some firm ground to depart from in further troubleshooting.
I will try to add full schematic, im just not at home right now. There is just not much to it, how ever the code looks, when the schcematic is as simple as possible it just does the same thing. Code Simple as defining pin as output and sending 255 value and connecting Voltmeter to Pins D5 and GND. I also tried it with more pwm pins asi D3 and the result was just normal, 5V.
we are trying to help but you arent giving us enough information to do so.
Did you read this?
or this?
So lets guess this is the motor driver (this is how you provide a link)
Your diagram leads us to believe that D5 was connected to the driver board when you measured 2.9V.
Did you measure the output on D5 with the driver board disconnected?
which other pin?
You did not read my issue correctly
Other pwm, i tried D9 and D6
Only D5 has this issue
I mesured it when connected and also disconnected, got same result. And also i mesured D6 with writeing same value. In case of D6 i got results as i expected.
Why not to use these pins if they works fine... instead of D5?
It looks like the D5 either is not soldered properly or has been fried earlier
Im already using them, i have one more Option to rewire nrf but its not recomended to use other pins as D9 and D10 as ce and csn. I will add complete diagram later.
But this happens also on arduino uno original and other arduino uno clone, that is completely new