PWM giving 6.3Vp-p

Hello all,

I am not sure if this is the right place to be asking this question. I am experiencing a bit of a problem with the PWMlibrary, its giving me a PWM sqare wave with a 6.3Vp-p and i would really like for a 10Vp-p like i get on the pic micro. Is this possible with the arduino?

Below is my code:

#include <PWM.h>

int pwmPin = 9;
int32_t frequency = 50000; // desired frequency in Hertz

void setup()
{
  //initialize all timers except for 0, to save time keeping functions
  InitTimersSafe(); 

  bool success = SetPinFrequencySafe(pwmPin, frequency);

  //if the pin frequency was set successfully, turn pin 13 on
  if(success) {
    pinMode(13, OUTPUT);
    digitalWrite(13, HIGH);
  }

}

Thanks.

How are you getting 6.3V from a 5V device? And what's the plan to get up to 10V? Gonna need some external hardware.

Is it possible that my uno is broken somehow...?

How are you measuring the output and how did you determine that it is 6.3 Vp-p?

I connected my pwm output pin to an oscilloscope and used the measure function to show the voltages..

When was your scope calibrated last?

ozwurld: I connected my pwm output pin to an oscilloscope and used the measure function to show the voltages..

So if you measure the 5V shield pin with your scope does it read +6.3vdc ? If so what does that mean?

AWOL: When was your scope calibrated last?

no idea.., im using the scopes at the university so well i trust em...

retrolefty:

ozwurld: I connected my pwm output pin to an oscilloscope and used the measure function to show the voltages..

So if you measure the 5V shield pin with your scope does it read +6.3vdc ? If so what does that mean?

Interestingly enough i get 3.2V from the 5V pin 0.o

Because you have not shown pictures of the scope display or the scope settings, I can only guess here.

It seems that the scope is not properly calibrated, or perhaps there is an operator error.

Are the scope probes set for DC? Are the scope inputs set to DC? Have you compared results with a Digital Volt Meter (DVM)?

Hi, question, have you got the gnd of the CRO (sorry oscilloscope) connected to the gnd/neg of the arduino? A picture of your connections and CAD or picture of a hand drawn circuit in jpg, png or pdf will help.

The problem here is that you have all the information, circuit, CRO display, sketch etc and we have nothing. So to keep the number of posts to a minimum to help with your problem, we need all the above data so we can catch up.

Hope to help.

Tom..... :)

PS how do you get 10V p-p on a pic micro running at 5V supply? PPS. Don't use measure function, use the screen grid and do it by hand, the measure function could be measuring glitches. Or if using x10 probe is it compensated.

For increase the voltage more than 5V you need a booster or something …

I have attach a photo from a schematic that i have made some years back it was to drive a dimer for lights and use 0-10v to control it, you must play with the pwm commands to go from 0 to 5 volt in arduino side and at the output you will have double value .

Another one site (i quick check on google) is http://www.nano-reef.com/topic/218115-arduino-0-10v/?hl=arduino+0-10v

and this http://playground.arduino.cc/Main/RegulatedPositiveVoltageBooster

PS Read the questions from the members they ask here and answer it, it is not nice to ignore it they will not happy to help again and i found logical …

Good luck.

[/quote]

no idea.., im using the scopes at the university so well i trust em...

[/quote] I would not. You could have one deliberatley miscalibrated for training purposes.

TomGeorge: Hi, question, have you got the gnd of the CRO (sorry oscilloscope) connected to the gnd/neg of the arduino? A picture of your connections and CAD or picture of a hand drawn circuit in jpg, png or pdf will help.

The problem here is that you have all the information, circuit, CRO display, sketch etc and we have nothing. So to keep the number of posts to a minimum to help with your problem, we need all the above data so we can catch up.

Hope to help.

Tom..... :)

PS how do you get 10V p-p on a pic micro running at 5V supply? PPS. Don't use measure function, use the screen grid and do it by hand, the measure function could be measuring glitches. Or if using x10 probe is it compensated.

vaj4088: Because you have not shown pictures of the scope display or the scope settings, I can only guess here.

It seems that the scope is not properly calibrated, or perhaps there is an operator error.

Are the scope probes set for DC? Are the scope inputs set to DC? Have you compared results with a Digital Volt Meter (DVM)?

all i did was use common grounds for the scope and the arduino, i honestly have never had to set the probes to dc or ac with a Digital Multimeter as the auto function normally adjusts for everything i think, as for a DVM i dont think we have 1 of those am not sure..

vaj4088: Because you have not shown pictures of the scope display or the scope settings, I can only guess here.

It seems that the scope is not properly calibrated, or perhaps there is an operator error.

Are the scope probes set for DC? Are the scope inputs set to DC? Have you compared results with a Digital Volt Meter (DVM)?

all i did was use common grounds for the scope and the arduino, i honestly have never had to set the probes to dc or ac with a Digital Multimeter as the auto function normally adjusts for everything i think, as for a DVM i dont think we have 1 of those am not sure..

Anyway using the volts per division gives me an output voltage of ~5V so am guessing the measure function wasnt quiet right. :)

tasosstr: For increase the voltage more than 5V you need a booster or something ....

I have attach a photo from a schematic that i have made some years back it was to drive a dimer for lights and use 0-10v to control it, you must play with the pwm commands to go from 0 to 5 volt in arduino side and at the output you will have double value .

Another one site (i quick check on google) is http://www.nano-reef.com/topic/218115-arduino-0-10v/?hl=arduino+0-10v

and this http://playground.arduino.cc/Main/RegulatedPositiveVoltageBooster

PS Read the questions from the members they ask here and answer it, it is not nice to ignore it they will not happy to help again and i found logical ....

Good luck.

Thanks for your schematic, may come in handy next time..for now since i got my 5V and my cct is behaving as it should all is wel, and to all the questions that i may not have respinded to: i didnt see it, and am sorry for that.

[/quote]

no idea.., im using the scopes at the university so well i trust em...

[/quote] I would not. You could have one deliberatley miscalibrated for training purposes.

:) hahaa i avoid to thinking that way... thanks for your input... seems the scopes where at fault afterall.

Thanks for yout help all, everything is fine now: pans out to the unreliable measure function :)