Nodebotsday in Munich

Nodebots combine JavaScript with simple electronics and robots. Building robots should be “simple”, and this is an important reason for exploring JavaScript. This talk by Chris Williams provides a good overview.

Before anything can move, you must be able to communicate with hardware. Libraries for serial communication are essential for this, for example the serialport library by Chris Williams.

Once you can send bytes and bits to hardware, you can think how to build abstractions for components with JavaScript. Libraries such as Johnny-Five provide a nice starting point. Rick Waldron first presented ideas behind Johnny-five at NodeConf 2012. Also, Raquel Valez has presented Vektor a library for kinematics in JavaScript. Raquel discusses the general idea of JavaScript robotics in her talk at LXJS 2013.

Theory is nice, but practice is equally important. And, this is the idea of the Nodebots day. During this day, you can learn about the multi-disciplinary approach that building robots requires. In Munich, we organized a meetup as a joint-event between the Arduino and Robotics enthousiasts meetup.

Andrey who works on the Veterobot and who organizes the Robotics meetup started explaining some concepts on getting started with robots.

Elements of a Nodebot

There are three aspects to building a robot:

1) Electronics

PCB for power and motor control

The heard of a robot can be as simple as an Arduino. However, to program it with JavaScript, boards such as an Intel Edison, Raspberry Pi or Beaglebone are quickly more fun. These boards allow to easily work with a network, and use Node.js libraries to talk with hardware via I2C for example.

During the electronics sessions, we looked at some typical problems of integration. First, Andrey mentioned some thoughts about chosing batteries. Andrey’s favorite batteries are 12V batteries that have enough power to drive larger motors. Next, it might be important to think about a strategy for charging a battery. Andrey showed some simple circuit with a switch to attach a robot to a charger unit.

Since motors, microprocessors and sensor run on different voltages, you must then think about converting voltages from one domain into another. For example, a Raspberry Pi runs on 3.3V, sensors might require 5V and the motors then 12V. To generate these voltages, Andrey designed a small PCB board.

2) Mechanics

If your robot should move, you need to know how to make basic constructions to mount motors and gears. Also, a bit of sketching and CAD support for sending a blueprint to a 3D printer is nice
Attaching Motors

3) Software

A large part of what makes robots tick is software. With software, you can control processes and react to inputs from sensors. Last, you can transform a plan of actions again into motions of motors and wheels.

Andrey released the code for running his robot here:

Working with sensors

When building a robot, sensing the environment is important too. For example, you can use the SFR-10 ultrasonic distance sensors to detect obstacles in a path. To illustrate some ideas of working with data from sensors, we mainly looked at a setup with an Intel Edison and the I2C Learning shield.

With this setup, we could monitor the temperature inside the fridge. Especially, the wireless aspects of the Edison were fun, and more meetups will be led in that directions. For example, multiple serial ports can be used to receive and send instructions via bluetooth to a robot. We did not yet follow that route, but might in the future.

Edison on Radler

JavaScript is certainly an interesting approach to programming hardware. In Bavaria, there is no Nodebot meetup so far. But there is one across the border in Switzerland. Maybe you want to present or explore robots with JavaScript in Munich too?

Next meetup

We are planning the next Arduino Meetup at 21st of October about “Advanced Arduino” boards.