Namaste!

Welcome to a blog about things in my life, observations about the world, and just silly stuff. Enjoy!

Sunday, February 24, 2013

Robotic Compound Pendulum

Project Description
As part of my graduate course and overall learning experience, I decided to build a robotic compound pendulum.  There are numerous projects and videos available on the web for inverted pendula, self balancing pendula, etc. but I have not come across any robotic compound pendula.  The motion of a compound pendulum has been likened to the motion of your leg while swinging when you walk (a.k.a. swing phase of gait).  For an introduction to gait and the gait cycle, check out my Lego video: https://www.youtube.com/watch?v=-opbwBSOonw

Since my dissertation is examining the swing period of gait, I thought it would be cool to build a robotic compound pendulum that could mimic various gait patterns, be tested in our motion capture lab, and compared with actual human gait data and the theoretical Matlab model I am writing.  The initial gait patterns I'd like to mimic are normal, lower limb amputee (above knee), and stiff knee gaits.

Here are some SolidWorks model views of the robotic compound pendulum; where the red linkage simulates transverse pelvic motion, the blue linkage simulates sagittal thigh motion, and the green linkage simulates sagittal shank motion.





The following series of posts will provide instructions and explanations of how I built a robotic compound pendulum.  There were several goals for this project:
   1. Create a pendulum that mimics various clinically seen gait patterns.
   2. Create a pendulum that can be used as a teaching tool for dynamics, gait, and robotics.
   3. Share my experience with others and offer instructions on how to build such a robot.
   4. And lastly, make a robot that meets the requirements of my graduate robotics class 'grad project'.

Below is a list of the parts I have purchased for the robot and links to various websites and resources.  Each component or system will be described in more detail in future posts.

Processor
I decided to use an Arduino Mega 2560 as the processor for the robot.  As a bonus it is supposed to interface easily with Matlab (http://www.mathworks.com/academia/arduino-software/).  The programming environment for Arduino sketches (a.k.a. functions, programs) are compatible with a Mac and the software development kit is free (http://arduino.cc/en/main/software).

Arduino Mega 2560
Motors
I decided to use three (pelvis, hip joint, knee joint) stepper motors to actuate the linkages because the position and torque production of each motor is important for this project. I purchased three (ankle can be added at a future time) stepper motors from SparkFun (https://www.sparkfun.com/products/9238).
Stepper Motor (200rpm)
Also, I purchased the motor controller from SparkFun (https://www.sparkfun.com/products/10507) because it can drive up to four stepper motors at a time.  Eventually, I'd like to add a motor for the ankle joint.  So when I do add this fourth motor, I won't have to buy another motor controller but simply have to solder the motor and Arduino connections.
Quad-Stepper Motor Controller

Sensors
As a proof of concept for future projects, I decided to sense the position of robot's linkages with accelerometers and gyroscopes.  Unfortunately, purchasing 3 inertial measurement units (IMU) was not in my budget for this project but I should be able to achieve similar results with accelerometers, gyroscopes, and a Kalman filter... since those are the components of an IMU!  I purchased three accelerometers and 3 gyroscopes from Adafruit Industries (https://www.adafruit.com/); which has outstanding tutorials and cool projects for all levels.  Sparkfun also has various accelerometers, gyros, and IMUs that would work equally as well.  The pages for each of the sensors from Adafruit has soldering, connections to the Arduino, and Arduino sketches and libraries for each sensor so you can get up and running quickly.

Here's the accelerometer (https://www.adafruit.com/products/1231)
ADXL345 - Triple-Axis Accelerometer (+-2g/4g/8g/16g) w/ I2C/SPI - Click Image to Close
ADXL345 Triple Axis Accelerometer
And here's the gyroscope (https://www.adafruit.com/products/1032)
L3GD20 (L3G4200 Upgrade) Triple-Axis Gyro Breakout Board - Click Image to Close
L3GD20 Triple Axis Gyroscope
I'll add posts to explain the software and hardware as I integrate these components together.
 

Mmmm.... humus!

I do love chickpeas, but this post is not about yummy hummus... instead it is about "humus" also known as black gold or compost.  After a considerable amount of research on the types of containers, ways to compost, the ins/outs of compost, and types of composting (i.e. vermicompost - with worms) I finally selected a bin and have started my pile of rot!  I thought I'd share my rotting adventures, what works, what doesn't work, etc.

Living Colorado ruled out vermicomposting for me, since they have a narrow temperature range (40-70deg) and according to many sites require garage storage in the cooler months... that is if you don't want to buy new ones each year.  Too much work and I don't feel like sharing my pain cave with worms.  I also considered a tumbler vs a bin... and after reading the pros/cons of each felt that a bin was ideal for my busy schedule.  I only have to turn or aerate the bin occasionally compared to a tumbler.  Also after speaking with several friends who have piles, those with bins seem to have greater success than those with tumblers.  So bin it is.



Getting Started
After assembling the bin (very easy), I lined it with about 2 inches of a high carbon material (i.e. straw, twigs, leaves, hay, peat)... I chose peat because I had a gargantuan bag of it already.   I also noticed that most readily available straw is wheat and since I have celiac disease decided not to risk exposure (no matter how minimal it might be).  I couldn't find any info about whether or not gluten gets broken down in the composting process... I'd be interested if anyone knows (that is assuming anyone reads this blog!).  Then I added about 2 more inches of organic mushroom compost on top of the peat.  Next I put my kitchen scraps in (currently being stored in an old protein powder container) and covered them with the mushroom compost.  We'll see how it goes.

After School Special
Here are some tips for composting that I compiled during my research.  Compost consists of four main elements (or compounds):

      Carbon (C): is the energy source for microbes that decomposes the items in the pile
             - materials high in carbon are referred to as "brown" materials
             - C materials help dry out your pile if its too wet/moist
             - C materials also reduce odors
             - microbial oxidation of C produces heat, which aids in the process

     Nitrogen (N): provides the microbes their dietary protein
             - materials high in N are referred to as "green" materials
             - N materials help add moisture to your pile if its too dry

      Oxygen (O): aids in the decomposition process and is required for oxidation of C
             - turning or aerating your pile helps keep the decomp process aerobic

      Water (H2O): pretty self explanatory... everything organic needs water


If you read about an item's C:N number, this is the ratio of Carbon to Nitrogen content in that item.  For example, pine needles have a C:N of about 60-110 which means that there are ~60-110 parts of Carbon to every one part of Nitrogen.  Vegetable matter has a C:N of ~15-25, so you guessed it... there is a higher Nitrogen content in veggies than pine needles.

Here is a brief list of the items that are acceptable to put in your compost bin (mostly, limited to what I will be adding).

   Green In-Crowd (high in N):
              - Kitchen waste: fruits, vegetable matter
              - Egg shells (crushed)
              - Tea bags (without string, tag, staple)
              - Coffee grounds

   Brown In-Crowd (high in C):
              - Peat moss (Canadian only)
              - Leaves
              - Pine needles
              - Twigs

Since I don't have a yard, I will not be adding (dry) grass clippings but they would go in the brown in-crowd.  Some sites also say it is ok to add newspaper... but when considering that the chemicals from the ink, printing process, etc would be broken down, absorbed by my garden plants, and therefore added to my food source, I decided no thanks!

And here is a short list of the items you don't want in your pile:
   Rotting No-No's:
              - Animal products (this is not a vegan thing) meat, fats, bone, fish, dairy
              - Cooking oil
              - Wet grass
              - Pet waste

That about covers day 1 of composting for me.  Rot on fellow composters!