Lesson20. Final Project: Growth Dashboard

by Jiyoung An


From my three ideas on my final project, I decided to go for the last one, Growth Dashboard. I'll work you through the process.

Final Presentation

Motivation & Idea

I would define 'human growth' as an amount of time put together, towards a goal one has set. Let's imagine your goal is one tree. You will need to water them every day to grow them. My application will aid this human-growing process by giving an immediate and persistent feedback on how tall one's tree has grown, how big you have grown.

With GrowthTree
  • Keep track of your personal growth
  • - Every time after you work for your own goal, you can 'water' the tree using Desktop application.

  • Keep motivated
  • - As you don't forget about your goal, and you would like to grow it even taller.

Growth Tree comes in three main components
  • Tree made with laser cut MDF panel
  • PCB boards nestled in 3d printed casing
  • Desktop Application to water your tree
Interaction between the components are following
  • Gear mechanism run by a stepper motor and silent step stick driver
  • and Bluetooth channel communicates with your desktop application
Growth Dashboard

Mechanical: Designing of Gear System

First I got intrigued by gear in general, and then I found planetary gear interesting. I spent lot of time studying gear mechanism for and getting it to working as a living organism. Although creating gear itself was pretty easy using Inkscape gear extensions(It is even native), In deciding gear mechanism, making gear design, deciding the total dimension of it was quite tough, because as the number of tooth go up, the size of gear will also increase. and most of the time, the total size was hard to imagine. -so I have needed to study gear reduction with multiple layers and then printed them so grab the idea.
Quoting from Matthias Wandel's site on woodgear making-tutorial which I find really helpful, there are rules(it becomes simple as you keep looking at it) in designing gear system.

studying Gear Movements

gear system calculation
R Number of teeth in ring gear
S Number of teeth in sun (middle) gear
P Number of teeth in planet gears
[1] all teeth have the same pitch/spacing.
[2] Also use this equation to calculate the number of teeth required per gear so everything fits correctly:
R = 2 × P + S

Designing Gear with Fusion360
Designing Shaft with Fusion360
Copying two gears
fusionGearJoint
Inkscape Gear generator is very useful.
Generated gear with Inkscape

Deciding Dimension and adjust size of other parts

Smallest Gear We Can Get
Deciding Upon Gear Layout
Dimension Check with the Motor

Electronics: Controlling of gear with Step Motor

Before making a pcb, I decided to try out control of step motor movement first. I used 'silentstepstick(TMC2100)' driver for this and succeed to get it move, found out some variables to control the movement.

Schematic with Atmega328
Board created
Soldered Board
Programming
Back Side of the PCB

Programming
I reused PCB and program to run stepper motor from week8.
I reused Bluetooth module from week15.
Also, Desktop program that I used is from week16.

Application Programming

                            
  //handle mouse events
void mousePressed() {
  if (toggle)
  {
    myPort.write("0");
    image(LEDoffImage, 0, 0);
  } else
  {
    myPort.write("1");
    image(LEDonImage, 0, 0);
  }

  toggle = !toggle;
                            
                        

when moused pressed send a signal (0 or 1) to Bluetooth and change the image.

Desktop Application

Embedded Programming - Network

                            
//debugging, control
#define LED 9
#define BUTTON 10

//communication
#define TX 1
#define RX 0
SoftwareSerial mySerial(RX,TX);

boolean growthFlag = false; //to set false for initial movement
                            
                        

Variables for Bluetooth

                            
void setup() {
//setting up bluetooth
 mySerial.begin(9600);

  //setting up led & buttion
  pinMode(LED, OUTPUT);
  digitalWrite(ENABLE, LOW); //off
  pinMode(BUTTON, INPUT);
}
                            
                        

Setting up Bluetooth

                            
void loop() {
while(mySerial.available() > 0) {
char receivedChar = mySerial.read();
int intReceivedChar = (int)receivedChar;

if (intReceivedChar == 48)
{
digitalWrite(LED, LOW);
growthFlag = false;
}

if (intReceivedChar == 49)
{
digitalWrite(LED, HIGH);
growthFlag = true;
}
}

                            
                        

Processing incoming chars


Embedded Programming - Stepper Motor

                            
const int stepsPerRevolution = 60;
unsigned long time;
int stepCount = 0; //; number of steps the motor has taken

int Speed = 10; //control how fast to 'step' the motor, 18 for roughly one minute per rotation
int NumSteps = 200; //angle 1.8degree
int MicroSteps =16; //microstep where stepperdriver set to - can be 1, 2,  4, 8, 16
int FullRotation = NumSteps * MicroSteps;

int Distance = 10; // how far we've carried
                            
                        

Variables for Stepper Motor

                            
void setup() {
  // CFG pins floating
  pinMode(CFG1, INPUT);
  pinMode(CFG2, INPUT);
  pinMode(CFG3, INPUT);

  pinMode(ENABLE, OUTPUT);
  digitalWrite(ENABLE, LOW); //off -active
  pinMode(DIR, OUTPUT);
  digitalWrite(DIR, LOW);
  pinMode(STEP, OUTPUT);
  digitalWrite(STEP, LOW);

  //peset
   digitalWrite(DIR, LOW); //LOW or HIGH
   digitalWrite(LED, LOW);

                            
                        

Setting up Silent step stick

                            
void loop() {

  digitalWrite(ENABLE, LOW); //actie

   if(growthFlag == true){
    digitalWrite(STEP, HIGH);
    delayMicroseconds(Speed);
    digitalWrite(STEP, LOW);
    delay(Speed);
    Distance = Distance +1; //record this step
          digitalWrite(LED, HIGH);
      }else{
              digitalWrite(LED, LOW);
      }

     Distance = 0; //reset Distance count
     growthFlag = false; //reset rotation flag
  }
                            
                        

When flag is set to true, it runs full rotation

Growing Tree

Putting Things Together

Gear Assembly
Sliding Panel
Assemble Gears on the Front Side
Attach Motor on the Back Side
Put PCB into casings
Growth Tree In Action
Here you can download file(s) that I created for this assignment: