Skip to content

Crude johhny-five programs designed to work with custom built quad-spider bots.

Notifications You must be signed in to change notification settings

aallbrig/test-johnny-five

Repository files navigation

Test Programs for Custom Quad-Spider Bot using Node + Johnny-Five

Located in this repo are a series of hastily thrown together programs to test functionality attached to a custom-made quad-spider bot.

Setup

Automated:

  1. Run sh run.sh and follow prompts to provision dev machine.
  2. Run node test-servos.js or node test-servos-with-animation-lib.js or node walk-cycle.js.

(Installer only works on OSX for now)

Manual:

  1. Install CH340 drivers onto your machine (OSX link).
  2. Run npm install to install dependencies.
  3. Hook up Arduino-bot to your computer via USB.
  4. Run node test-servos.js or node test-servos-with-animation-lib.js or

Running programs

  • When running node test-dancing-with-J5-lib.js, you can pass in configurable values like so:

    // Trying to sync up robot with 160 BPM song
    BPM = 1000 / (160 / 60);
    bot.dance(danceMoves, BPM);
    

    You can calculate beats per minute manually using this website to tap a button every beat. It's very easy to use!

Robot Specs && Robot Buy Guide

Some things every robot needs (like servos for legs), some things can be shared between robots (e.g. LiPo battery charger, or voltage checker).

Each robot costs $70 to buy all parts, though again you can share parts when building > 1 bots.

  • 3D printed quad "spider" frame from thingiverse

    Print instructions: scale everything up to 102%, as that seems to reduce frame breakage over time.

  • Superglue

    Super glue ($4-$8)

  • 8 servos, 4 attached to the body and 4 to serve as joint mechanisms.

    I recommend SG90 Micro Servos ($20 for 10). They come with little screws, which will be used to attach servos to 3D printed frame.

  • Microcontroller supported by Johnny-Five library

    I recommend Arduino Nano x5 set ($20-$25 for 5) however check Johnny-Five Platform Support if you'd like to deviate!

  • Extended USB Cable

    I recommend 6ft USB to Mini B cable ($6)

  • Breadboard

    I recommend 10 x 400 tie Breadboard ($15 for 10)

  • Wires of various sizes

    Each servo requires 3 wires (ground wire, 5V power wire, logic wire), and you'll want other wires to make the circuit look nicer. Arduino requires 7V-12V power in (can be connected directly to 2C LiPo battery)

    I recommend Hook-Up Wire Kit ($20) for advanced "cut my OWN wires!" types.

  • 7.4V LiPo Battery

    I recommend 1000mAh 2S 20C Lipo ($15)

  • LiPo Battery Voltage Detector

    I recommend Monitor Voltage Detector with Loud Beeping Sound ($5-$6)

  • LiPo Battery Charger

    I recommend 2s-3s 7.4v 11.1v Lipo Battery Balancer Charger ($10)

  • Voltage Regulator components

    These are used to reduce the voltage from a 2 cell LiPo battery to a nice, cool 5V that the micro servos expect.

    I recommend L7805CV Voltage Regulator ($5-$7 for 5). It takes in 7V-25V and outputs 5V!

  • (optional) 7V-12V in 3.3V out converter(s)

  • (optional) 3.3V or 5V sensors

    If you get a 3.3V sensor, you need a 3.3V voltage regulator!

  • Driver to interact with Arduino of choice

    I built the serious of robots after Arduino Nano, which require CH340 drivers (included in this repo). If you choose another microcontroller platform, please research drivers and install them to your machine.

  • Knowledge of specs to put together bot

    TODO: Create circuit graph of robot

  • Flash Arduino to work with node + Johnny-Five library

  • Create program, do things!

About

Crude johhny-five programs designed to work with custom built quad-spider bots.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published