Graphing a digit oscillating signal

AI Thread Summary
To graph a digital oscillating signal, understanding pulse width and period is crucial, with the pulse width being the duration of the signal's high state within a complete cycle. The duty cycle, expressed as a percentage, indicates the ratio of pulse width to the total period, which is the inverse of frequency. For example, a 100 Hz signal has a period of 10 ms, and with a 50% duty cycle, the pulse width is 5 ms. The discussion highlights the practical application of these concepts in programming servo motors, where the pulse width directly affects the motor's position. Overall, once the relationship between these parameters is clarified, graphing the signal becomes manageable.
Mr. Hiyasaki
Messages
9
Reaction score
0
How would I go about graphing a digtal oscillating signal? I don't quite understand what a pulse width is, or rather how to find it given only the oscillation in Hz and a duty cycle. I understand that the duty cycle is the ratio of the pulse width over the total period, but i don't understand what the pulse width or the period is for a digital signal.
 
Physics news on Phys.org
I'm not sure I fully understand the question. One could view a square wave as a "digital oscillating signal", and surely there's no problem with graphing that? The pulse width in that case would simply be the width of one of the "peaks".

What kind of signal are you dealing with? And, while this may seem an odd question, why are you graphing it? Wouldn't an oscilloscope be an easier way to handle it?
 
I'll try to help you, but I should start by saying that I've only encountered this is programming a servo motor, so I'm not sure if what I'm about to say will help you much.

A servo motor is a motor that works by taking a digital oscillating signal and translating that into a certain angle. This can be useful for, say, programing a robotic arm - something that needs a motor with angular position control rather than speed control.

So when I had to program my chip to control the servo motor, I needed to make it send a digital oscillating signal. The servo motor read in a certain frequency. My chip will send a signal for a while and then start over. I want the time that my chip starts over to be the same as the period (1/frequency). Now that I have the frequency, the thing that tells the motor how much to turn is determined by how long during each period that signal is high. This is called the duty or pulse width. For example, say if I were to keep the signal low all the time, the servo motor would be at 0 degrees. But if I tell the chip to make that signal high during the first half of each period (so the signal would be high-low-high-low etc in equal increments), then the motor would turn 180 degrees. Since the amount of time that I leave the signal high is dependant on the period (half the period for 180 degrees, maybe 3/4 of a period for 270 degrees) we talk about duty cycles in terms of the percent of the whole period.

Here's a site that might help.
http://www.seattlerobotics.org/encoder/apr98/68hc12pwm.html
 
for example:
Simulate the digital signal in microsoft excel:
the signal oscillates at 100 hz and alternates between 0 and 5 volts with a duty cycle of 50%

I have no idea why I have to do these sorts of graphs to be quite honest. I was given a lab where I had to construct a Pulse Width Modulation motor speed control. It involved measuring resistance and speed of the robot, then at the end they throw in a couple of random questions asking us to graph a bunch of these signals in excel. I guess it sort of relates because that is how the pwm works, but it wasn't something that was covered. There is no useful book for the class, so I have been searching for the past few days trying to figure this out.[EDIT:]
I think I am figuring it out. For that example a 100 Hz frequency gives me a period of 10 ms, and a pulse width of 5ms since my duty cycle is 50%. My high being 5 volts and my low being 0 volts.

Once i figured out what everything was this isn't too bad.

thanks for your help
 
Last edited:
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'Collision of a bullet on a rod-string system: query'
In this question, I have a question. I am NOT trying to solve it, but it is just a conceptual question. Consider the point on the rod, which connects the string and the rod. My question: just before and after the collision, is ANGULAR momentum CONSERVED about this point? Lets call the point which connects the string and rod as P. Why am I asking this? : it is clear from the scenario that the point of concern, which connects the string and the rod, moves in a circular path due to the string...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top