Some advice for bui...
 
Notifications
Clear all

Some advice for building a simple pendulum

14 Posts
2 Users
6 Likes
2,080 Views
(@jenny2)
Member
Joined: 3 years ago
Posts: 15
Topic starter  

I would like to build a simple pendulum. I am following instructions I post below.

The instructions use a 10K Plastic Linear Mono PC 16 6mm Potentiometer driven by an Arduino Uno R3 to get the pendulum going.

Here are some questions I have:

1) Is there an equivalent for this potentiometer? (I couldnt find this exact model)

2) Where would I get the hollow aluminum bar and a bob that can slide along it? The bob has to fit into it so that it can be moved up and down to get pendulums of different lengths.

3) Ball bearings are used at the pivot point I assume the potentiometer connects to them in the front and back. Where would I get those bearings?

Any ideas would be welcome (I am a novice).

Thanks!

Jenny

p1
p2
p3
p4

   
Quote
Topic Tags
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2533
 
Posted by: @jenny2

I would like to build a simple pendulum. I am following instructions I post below.

An interesting project. First question is: do you wish to exactly duplicate the experiment, or do you just want to produce a similar setup for your experiments ?

The instructions use a 10K Plastic Linear Mono PC 16 6mm Potentiometer driven by an Arduino Uno R3 to get the pendulum going.

Here are some questions I have:

1) Is there an equivalent for this potentiometer? (I couldnt find this exact model)

I doubt that it matters, since I would expect that the purpose of the pot is to monitor the arm's angle to determine top of swing on both ends and thus calculate the period. I should think that pretty much any pot would do, as long as you can find bearings to fit it.

it is worth noting that this is a 280 degree pot which suggests that the original author may have been raising the arm above horizontal (by about 50 degrees). You'd have to test any pot you're looking at to see if it will allow the arm to swing up far enough for your needs.

2) Where would I get the hollow aluminum bar and a bob that can slide along it? The bob has to fit into it so that it can be moved up and down to get pendulums of different lengths.

If you intend to exactly match the original plan, head down to your nearest metal shop and get the parts custom made there (but it will really cost you big money).

Ask them (when they cut the cylindrical brass weight) to drill a hole down the middle from flat end to flat end slightly larger than the hollow tube (so the weight can easily slide up and down the tube). Also get them to drill and tap a small hole (specify size and thread) from side to side in the middle of the brass weight for a screw to lock the weight into a fixed position on the tube (by friction). Make sure you get a bolt with the same diameter and thread as well.

Get them to make a small connector between the pot shaft and the arm by drilling holes into a small metal bar and secure each with a nut and bolt through the shaft/tube.

3) Ball bearings are used at the pivot point I assume the potentiometer connects to them in the front and back. Where would I get those bearings?

That depends, the bearing(s) will need to hold the potentiometer shaft and allow it to rotate around and back as the rod swings from side to side. The pot will need to be anchored on the back of the vertical support and a hole drilled through the support to hold the bearing(s) which will hold the pot's shaft. The other end of the shaft will have a connector to anchor the arm to the pot shaft.

p1
p2
p3
p4

On the other hand, if you don't want (or need) to duplicate the original setup and just want to learn how a pendulum works, then I'd suggest you switch as much as possible to wood. Use a heavy modding or 1x2 piece for the vertical and a wooden dowel (1/4" or less) for the arm and the end of a board (or a few 2x4s screwed together) for the base.

If you're lucky, you may be ably to find a lot of the wooden parts for free in the off-cuts (junk) box at your local home building supply (Castle, Home Depot, etc). You can cut and drill them as required yourself and save a bundle.

You'll just need to buy bearings with an inside diameter the same size as the pot shaft and drill the hole in the vertical support to match the outer diameter of the bearing (you want this to be a firm fit so that the bearings don't move during your experiments.

If you really want to cheap out, you could fill a small pill bottle with lead shotgun pellets and use a hose clamp to fasten t to the arm 🙂

Hope this helps.

Anything seems possible when you don't know what you're talking about.


   
jenny2 reacted
ReplyQuote
(@jenny2)
Member
Joined: 3 years ago
Posts: 15
Topic starter  
Posted by: @will

An interesting project. First question is: do you wish to exactly duplicate the experiment, or do you just want to produce a similar setup for your experiments ?

Not necessarily duplicate the setup. The main idea from the setup that I would like to use is the ability of changing the pendulum length (moving the brass along the pendulum arm).

In the end I probably will have to iterate starting with a rough setup and evolving into something that is a precise pendulum even for high angle oscillations (so that I can observe period, frequency with enough accuracy without being affected by random jerking- say because the pivot is clunky or some other reason). 

I like a lot the idea of starting by using as much wood as I can get away with since it is so much easier to work with and customize (hadn't thought about it).

From there I can evolve the setup if needed.

Thanks Will!

Jenny


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2533
 
Posted by: @jenny2
Posted by: @will

An interesting project. First question is: do you wish to exactly duplicate the experiment, or do you just want to produce a similar setup for your experiments ?

Not necessarily duplicate the setup. The main idea from the setup that I would like to use is the ability of changing the pendulum length (moving the brass along the pendulum arm).

If you don't need to duplicate the layout, I'd suggest using a cheap IR proximity sensor mounted on the vertical support with a piece of reflective tape on the back of the arm as a replacement for the potentiometer. That way you can get a pulse whenever the arm passes in front of the support.

You'd need to modify the Arduino code to time the length between sensor triggers instead of potentiometer extrema, but you would be able to raise the arm to nearly vertically up if you wanted, because you're no longer limited by the pot's rotational capacity.

It would also make the pivot and arm construction easier.

On the downside, timing may be less precise than the pot because the arm may not trigger the sensor at precisely vertical (i.e. will trigger slightly before the arm arrives at the exact bottom of the swing).

Anything seems possible when you don't know what you're talking about.


   
jenny2 reacted
ReplyQuote
(@jenny2)
Member
Joined: 3 years ago
Posts: 15
Topic starter  
Posted by: @will

If you don't need to duplicate the layout, I'd suggest using a cheap IR proximity sensor mounted on the vertical support with a piece of reflective tape on the back of the arm as a replacement for the potentiometer. That way you can get a pulse whenever the arm passes in front of the support.

You'd need to modify the Arduino code to time the length between sensor triggers instead of potentiometer extrema, but you would be able to raise the arm to nearly vertically up if you wanted, because you're no longer limited by the pot's rotational capacity.

It would also make the pivot and arm construction easier.

On the downside, timing may be less precise than the pot because the arm may not trigger the sensor at precisely vertical (i.e. will trigger slightly before the arm arrives at the exact bottom of the swing).

I thought about that option but that would restrict me to just be able to measure the period. In the end I would like to plot the angle evolution with time like in the figure below

p5

For this I need the pot or a sensor that can sample the pendulum several/many times during one swing. This brings me to 2 newbie questions about the pot:

1) If I go with a 6 mm pot do I pick the ball bearings to have a inner radius of 6 mm?

2) In the setup a 10K Plastic Linear Mono PC 16 6mm Pot was used and it mentions that this pot has a maximum effective rotation angle 280°. I cant find this kind of spec in pots online. How do I know?

Thanks Will!

Jenny


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2533
 
Posted by: @jenny2

I thought about that option but that would restrict me to just be able to measure the period. In the end I would like to plot the angle evolution with time like in the figure below

p5

I see now, it's not just the period that you want to illustrate but the rate of decay as well.

For this I need the pot or a sensor that can sample the pendulum several/many times during one swing. This brings me to 2 newbie questions about the pot:

1) If I go with a 6 mm pot do I pick the ball bearings to have a inner radius of 6 mm?

Yes, the potentiometer shaft has to pass through the interior of the bearing, so you'll need to pick a bearing whose inner diameter matches the pot shaft's diameter. Either that or you'll need to get a bearing with a larger inner diameter and put some kind of sleeve over the pot shaft to match.

In the following, I'm going to try to describe in detail what I'm suggesting. I apologize in advance if you already know most of what I'm going to say ...

You'll need to attach the potentiometer body to the vertical support so that it can't move or rotate. You'll drill a hole through the vertical support, place the bearing(s) onto the pot shaft and insert the bearing into the support. It doesn't matter if you have to force the pot shaft into the bearing or if it slides in easily, but it shouldn't wobble in any direction (or you may lose accuracy). Same with the hole in the support, a tight or loose fit is OK as long as it doesn't wobble.

The idea is that the arm must be able to twist the pot handle freely in both directions. Anything that allows the shaft to wiggle back and forth (in other words, do anything but rotate) will degrade the accuracy of your measurements.

Hot glue is your friend here if you have SMALL wobbles or need to accommodate a loose fitting bearing on either the shaft or the support 🙂

2) In the setup a 10K Plastic Linear Mono PC 16 6mm Pot was used and it mentions that this pot has a maximum effective rotation angle 280°. I cant find this kind of spec in pots online. How do I know?

I don't know where you're looking for your electronic parts. If they allow online searching (and are any good at it) try searching for "280 degree potentiometer" or just use keywords like "degree" with "potentiometer".

If you can't find anything suitable in your price range, you could also look for a "multi-turn" potentiometer which means that it takes more than 360 degrees to move from the bottom end of the range to the top end. This would require a bit more work because a full back and forth swing (i.e. starting the swing from almost vertical) will not cover the total range and may not be as accurate.

Anything seems possible when you don't know what you're talking about.


   
jenny2 reacted
ReplyQuote
(@jenny2)
Member
Joined: 3 years ago
Posts: 15
Topic starter  
Posted by: @will

I see now, it's not just the period that you want to illustrate but the rate of decay as well.

For this I need the pot or a sensor that can sample the pendulum several/many times during one swing. This brings me to 2 newbie questions about the pot:

1) If I go with a 6 mm pot do I pick the ball bearings to have a inner radius of 6 mm?

Yes, the potentiometer shaft has to pass through the interior of the bearing, so you'll need to pick a bearing whose inner diameter matches the pot shaft's diameter. Either that or you'll need to get a bearing with a larger inner diameter and put some kind of sleeve over the pot shaft to match.

In the following, I'm going to try to describe in detail what I'm suggesting. I apologize in advance if you already know most of what I'm going to say ...

You'll need to attach the potentiometer body to the vertical support so that it can't move or rotate. You'll drill a hole through the vertical support, place the bearing(s) onto the pot shaft and insert the bearing into the support. It doesn't matter if you have to force the pot shaft into the bearing or if it slides in easily, but it shouldn't wobble in any direction (or you may lose accuracy). Same with the hole in the support, a tight or loose fit is OK as long as it doesn't wobble.

The idea is that the arm must be able to twist the pot handle freely in both directions. Anything that allows the shaft to wiggle back and forth (in other words, do anything but rotate) will degrade the accuracy of your measurements.

Hot glue is your friend here if you have SMALL wobbles or need to accommodate a loose fitting bearing on either the shaft or the support 🙂

Thanks Will! This is exactly the kind of practical knowledge that I dont have and that is very helpful to know beforehand. So one bearing on the back and one on the front...

2) In the setup a 10K Plastic Linear Mono PC 16 6mm Pot was used and it mentions that this pot has a maximum effective rotation angle 280°. I cant find this kind of spec in pots online. How do I know?

I don't know where you're looking for your electronic parts. If they allow online searching (and are any good at it) try searching for "280 degree potentiometer" or just use keywords like "degree" with "potentiometer".

If you can't find anything suitable in your price range, you could also look for a "multi-turn" potentiometer which means that it takes more than 360 degrees to move from the bottom end of the range to the top end. This would require a bit more work because a full back and forth swing (i.e. starting the swing from almost vertical) will not cover the total range and may not be as accurate.

I did a search as you suggested. Among other results I got this one for example

https://p3america.com/r25w-r10k-l1/?gclid=Cj0KCQjw_fiLBhDOARIsAF4khR0xeYACbPgAqNxuydur9kFJ8Zt1L889jQVjD1CHpedHSV6kIa8pLe0aAv86EALw_wcB

Some more pot/electronics newbie questions:

1) The 280 degrees means that it can turn 140 degrees to either side of the 0 position? Or 280 one way from the 0 position? (I guess both cases are similar if I change the definition of the 0)

 2) Does it matter if the pot is 1kOhm or 10KOhm (both 280 degrees)? What does the resistance value translate to in practical terms?

3) Once I settle into a pot I just search for ball bearings with the inner dimension. The outer size is not as important since I can customize the size of the drilled hole to match the outer size.

Jenny


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2533
 
Posted by: @jenny2

Thanks Will! This is exactly the kind of practical knowledge that I dont have and that is very helpful to know beforehand. So one bearing on the back and one on the front...

Exactly, that will provide good support for the total weight of the arm and pendulum weight which will be trying to twist the pot handle downwards.

I did a search as you suggested. Among other results I got this one for example

https://p3america.com/r25w-r10k-l1/?gclid=Cj0KCQjw_fiLBhDOARIsAF4khR0xeYACbPgAqNxuydur9kFJ8Zt1L889jQVjD1CHpedHSV6kIa8pLe0aAv86EALw_wcB

That looks quite suitable.

Some more pot/electronics newbie questions:

1) The 280 degrees means that it can turn 140 degrees to either side of the 0 position? Or 280 one way from the 0 position? (I guess both cases are similar if I change the definition of the 0)

What may be easier to visualize if if you turn the pot all the way left and mark where it stops and then turn it all the way right and mark where it stops. Then pick a spot halfway between the two extrema and mount the pot with the midpoint pointing vertically downwards.

That will let the arm swing in the same amount in both directions (clockwise and widdershins) so that your pendulum will operate with the maximum swing (of 285 degrees as per the pot result above)

 2) Does it matter if the pot is 1kOhm or 10KOhm (both 280 degrees)? What does the resistance value translate to in practical terms?

I haven't seen the Arduino sketch, so the operation isn't known. However, I suspect that it will be passing 5V through the pot ends and reading off the voltage on one of the analog pins. The reading represents the analog of 0-5V translated to the range 0-1023 (depending on the + and - connections on the pot, it could be 1023-0 if they're backwards).

So, that means that the pot is continually powered by 5V and will be drawing power the full time it's connected. So, using a 10K pot versus a 1K pot reduces the current (and power) drawn by a factor of 10.

Ohm's law says voltage = current x resistance

So current = voltage/resistance

So current (1K pot) = 5V/1000 = 5 milliAmps; current (10K) = 5/10000 = .5mA

If the arm swings through the full arc of the pot's physical limits, the Arduino will still measure the value inside the range 0-1023, so the max resistance of the pot is immaterial to the operation of the sketch.

Since the pot is positioned with the middle pointing vertically downward, the Arduino will theoretically show a reading of about 512 at rest. The reading will go up and down as the arm swings back and forth and will gradually settle at 512 as the arms slow down and stop.

Let us assume, for example that the pot is perfectly situated and perfectly constructed with precisely even distribution of the resistance over the full range of mechanical rotation range (as if that could actually happen ...)

If the arm swings through an arc, say A degrees on a 280 degree pot, then the value read by the Arduino will be from 1024 x (140+/-A)/280.

So, for an arc of -20 to 20  degrees

left = 1024x(140-20)/280 = 438

right = 1024x(140+20)/280 = 585

Or vice versa, depending on polarity across the pot.

3) Once I settle into a pot I just search for ball bearings with the inner dimension. The outer size is not as important since I can customize the size of the drilled hole to match the outer size.

Exactly.

Anything seems possible when you don't know what you're talking about.


   
jenny2 reacted
ReplyQuote
(@jenny2)
Member
Joined: 3 years ago
Posts: 15
Topic starter  
Posted by: @will

I haven't seen the Arduino sketch, so the operation isn't known. However, I suspect that it will be passing 5V through the pot ends and reading off the voltage on one of the analog pins. The reading represents the analog of 0-5V translated to the range 0-1023 (depending on the + and - connections on the pot, it could be 1023-0 if they're backwards).

So, that means that the pot is continually powered by 5V and will be drawing power the full time it's connected. So, using a 10K pot versus a 1K pot reduces the current (and power) drawn by a factor of 10.

Ohm's law says voltage = current x resistance

So current = voltage/resistance

So current (1K pot) = 5V/1000 = 5 milliAmps; current (10K) = 5/10000 = .5mA

If the arm swings through the full arc of the pot's physical limits, the Arduino will still measure the value inside the range 0-1023, so the max resistance of the pot is immaterial to the operation of the sketch.

Since the pot is positioned with the middle pointing vertically downward, the Arduino will theoretically show a reading of about 512 at rest. The reading will go up and down as the arm swings back and forth and will gradually settle at 512 as the arms slow down and stop.

Let us assume, for example that the pot is perfectly situated and perfectly constructed with precisely even distribution of the resistance over the full range of mechanical rotation range (as if that could actually happen ...)

If the arm swings through an arc, say A degrees on a 280 degree pot, then the value read by the Arduino will be from 1024 x (140+/-A)/280.

So, for an arc of -20 to 20  degrees

left = 1024x(140-20)/280 = 438

right = 1024x(140+20)/280 = 585

Or vice versa, depending on polarity across the pot.

 

The setup uses the sketch below.

/*
  Analog input, analog output, serial output

 Reads an analog input pin, maps the result to a range from 0 to 255
 and uses the result to set the pulsewidth modulation (PWM) of an output pin.
 Also prints the results to the serial monitor.

 The circuit:
 * potentiometer connected to analog pin 0.
   Center pin of the potentiometer goes to the analog pin.
   side pins of the potentiometer go to +5V and ground
 * LED connected from digital pin 9 to ground

 */

// These constants won't change.  They're used to give names
// to the pins used:
int analogInPin = A0;  // Analog input pin that the potentiometer is attached to
int analogOutPin = 9; // Analog output pin that the LED is attached to

int sensorValue = 0;        // value read from the pot
long int vreme=0;

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
}

void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);
  vreme= millis();


  // print the results to the serial monitor:
  Serial.print(vreme/1000.0);
  Serial.print(":");
  Serial.println((sensorValue-512)/3.657);
  delay(50);

}

Thanks again for all the help. I think I am ready to go ahead.

Jenny


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2533
 

@jenny2 

Thanks for sharing an interesting project and for showing the sketch; it's printing out the angle in degrees (from vertical) of the arm every 50 milliseconds.

PS - To get the same effect using the 285 degree potentiometer, you'll need to change the value in the denominator from 3.657 to 3.593.

Anything seems possible when you don't know what you're talking about.


   
jenny2 reacted
ReplyQuote
(@jenny2)
Member
Joined: 3 years ago
Posts: 15
Topic starter  
Posted by: @will

it's printing out the angle in degrees (from vertical) of the arm every 50 milliseconds.

PS - To get the same effect using the 285 degree potentiometer, you'll need to change the value in the denominator from 3.657 to 3.593.

Thank you Will. After you pointed it out it made sense I had to change to 3.593 for 285 degrees.


   
ReplyQuote
(@jenny2)
Member
Joined: 3 years ago
Posts: 15
Topic starter  

@will one more newbie question: 

why use the ball bearings?

wouldn't be easier to hold the pot in place and snuggle the pendulum arm tight on it?

I am sure there is a reason to use the ball bearings though...


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2533
 

@jenny2 

The original plan included bearings, so I just went along with it 🙂 If you feel that you can attach the pot firmly to the vertical support in some wiggle-free manner, then it should be quite acceptable to do it.

Note, however, that the farther the arm protrudes from the vertical support the higher the bending moment will be and it may be subject to tipping or wobbling as the arm swings.

You may be able to use a very large vertical support and drill a hole through it and insert the pot in the opening. That would allow you to keep the arm close to the support and pretty much eliminate the potential for rocking the pot body as the arm swings.

The only criterion is to make sure that there is as little friction dragging on the rotating arm. Normally, the friction of the pot wiper rubbing the resistive surface would greatly exceed the friction created by the bearings. But if you can eliminate the bearings and still maintain a rigid frame, that's even better.

Anything seems possible when you don't know what you're talking about.


   
jenny2 reacted
ReplyQuote
(@jenny2)
Member
Joined: 3 years ago
Posts: 15
Topic starter  
Posted by: @will

@jenny2 

The original plan included bearings, so I just went along with it 🙂 If you feel that you can attach the pot firmly to the vertical support in some wiggle-free manner, then it should be quite acceptable to do it.

Note, however, that the farther the arm protrudes from the vertical support the higher the bending moment will be and it may be subject to tipping or wobbling as the arm swings.

You may be able to use a very large vertical support and drill a hole through it and insert the pot in the opening. That would allow you to keep the arm close to the support and pretty much eliminate the potential for rocking the pot body as the arm swings.

The only criterion is to make sure that there is as little friction dragging on the rotating arm. Normally, the friction of the pot wiper rubbing the resistive surface would greatly exceed the friction created by the bearings. But if you can eliminate the bearings and still maintain a rigid frame, that's even better.

Thanks! That all makes sense. We will see in practice what happens 😀 


   
ReplyQuote