THE FAST CHAIN PROBLEM - ARDUINO LASER GATES
1. Introduction
Hi! This will be my entry for the Proving Science Project14. This is an old project of mine, the second real project I ever done with Arduino after a simple bicycle speedometer. For this project I had to design an apparatus for proving a physical phenomenon which I will describe in this blog. This was the project that really got me in love with electronics. A lot of my design, as you will see through the blog, was influenced by my favorite show which pushed me into direction of science and electronics and that's Mythbusters. With this, I would also like to express my sadness for the passing of Grant Imahara, who passed a few weeks ago at a very young age. He was honestly a huge inspiration for me with the rest of the crew, specially with his expertise with electronics and robots.
Story
I did this project while I was in high school. In high school I loved science, specially physics and was getting a bit into electronics when I bough my first Arduino starter kit. I loved going to the normal physics competitions, but in my last year of high school, a new competition appeared in my country, IYPT. It's a competition that mixes science with experimental approach instead of just the usual theory that is thought in high school. I was lucky enough to be part of the Serbian team which went to Singapore for the 30th IYPT competition.
What is IYPT?
IYPT stands for International Young Physics Tournament, it's a competition with a really long history, of over 30 years. It adds an experimental approach to the usual theoretical physics competitions. I'll describe it shortly here, if you are interested in more details, just click on the Longer Description Tab. As taken from their official website "The International Young Physicists’ Tournament (IYPT), sometimes referred to as “Physics World Cup”, is a team-oriented scientific competition between secondary school students.", "The participants present their solutions to scientific problems they have prepared over several months and then discuss their solutions with other teams. The roles of Reporter (Presentation), Opponent and Reviewers are graded by a jury consisting of international experts." (Source: https://www.iypt.org/ )
{tabbedtable} Tab Label | Tab Content |
---|---|
Short Description |
Competition Every year there is a new set of problems, 17 to be exact, besides the problems you have a reference kit which has papers written on that problem or similar problems which would help you with your solution. You need to make a presentation for your problem, where you explain the problem, explain your theoretical solution and show your experiment. After that the opponent can question you about your solution and experiment, and then you have a discussion with them. The reviewer comes at the end, can ask both sides questions and then can review how the presenter did the job, if the opponent missed something, and so on. After that, for the next problem the roles are changed and so on. You are judged by a panel of international judges from 1 to 10 and your score is the total mount gotten from their scores. |
Longer Description |
Problems Every year there is a new set of problems, 17 to be exact, besides the problems you have a reference kit which has papers written on that problem or similar problems which would help you with your solution. Here is an example of how the reference kit looks like: http://kit.ilyam.org/Draft_2017_IYPT_Reference_kit.pdf In the months prior to the competition, you need to "solve" the problems. You need to have a theoretical explanation as to why that phenomenon occurs, what are the relevant parameters and how they affect the outcome, and also have an experimental set up that will back up your claims. So it's a really interesting and broad competition to say the least. Problems can go from protecting an egg from a drop to experimenting with effects like Leidenfrost start and Schlieren photography.
Competition The competition itself consists of rounds which are help throughout a week or so. In every round 3 times participate with changing roles, and every round has 3 rounds in it self. There are 3 different roles you can have during a round, you can be a presenter, an opponent or a reviewer. This is how a round goes. The presenter gets time to show his presentation, where you need to explain what's your problem, your solution to that problem, why you think that's a suitable solution as well as your experiment set up for that problem. After that the opponent gets time to ask you a few question after which the most interesting part start, the discussions. The presenter and the opponent have a timed discussion where the opponent can go and question any part of your solution, experiment and generally question you to see if you have the right understanding of the problem. After that discussion the reviewer can ask both the presenter and the opponent questions after he has a few minutes to say what he liked and didn't like about the presenter, both the presentation and the discussion as well as about the opponent, if he asked good questions, did he have a good understanding of the problem, did he miss something and so on. All of this is looked at by a panel of international judges who consist of international experts, who after everything is done can ask a few questions after which they grade all of the teams with grades from 1 to 10. The teams score is the sum of all of the scores from those judges. After that, a new problem is selected, and the teams switch the roles. Here is a video of how the finale looked like the year I attended: https://www.youtube.com/watch?v=tG-Oqs_CZW8
Free time Besides the competition there is also a lot of free time in between, where you can go and work on your problems a bit more, or you can go and hang out with people from all around the world! Besides that, the organizers usually make great field trips for the attendees around the city where the competition is held, which is also an amazing bonus. While there is a lot of work before and during the competition, there is also free time and a lot of good time while you are there. |
The competition is really amazing and is a great opportunity for anyone interested in science and also in electronics, because so much cool experimental set ups can be done so simply now. If you are a high school student, I would highly suggest to talk to your teachers to see if your country is a part of the IYPT competition to see how you could join the team. It really is an amazing experience! Now back to the problem I was solving and the theme of this blog.
2. Problem
The problem I worked was the problem number 6, the fast chain:
A chain consisting of wooden blocks inclined relative to the vertical and connected by two threads (see Figure) is suspended vertically and then released. Compared to free fall, the chain falls faster when it is dropped onto a horizontal surface. Explain this phenomenon and investigate how the relevant parameters affect the motion.
To explain the problem a bit better, here is how that chain looks like:
The problem states, that a chain consisting of wooden planks, constructed like I've shown in the picture will fall faster when it hits a raised surface than when free falling from a same height.
3. Theory
{tabbedtable} Tab Label | Tab Content |
---|---|
Short Explanation |
Theoretical Model When the point A of the block hits the surface, it will in ideal conditions stay where it hit (in reality we will have a bounce), but the rest of the block will continue going down until it's laying down on the surface. We will get something like a swivel effect around the point A, meaning that the point B will slightly pull on the string above it. A lot of things happen here at once, specially when you consider the bounce too, but all in all, the point B will give a little tug to the string on the right making the whole chain go just a tiny bit faster and so on as the blocks fall down one after the other. That additional speed will of course accumulate with the length of the chain giving us our effect, some of the parameters that are relevant for us are the number of wooden blocks, the angle at which they are positioned, the surface they impact and so on. If you are interested in a few more details, check the long description tab.
|
Long Explanation & Parameters |
Theoretical Model Before we get into the experiment let's see why this phenomenon occurs and what are some of the relevant parameters that we can look at. The problem is really simple, we have a chain that falls on a flat surface so let's examine what happens when one of the wooden blocks hits the surface. In the picture above we can see a single wooden block at the moment of impact with the surface. Right before the impact, the block was going at some velocity v, in the ideal situation as the block hits the surface, the point A will stay "glued" to the surface while in reality we will have a small bounce, with point A going up after the impact. But we can look at it like it starts swiveling around point A, which means the velocity of point B will increase. There is a lot of things happening here at the same, the whole block slowing down upon impact as well as then having a small increase in speed of point B. Let's look at the bigger picture now with multiple blocks of wood in a chain like it was described. Now if we look at this picture we can see the same block we talked about before, but this time, with another block above it. The wooden blocks are firmly attached to the string, so, as the first block hits the ground and starts going down, the right string, where the point B is, will start puling on the whole chain above, making it increase its velocity. Here we can see how that looks, as the lower block start going towards the ground it will pull on the right string, then the next block will pull onto the left string and so on. This is an idealized model on so many levels, we are looking at strings like they can't be stretched, we are looking at blocks like they are completely homogenous and that they don't bounce as well as that every block hits the surface perfectly, but of course in reality, there will be deflection when bouncing even blocks hitting one another during a bounce back and so on. But still, this is enough to theoretically explain why this phenomenon occurs.
Relevant Parameters Here is a short list of parameters that we can take look that will influence the experiment and how they can contribute
These are just some of the parameters that can be tested but the list goes on, we can beside this look at the string, how thick it is, how stretchy it is, and so on, but with this, we have a pretty good idea of how and why this phenomenon occurs, and what are some of the most important parameters to take into consideration when performing our experiment. Let's get to the experiment design and after this, testing. |
4. Experiment
Now we're getting to my favorite part, designing and making the experiment setup. The experiment is not mandatory on the competition, but of course, it is highly valued. This was one of the experiments that wasn't that easy to replicate because it required a lot of making stuff and a lot of set up for it to show some results that the effect exists. But for me again, this was the reason why I like this competition so much. I will be using 2 different methods for proving this phenomenon, one being a camera at 120fps and the other one being Arduino laser gates that I made.
Idea
{tabbedtable} Tab Label | Tab Content |
---|---|
Experiment Set-Up |
Camera This was the approach inspired by so many Myhbusters experiments. I used my action camera which can record 120 fps and just made a background using 2 types of tape so I can easily track the speed, besides that I came up with a cool little idea of adding an LED with a button cell at the last wooden block which made a huge difference in recordings as I will show later.
Laser Gates Besides the camera I wanted to make a set of laser gates, putting it short, I used 4 IR LED-s and 4 IR transistors which react to the IR light. How I made the holders and interfaced with Arduino will be covered in the build section coming after this. I was dropping 2 chains at the same time, so I had sensors positioned at the same height for both chains to make the results valid, here is my idea of the set up:
Quick Release Besides that I just made a small quick release mechanism at the |
Experiment Analysis and Set-Up |
Experiment Design As I've already stated, I wanted to use 2 approaches for gathering data for this experiment, one being the camera and the other being the laser gate system. But that can't be all, there is some background stuff needed for everything to work correctly (this was 3 years ago, I have a lot of pictures and videos but not everything). Some of the questions I needed to answer when designing this experiment set up were:
Camera Set Up Considering the camera, we have to look at a few of the points made above, specifically points 3,4,5. Let's start with question 3, this is where I drew a lot of inspiration from the Mythbusters, I took 2 kinds of tape that were the same thickness and glued them one underneath the other giving me a scale of my wall which made it much easier to know what I was looking at because I had a reference in the background of the shot. The camera needed a bit more light for the 120 fps video so I made a small LED reflector where I mounted a 4x4 grid of LEDs on a piece of cardboard covered in aluminium foil, sadly I don't have any clear pictures of that, and as for mounting the camera, I managed to mount using a ski pole in location where it was both easy to access but with a good shot. Here is how that set up ended up looking like: Here is kind of blurry shot that I have of the light that I mentioned: For the camera part, this set up turned out to work pretty good, but I had a cool little idea which proved to give some extremely good results. I took the standard 3mm LED and with some electrical tape attached it to a button cell, and then just attached that to the highest wooden block. It really made a huge difference when looking at the videos, since we can look at the position of the LED mark as well as how long of a streak it left due to the camera shutter.
Laser Gates We now come to the laser gates, to make this, I used an Arduino Uno, 4 IR LED-s and 4 IR transistors. My idea was for both of the chains as they are falling to break the IR beam with the center of the chain giving us valid results that we can then compare to each other. It was a bit tricky aligning everything together, but it was doable. It was critical for the sensors to be positioned at the same height so the results can be compared, but I made holders which enabled me to do that into which I'll get into in the next part of this blog, here is how that set up looked like: I made a small control board out of plywood to which I attached a few buttons, Arduino and a protoboard, to make everything a bit easier to set up every time. The Arduino would be powered via the USB cable, so I saved all of the data on it at first and then printed everything out onto the serial monitor, I then took that data, put into Excel where I saved everything and later did some plotting using various software I had. Here is a picture of the set up on the ground, where I was testing out alignments and stuff like that:
Quick Release Now we have to tackle question 1, 2 & 6. To make the experiment repeatable where we drop the chains from exactly the same height every time simultaneously I designed a simple quick release mechanism, here it is here in the picture: And here is how it works, there is a base that is mounted to the wall with slots on both sides with holes going through both of those slots. Besides that, there is a moving rail, which has to pins which go into those holes and hold the 2 chains in the slots on the side until I pull on the string hard, making the pins go out of the slots letting the chains fall. It's a pretty simple mechanism but it really worked perfectly for what I needed, I managed to get many tests with it without having any issues at all!
Chain Template To solve the final problem, number 8 I had to make somehow these chains, multiple versions, but I needed to make sure they had the right geometry. To do that I made a template (don't have any pictures of it), where I glued a couple of pieces of wood onto a plywood sheet and just slot in the 2 pieces of wood there and tie them up with string. To be able to compare different chains, I watched out for one thing, and that was that the distance between the centers of the wooden blocks on every chain had to be the same. Here are some measurements I used: |
Build
In the part above I explained the whole experiment set up and what I needed, the only thing that needed making were the holders for the laser gates. I made them out of wood planks that were 10x10 mm and I just cut a lot of them to size and glued and screwed them together. I needed 2 sets of them that were exactly the same so I could get the same comparable data. Another thing I needed to make was the quick release mechanism which was also just a couple of planks, nothing complicated when it comes to the mechanical build here.
This is the setup how it looked like while being used, a lot of books and everything else I could finally to level the table up, but surprisingly, it was pretty sturdy in the end. The back vertical planks had multiple holes drilled down it where I was able to put in the IR transistor, while the front had something like a rail down which I can slide the IR LED until I got a precise hit. The bigger the distance between these 2 beams, the better the overall accuracy of my apparatus, but than we wouldn't have such a good look at the speed at that very moment, so our measurement wouldn't be that good. With the chains mounted on the quick release mechanism here is how the whole set up looked like:
And of course to gather all of the data I used the Arduino Uno on the control board that I made
The control board consisted of a few buttons which were used for checking out how good the alignment was, restarting the data acquisition process as well as turning on the lasers.
Software
I had to go through a lot of old folders on an external drive, but managed to find the code that I think I used for all the measurements I will be presenting later:
const int ledpin=5; const int buttonpin=7; const int buttonpin1=8; const int buttonpin2=9; //Arrays double sensor1[100]; double sensor2[100]; // int calibration=0; int buttonpushcounter=0; int button2=0; int lastbutton2=0; int buttonstate=0; int lastbuttonstate=0; int button1=0; int lastbutton1=0; int a1=0; int a2=0; int b1=0; int b2=0; int q1=0; int q2=0; int s01=0; int s02=0; int s03=0; int s04=0; //Current values int s1=0; int s2=0; int s3=0; int s4=0; int ls1=1; int ls2=0; int ls3=0; int ls4=0; //Counters for sensors int r1=0; int r2=0; int r3=0; int r4=0; //Times double t1=0; double t2=0; double t3=0; double t4=0; //Sensitivity int k1=13; int k2=13; int k3=20; int k4=20; void setup() { pinMode(ledpin,OUTPUT); pinMode(buttonpin,INPUT); pinMode(buttonpin1,INPUT); pinMode(buttonpin2,INPUT); Serial.begin(9600); Serial.println("The program has started!"); delay(5000); pinMode(A2,INPUT); pinMode(A4,INPUT); } void loop() { if(buttonpushcounter==0) { button2=digitalRead(buttonpin2); if(button2!=lastbutton2) { if(button2==HIGH) { q1=0; q2=0; Serial.print("Current value of sensor 1= "); q1=analogRead(A2); Serial.println(q1); Serial.print("Current value of sensor 2= "); q2=analogRead(A4); Serial.println(q2); Serial.println(); } lastbutton2=button2; } calibration=digitalRead(buttonpin); buttonstate = digitalRead(buttonpin); if(buttonstate!=lastbuttonstate) { if(buttonstate==HIGH) { a1=analogRead(A2); delay(10); a2=analogRead(A2); delay(10); s01=(a1+a2)/2; Serial.print("Normal value for sensor 1= "); Serial.println(s01); b1=analogRead(A4); delay(10); b2=analogRead(A4); delay(10); s02=(b1+b2)/2; Serial.print("Normal value for sensor 2= "); Serial.println(s02); Serial.println("Calibration done"); buttonpushcounter++; } else { digitalWrite(ledpin, LOW); } } lastbuttonstate=buttonstate; } else { //First sensor s1=analogRead(A2); if(s1>k3) { ls1=1; } if(s1<k1 && ls1!=0) { sensor1[r1]=micros(); r1++; ls1=0; } //Second sensor s2=analogRead(A4); if(s2>k4) { ls2=1; } if(s2<k2 && ls2!=0) { sensor2[r2]=micros(); r2++; ls2=0; } button1=digitalRead(buttonpin1); if(button1!=lastbutton1) { if(button1==HIGH) { r1=0; r2=0; r3=0; r4=0; buttonpushcounter=0; Serial.println("t1"); for(int i=0; i<30; i++) { Serial.println(sensor1[i],0); if(sensor1[i]!=0){ Serial.println(60000000/sensor1[i],0);} } Serial.println("t2"); for(int i=0; i<30; i++) { Serial.println(sensor2[i],0); if(sensor1[i]!=0){ Serial.println(60000000/sensor2[i],0);} } Serial.println(" "); Serial.println(" "); Serial.println(" "); Serial.println(" "); Serial.println(" "); for(int i=0; i<30; i++) { Serial.print("t1-"); Serial.print(i); Serial.print("="); Serial.println(sensor1[i]); sensor1[i]=0; Serial.print("t2-"); Serial.print(i); Serial.print("="); Serial.println(sensor2[i]); sensor2[i]=0; } } lastbutton1=button1; } } }
The code was pretty bare bones, as much as I can tell from it, I used analog pins to read the data off of the sensors and saved them until the end when I then went out and printed the data out on the serial monitor. I printed out raw data, because I remember I had problems with converting that raw data into normal data using the Arduino, so I used Excel after that. Here is a picture of how one of those excel tables looked like:
In the end, this is how many of those tables I ended up with:
41 tables in total. Not all of them good, on some I had where it didn't register one of the blocks, or it had some other kind of bug, or the release mechanism didn't work perfectly and so on, but I managed to get a lot of data out of the laser gates, which I will be covering shortly. The 2 red tables at the top are theoretical values that can be easily calculated for free fall which I used to see how precise my apparatus was. With all of that out of the way, it was time to drop the chains and see if we get some good results. Here are a few videos and pictures which showcase the phenomenon pretty good.
5. Tests
Here are a few videos of me performing the experiment, in the first video you can see the chains falling between the sensors and lasers sending out that info to the Arduino where I later use that data to make graphs which I will be showing later.
Not much can be seen in this first video, except the chains falling, but take a close look at the 2 upcoming videos now.
I suggest you use the 0.25 speed of the video on YouTube for the chain fall and compare the 2 chains. Here are the screenshots from one of the videos which we can use as a proof of phenomenon. In the first screenshot which you can see here:
This is right before the impact with the table, if you look at the first wooden block, you can see they are pretty much at the exact same height, as expected, because they are both the same chains and free falling, but if we go down the video a bit further, things get a lot more interesting, take a look at this frame:
In this frame, you can see that the light trace on the right is both lower than the one on the left, and longer than the one left, which means it's lower and has a higher velocity which means that the chain on the right is going faster than the chain on the left, if we go a few frames further, we come across this:
In this frame we can see that the chain on the right is completely flat on the table, while in that time the chain on the left just got to the height of the table, further proving that the the chain does in fact speed up when it hits a raised surface, proving that the phenomenon that we are testing out is true. This is more than enough to call it true, but now, let's get into some results and analysis of the data that I got using the Arduino and the laser gates.
6. Results & Analysis
This is the part where the laser gates really shine and where they prove they really got some serious results, to start off, it's best to start with a calibration run. A calibration run is a way for me to drop the chain, measure the times, and compare them to the theoretical values that I've calculated. This can easily be done for a free falling chain with the most basic high school physics and a bit of time, this way, we will both check out how good the laser gates are as well as how good the chain is made, because if there are any imperfections anywhere, they will show in the results.
{tabbedtable} Tab Label | Tab Content |
---|---|
Free fall calibration |
Comparing with the 15 degrees chain Comparing with the 20 degrees chain Comparison between the 2 chains On the graphs above we can see the time comparisons, the first graphs shows us the difference between theoretical values and the 15 degrees chain, the second one shows us the difference between the theoretical and the 20 degrees chain, and the last one shows us the difference between the 2 chains. As we can see from all of the graphs, the results are extremely good, (the string I used wasn't completely unstrechable, so I could never make a perfect chain). Satisfied with these tests we can go and look at the values when we have a raised surface. |
15 degrees chain |
15 degrees chain experiments Here I will show the results I got for the chain with the 15 degrees wooden blocks, here are the graphs representing the time and the speed for this chain, comparing it to the free fall values: If we look at both graphs, we can see that at the beginning there is no difference, since the laser gates are a bit above the surface, so the first few wooden blocks won't be affected by this phenomenon. After a few blocks, we can see a trend where the time needed for the wooden block to pass between the 2 sensors in always smaller on the chain falling on the raised surface, compared to the free falling chain, if we calculate that into speed, the effect can be seen even better, but the time difference is a much more significant thing. And with that, we again have proof that this phenomenon is correct, this time with actual data to back it up using an Arduino Uno! To further experiment with this chain, I tried putting foam on the table, to simulate a softer surface, but it showed no difference when it came to the results, as you can see from the graph below: |
20 degrees chain |
20 degrees chain Here I will show the results I got for the chain with the 15 degrees wooden blocks, here are the graphs representing the time and the speed for this chain, comparing it to the free fall values: On the graphs above for the 20 degree chain we can see exactly the same thing as we did for the 15 degree chain, it's a pretty much exact value until we get a few wooden blocks in when the effect starts taking place, where we get the effect of the chain falling of the raised surface going faster.The time difference we see on the graphs accumulates with more wooden blocks we have. Here is what we can see when we compare the 15 degree chain with the 20 degree chain: On these graphs, we can see as we expect, no difference between the times or speeds at the beginning, but as we go further, we can see some inconclusive results because the chains aren't perfect and they don't always behave as expect on the every single link, but we can in the end see a significant different in speed when we look at the last link of the chain, meaning that the 20 degree angle gives us a bit of a better effect than the 15 degree chain. |
Camera Results |
Camera Results These are the results I've already showed in the blog, but here are a few more pictures showing us how the camera captured the difference between the 2 chains. The things to look out here for is what trace is longer compared to the 2, that shows us speed because the camera shutter is a constant time, so the length of the trace is proportional to the speed on the wooden block, as well of course as the position of the trace itself. That would be one set of results, and here is another set for different chains, the first ones for the 15 degree chains and the second ones are for the 20 degree chains On this picture we can see the chains floating in air completely at the same height, have in mind because I was using an action camera it has a fish eye lens which gives the curvature seen, but using the background we can see they are at the same height. And on this picture we can see at the very end how further down the chain on the right is compared to the chain on the left, also it has a longer trace, meaning that it is actually going a bit faster at that moment than the chain on the left. |
With that we can conclude the experiment and problem solving finished, I defined the problem a short theoretical explanation and using the experiment set up proved the phenomenon, proved the experiment set up was valid with the calibration test and using 2 different methods did experiments for different set ups with a few different parameters. I am really happy or better said, astonished by the results I managed to get with a set up like this. Further than this, we can try out different wood type blocks, different height drops and so and so on, but these are some basic parameters I had time to test out.
7. Upgrade Ideas
This set up is a real bare bone set up, but it did it's job exceptionally. If I was to make this apparatus again, I would change a lot of things compared to the set up now, here is a short list of the things I would like to do differently:
- Make it into a solution which doesn't need a connection to a PC
- This means have a data logger on the device itself, logging the data on a microSD card, which would mean, that this set up could be used anywhere in the field
- Having an actual device with display and controls
- This has a goal like the last point, meaning, it can be used anywhere, powered only by batteries and generally look more professional and be more intuitive to use
- Modular design
- Using aluminium extrusions, instead of wooden blocks for the rails, maybe with some 3D printed parts, for better positioning of the sensors and lasers
- Using interrupts instead of analogRead
- Making it a bit faster, even though, this worked more than good
8. Summary
This was my second real project with an Arduino and like then I am still so happy how it turned out. One of the reasons I like using this platform so much is because it's simple and in a lot of cases for my projects, more than powerful enough. If I ever need anything stronger or with different capabilities there are always STM boards, ESP32 and so on. This was a really fun project to build for a really cool competition. I would again highly recommend it to any high school student who loves science and loves playing around with it, because it really shows the fun and interesting part besides all of the necessary formulas and so on. Thanks for reading my blog, hope you like it!
Milos
Top Comments