Back in March I got my first set of Field Notes and I recently completed my first notebook with them. I love writing in notebooks but in the past I’ve struggled with two problems: trying to separate different things into different notebooks and forgetting the notebook. Field Notes encourages you to put everything in one place, saying:
“I’m not writing it down to remember it later, I’m writing it down to remember it now”
And they fit in your pocket so you always have it with you.
I used mine for everything:
I used it for math and recipes:
I used it for scheming:
I used it for sketching:
I used it for derivations:
I used it for more scheming:
I used it to figure out fractals:
And it can be used for many, many more things:
Here’s the before and after as I start on my next one:
I really loved having this on me all the time. I was able to keep track of a lot more of my ideas and I reduced the random scraps of paper that usually accumulate and have to try to hold onto. It doesn’t replace a full lab notebook for writing down detailed setups but I don’t do that very often and I know when I am going to do that. This is perfect for that aha moment you have in the middle of a plane ride or sitting out in a backyard watching your dog get tangled up again and again. I plan on using these over and over again.
Oh and I’ve switched around the pocket I carry it around in and its already reducing the wear and tear a bit.
I always enjoy new posts on dot physics. Whether its the physics analysis of a crazy device via video footage or the musings on the fundamental nature of science I’m always excited to see what’s new there. Rhett Allain’s posts remind me of college engineering courses where we flew threw the math instead of getting stuck in the mud of derivations and saw that the underlying principles of momentum, energy, and net forces could solve so many problems. Helicopters and helicarriers are way cooler than trusses though. I think he is right that applying physics to fictional objects, characters and situations is still informative of the world. I especially like the python and vpython examples. They inspire me to try out that sort of simulation of the world for problems I find interesting. Maybe I will find the time to post some of that in the future.
So I finished my coursera course in Python. While it ended up being a bit more beginner focused than I expected I did learn a lot. Some of the peculiarities of Python and a lot about event driven programming which I had only learned in an ad hoc way before. Overall I really enjoyed the experience, the opportunity to practice making Python programs, the chance at seeing my peers’ implementations, and definitely the resulting games we made. I really liked our final project ‘RiceRocks.’ I souped up mine with a few extra features like, a hyperspace jump to get out of trouble, increasing difficulty, best score tracker, splintering rocks, and multiple rock sizes.
Click play in the upper left corner to get started.
I learned a lot doing this project about Python and about writing good code. Having gone back to doing some MatLab things at work I have to say that Python really is more readable. At first the forced white space might seem tedious but the result really is a much prettier code. Having readability as a founding principle really made me think about my style and how to keep it looking nice as I went. And that definitely saved me in a few cases when I went back to add features. Stay tuned for more Python projects because this is definitely a beginning rather than an end.
I’m taking the interactive python course from coursera and we just made Pong. You can check out my version here. I had some fun adding in a few extra things like sound effects and a computer player. It was an interesting figuring out a way to get the computer to play well but not too well. I ended up using four tricks:
- The computer only pays attention to the ball when it’s going towards the computer (more human like)
- As ball gets closer horizontally the computer is more likely to take an action
- The computer is more likely to make a move when the ball is further away vertically
- For the higher difficulties the paddle tracks where the ball will be in the future by a few samples (i.e. spotting ahead of the target)
The program compares the distance of the ball to a random number to accomplish the second two. To play it just click the play button in the upper left corner. It works in Chrome but might have issues in IE.
My pong game
It never really occurred to me before but where did the name Bluetooth come from? I stumbled upon the answer while reading about Viking history of all things. Apparently one of the danish kings who was particularly good at getting allies to work together was named Harald Bluetooth. Bluetooth is not only named after him, its logo is the Norse Rune for his initials H and B combined:
About two weeks ago I challenged myself to build a pumpkin robot. Not having a lot of time I had to keep it pretty simple. Maybe next year I’ll do one of my more elaborate ideas. This year’s pumpkin robot looks at people who get close to it:
It looks great in the dark too but it’s a lot harder to capture with video.
Now I will be the first to admit that this more of a pumpkin on a robot than a pumpkin robot but that doesn’t change the fact that I had a lot of fun making it. Some of of the non-technical things I really liked about this project were:
- Built in deadline (Halloween)
- Some obvious requirements (has to include pumpkin)
- Interaction is a must
- People understand it when I tell them about it
- Fun decoration when it’s done
A lot of my robots end up being a bit too abstract to describe, whereas this one is immediately clear in purpose — the pumpkin looks at you!
Some of the technical problems I had to solve made this fun too:
- How to move with the weight of pumpkin
- How to mount a pumpkin on a robot so won’t roll away
- How to get the robot to look at a person
- How to get it to perform reliably
I think one of the best parts was that I could easily tell if it was working because I had such a clear test: Does it look at me? Yes or no.
- Vex Robot
- Wood piece to hold pumpkin
- Foam mat to keep pumpkin in place
- Ultrasonic range sensor for finding a person
How it works:
This is a behavior based robot so instead of listing out a sequence of steps to perform it’s a matter of defining the right set of behaviors to get the overall desired effect (check out Rodney Brook’s papers for more info). The two key behaviors are lookBackAndForth and pauseRotate. There are some other support behaviors that you can see in the diagram below.
The lookBackAndForth behavior uses the body angle estimate to decide if the robot has turned too much and reverses the turning direction. The limits are +/- 60 degrees from where ever the robot starts at.
The pauseRotate behavior uses the range estimate from the ultrasonic range sensor to trigger a pause in the motion when something is close enough (less than a meter). It also will only trigger another pause if the robot has rotated enough from the last pause (about two degrees). The pause is 1000 cycles through the main while loop and then the counter returns to zero and the robot can move again.
I tried more elaborate behaviors before I settled on the simple pause but they didn’t work because they required constant movement to create a model of where the person was. For me to feel like the robot was looking at me required the robot to stop moving altogether. The key take away I got from this project was that I could get an emergent behavior by combining two simple component behaviors. I perceive the robot is performing this more complex behavior when it really is just simple pausing at the right moment. I intentionally magnified this effect by carving the pumpkins eyes to look straight forward at the person.
An ultrasonic range sensor is a terrible way of detecting a person because fabric doesn’t really return an echo. You can see me holding a book in the video to get it to see me better. An IR distance sensor would work much better but i don’t have one yet.
I used an LED candle. I think it would be a bad idea to use an actual candle.
So I just made a “homopolar motor” aka a motor with one magnet field:
Homopolar motor made with buckyballs
I followed the directions at makezine which seemed simple enough but they did take a bit of tweaking to get it to work. The first time through, I didn’t pay close enough attention to step 4, sanding only one side of the second lead which is critical to how the motor works. The final step of tweaking to get the right balance was a bit vague but I figured out a trick to get the coil balanced.
Here’s how the motor works and why step 4 is so important. The permanent magnet pulls the coil’s magnetic field into alignment and then the coil’s angular momentum allows it to spin past that alignment. If it wasn’t for step 4 the coil would reverse direction and settle into alignment and stop. But because the second lead is only half sanded, the second lead acts like a switch. The circuit turns off when the bare side is up and it turns on when the bare side is down touching the paperclip. With the magnetic field off for part of the rotation, the coil can complete its spin. I didn’t know that wire had this built in switch until I built it wrong and couldn’t get it to work. There’s no substitute for hands on learning.
The parts I used for my motor were two paperclips to hold up the coil, the enamel coated magnetic wire for the coil, a AA battery, and buckyballs to hold the paperclips in place and act as the permanent magnet. I’ve seen some people substitute the buckyballs for the paperclips altogether but I couldn’t get that to work.
The parts to make the motor
Following the directions was definitely crucial but getting it “balanced” makes the difference between it working and nothing happening. I could tell that it was close to working because the coil started to react to the magnet meaning the coil was creating a magnetic field. But I couldn’t get it to spin freely. It would just go a few spins and then stop. What I realized was that balanced meant it couldn’t have any spots in its rotation that it would want to stop due to a lower center of mass. I had to get the two ends to go out and away from the coil along its center. I found an easy test for this: If the coil hung vertically instead of horizontally when i put it in a horizontal position then it wasn’t aligned. I could bend the ends a bit and try it again until it passed my test. Once that happened i could get it to start and keep going. Another problem I had was once the coil was spinning, the coil would start slipping towards a side. I never found a good solution for that problem but playing around with bending the ends a bit to flare it out somehow got it to stop.
One last thing, I found that holding a second magnet nearby could speed up or slow down the motor depending on where I held it. Made playing with the finished very fun.
Here’s a video of the final result: