Final Project: Code (2)

I’ve run into a mental block concerning the exact implementation of the design for the physical construction of the Rita Shaker, so I’ve decided to focus on making sure I can run the servo motors with the arduino board. The arduino program actually has a sample program to control a servo motor in the servo library.



I uploaded the program and nothing happened. This may have something to do with my use of the Arduino Motor Shield R3.

After searching various sites for how to interface a servo motor with the motor shield I am still frustrated. In most of the posts found they talk about interfacing with a stepper motor. If I wanted I could completely abandon the shield and just interface directly with the arduino board. Now that I reread the page that describes the use of the motor shield I am aware that it does not list servo motors as one of the suggested items to run with it. This may be because of their relative simplicity and how easy it is to use them directly with the board.

The sites I looked at can be found here, here, and here.

I am going to consult with some people before I go and cut off the ends of the wiring for the servo motors so I can connect it to pins on the arduino board.


Junior Lab 2: A Retrospective

Over the course of my time at UNM I have taken part in many different types of labs including biology, chemistry, and physics. I can say without a doubt, however, that the last two semesters of Junior physics lab have been unlike any others I have encountered. With past labs there has always been a very strict procedure to be followed and at times this is absolutely necessary. Yet, with the type of experiments and work done in this lab it made for a much more rewarding experience to have the instructions left open ended. It is important to note that I am an individual that usually likes to have very detailed instructions on how everything should work in all aspects of my life. The approach taken in the lab ended up being very empowering and freeing. I gained confidence in creating ideas and taking risks. I also learned to rely on and trust my fellow classmates and to approach the endeavors of our projects in a collaborative manner. With regard to the electronics portion of the class, I think it would of benefit to introduce the arduino earlier in the course and to integrate it into the already established projects.  In the end I think the approach taught my Dr. Koch and Anthony has greatly impacted me in regards to laboratory science but also in a very personal way as well. The belief that we should be open to new and novel ways of doing things is a very important one that this class accomplished at making apparent.


Though my experience using figshare has been limited to the single assignment where we were required to make use of it, I can see its potential for being of great benefit to lab science. It allows one to easily store all data associated with their projects and makes it easy to search for data of other’s that may be of use. If scientists were to upload data which was good and bad it could lead to greater accountability and understanding by others of their projects. As far as functionality it worked great. I do have one suggestion regarding the screen where you create a new data entry. I have uploaded a screen capture  of this to better illustrate my point. While filling out the information on my data I twice mistakenly clicked on one of the recent tags on the right hand column thinking that it would populate them in to the tags field within the form I was filling out. Instead, it just used navigated me to a list of already created data sets where I had used the tags. When I attempted to return to the original screen to complete inputting data, I found that I had to reenter all my data. I would suggest a warning that you are navigating away from the page and will lose data or something of this nature.

Open Notebook Science

My experience with open notebook science has without a doubt been a very enlightening one. I’ll admit that when the approach was first described last semester during my first Junior Physics Lab with Dr. Koch, I experienced a certain amount of trepidation. For so long I had been indoctrined in the traditional manner of performing laboratory science and like others I was not very enthusiastic about making a change. The aspect I was most wary of was the fact that my fellow classmates would have instantaneous access to all information in the notebook and that especially all my mistakes would be there for everyone to see.

After two semesters of using ONS i feel much different towards it than I did in the beginning. I no longer feel awkward having my mistakes in full view of others, because I know their’s are there as well, and by having access to each other’s successes and failures we can better learn and perfect the techniques used in our labs. One of my favorite aspects of ONS is the use of technology to better archive all aspects of our procedures, both written and media based. I’ve actually looked to see how to use this in all aspects of my life. I am now an avid fan and user of both google docs and evernote. It may be a long road but if scientists as a whole were to adopt the ONS format they and scientific advancement would benefit.

Final Project: Code

The goal for the device will be to use two servo motors in sync to move the arms of the device from vertical to a position about 30 degrees from vertical and then return it to the original position. This process will be repeated for a predetermined count. The initial prototype will only have one setting but my hope is that the final product will let the user choose a number of repetitions ranging from 5 to 35 by increments of five.

Possible Sources of Code

I was able to find basic instructions for programming the Arduino to control a servo motor while checking out the servo motors available from their store. The instructions can be found here. On the page they also mention that ” Note servos draw considerable power, so if you need to drive more than one or two, you’ll probably need to power them from a separate supply (i.e. not the +5V pin on your Arduino).”

In the post discussing my electronics purchases I expressed concern that I would need an additional power supply for the servo motors. Their explanation makes me feel a bit more hopeful, as I am only planning on using two servo motors.

Final Project: Device Frame

Below is the initial doodle I drew while at work and envisioning the structural construction of the device.










After the discussing the idea with parents and friends I believe that it may increase stability of the Rita Shaker if add guide grooves that would direct the motion of the arms. This will hopefully restrict any possible wobbling.

Tomorrow I plan on visiting home depot to find parts for the construction of the base, the arms, the guide grooves, and the holder for the shaker.

With regard to the actual shaker, I am going to use one of the two types that we currently use at Chili’s.












I’m leaning towards using the one on the left because it is made of plastic instead of glass. Not only would this decrease the fragility, but also the overall weight the servo motors would be required to move. The heaviness of materials will also heavily factor into my choice of materials for the frame.

Final Project: Electronic Supplies Ordered

The following are the list of of supplies that I have ordered to build the electronic portion of the device.

Arduino Rev 3 Starter Kit : The Arduino Uno Board was already supplied in lab but I am required to purchase one for another class I am currently taking so I decided to buy this kit so I also have the bread board, holder, and wires for use in this project.

Futaba S3003 Servo Standard (2): After investigating several different models of servo motors I settled on this one based on reviews and torque provided.

Microtivity Push-and-Lock Button Switch: I am purchasing with the desire for an on/off switch in mind but also with further development for different shaking intervals.

Wall Adapter Power Supply 9VDC 650 mA: I thought about using a battery adapter but decided on the wall adapter because of not wanting to purchase large quantities of batteries if this proves to be of practical use for my job.

Arduino Motor Shield R3 (Data Sheet): I am planning on trying to wire the device without this shield first. If I am unsuccessful I want to have the shield on hand.

I am still not sure if I am going to need an additional power supply for the servo motors or if I am going to be able to simply draw the power from the board.

Final Project: Plan of Attack

The plan for completing the project is as follows:

Sunday 4/22
Finalize List of Electronic Components and order them. (Accomplished)

Visit home depot to find hardware for contraptions body

Monday 4/23
Investigate possible code for programming device.

Wednesday 4/25
Electronic parts should arrive.
Begin testing with code.

Friday 4/27
Assemble frame and connect to arduino. Take video of this for benchfly.

Saturday 4/29
Run tests so I have time to tinker if it fails to work as desired. Work on instructible entry.

Sunday 4/30
Refine device if needed and take data for figshare.

Following week

Refine the code and make adjustments to the physical aspects of the device. Also, I hope to improve the aesthetics of the device.