15. Mechanical design

This week I will:

  • Design a machine (mechanism + actuation + automation), including the end effector, build the passive parts and operate it manually (group project)

Results

  • Discovery: Had a group meeting on April 20, 2019. I was comfortable with making the hello world boards, so I offered to take on this task as well as programming the board.

  • New Call List

  • Post-It Notes

  • Exploring:

-XY plotter on April 21, 2019 to refresh my understanding of the machine concepts it contained. C:\Users\jim555\Makeblock\GRemoteFull\GCodeParser_Makeblock Orion. Used GRemote.bat to load G-Code to XY Plotter.

  • XYPlotterBox

  • Board

  • Controller

  • GCode

  • Cat

  • Fish

  • Video
  • Music to play in the machine “Ah! vous dirai-je, maman”, Alphabet Song and Twinkle, Twinkle, Little Star have the same music. Only 6 notes.

  • Music

  • Piano

  • Arduino Sound Board

  • Video
/*
  Melody

  Plays a melody

  circuit:
  - 8 ohm speaker on digital pin 8

  created 21 Jan 2010
  modified 30 Aug 2011
  by Tom Igoe
  modified 1 May 2019
  by Jim Hart


  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/Tone
*/

#include "pitches.h"

// notes in the melody to play the alphabet song:
int melody[] = {
  NOTE_C5, NOTE_C5, NOTE_G5, NOTE_G5, NOTE_A5, NOTE_A5, NOTE_G5, 0,
  NOTE_F5, NOTE_F5, NOTE_E5, NOTE_E5, NOTE_D5, NOTE_D5, NOTE_D5, NOTE_D5, NOTE_C5, 0,
  NOTE_G5, NOTE_G5, NOTE_F5, 0, NOTE_E5, NOTE_E5, NOTE_D5, 0,
  NOTE_G5, NOTE_G5, 0, NOTE_F5, 0, NOTE_E5, NOTE_E5, NOTE_D5, 0,
  NOTE_C5, NOTE_C5, NOTE_G5, NOTE_G5, NOTE_A5, NOTE_A5, NOTE_G5, 0,
  NOTE_F5, NOTE_F5, NOTE_E5, NOTE_E5, NOTE_D5, NOTE_D5, NOTE_C5, 0

};

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
  4, 4, 4, 4, 4, 4, 4, 4,
  4, 4, 4, 4, 8, 8, 8, 8, 4, 4,
  4, 4, 4, 4, 4, 4, 4, 4,
  8, 8, 4, 4, 4, 4, 4, 4, 4,
  4, 4, 4, 4, 4, 4, 4, 4,
  4, 4, 4, 4, 4, 4, 4, 4
};

void setup()
{
  // iterate over the notes of the melody. Added sizeof() to compensate for melody changes:
  // https://www.arduino.cc/reference/en/language/variables/utilities/sizeof/
  for (int thisNote = 0; thisNote < (sizeof(melody)/sizeof(melody[0])); thisNote++)
  {

    // to calculate the note duration, take one second divided by the note type.
    //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
    int noteDuration = 1000 / noteDurations[thisNote];
    tone(8, melody[thisNote], noteDuration);

    // to distinguish the notes, set a minimum time between them.
    // the note's duration + 30% seems to work well:
    int pauseBetweenNotes = noteDuration * 1.30;
    delay(pauseBetweenNotes);
  }
    // stop the tone playing:
    noTone(8);

  }

void loop() {
  // no need to repeat the melody.
}
  • Servo operated by Arduino using a potentiometer on April 30, 2019

  • Video