Week 17: Mechanical and Machine Design

#Node.js #Johnny-five #Stepper Motor #Arduino #Machine Building

Assignments: (Group) 1. Actuate and automate your machine. 2. Document the group project. (Individual) 3. Document your individual contribution.

Published on: Sep 28, 2020
Last updated on: Jan 12, 2021

View Source Files

Group Assignment: Document the group machine project

Individual Contribution: Control Software/Web Interface and Serial Bridge


# Name Description
1 Application Repository Used as a web interface for controlling the machine through the serial port.
2 Stepper Driver (TMC2208 SilentStepStick or Pololu A4988) * 1 Used for easily controling a stepper motor.
2 Arduino UNO * 1 The main controller for the machine.
3 Stepper Driver (TMC2208 SilentStepStick or Pololu A4988) * 1 Used for controlling one stepper motor.
4 Stepper Motor (Bipolar, or 4-wire) * 1 Used for rotating the circular plate.
5 8-35V Power Adapter/Supply Used for providing external power source with larger current to the stepper driver.
6 5.5mm Barrel Power Jack Used for connecting to the power adapter.
7 Optional: DIY Stepper Shield Used for integrating 4 stpper drivers at maximum.

Pin Connection (e.g., A4988)



Control Panel


  • Stepper

    • RPM Speed: sets the RPM speed of the motor (ideal range: 50-3000 rpm, depending on the motor specification/datasheet)
    • Direction: sets the motor to move clockwise or counterclockwise
  • LED

    • Pulse Delay(ms): sets the blinkg speed of the LED
  • Monitor: shows the respond after the user clicks a button or types a number


How to design a web server with Node.js

Learn more from Week 14: Interface and Application Programming


  1. Install Node.js
  2. Add and upload AdvancedFirmata to Arduino (installation)
  3. Open the terminal and run the below commands in order

    git clone https://github.com/cv47522/nodejs-j5-arduino-stepper.git
    cd path/to/repository
    npm i  # install the required node modules automatically
    node webServer.js  # start the server
  4. Type http://localhost:3000 in a browser to go to the client-side control panel
Creative Commons License
© Copyright 2020 | Created by Wan-Ting Hsieh | All Rights Reserved