Intro

 

 

n00b0t is a small robot  created for electronic design experimentation and self-study. Intended  to serve as a linefollower  and maze solver platform, for experimentation and testing.

 

Its main features are:

 

• small size (<= 10cm ø)

• all components are mounted on a single PCB

• uses only through-hole components for easy assembly

• uses standard AAA batteries

• compatible with 12mm Sanyo 12GN NAXX type micromotors.(Pololu, Solarbotics, etc)

Arduino programmable

 

 

ll

This is an Open Source Hardware project OSHW (Open Source Hardware),  so  anyone can use or modify it under license CC-BY-SA 3.0.

 

 

 

Components

 

 

  l

 

 

 

 

ATmega

 

n00b0t's brain is an ATmega168/328 with Arduino bootloader loaded.

 

The G / R / T (GND, RX, TX) connector allows to programm it directly from an Arduino. The 5V connection it's not included  to avoid problems in case of dual power, so n00b0t should operate with its own battery.

 

As we do not use the RESET connection,  note that you will need to press the RESET button on the Arduino board at the time of loading / compilation.

 

Ref: Uploading Using an Arduino Board.

 

 

 

Batteries

 

n00b0t is designed to operate with 4 AAA batteries (preferably NiMH). The board ican fit one Keystone 2481 battery holder  (4xAAA) or two 2461 (2xAAA). In any case, there is also a spare connector B + - to allow other holders or battery packs.

 

The analog pin 0 is connected to a voltage divider (VD2) for battery charge control.

 

 

Ref: Voltage Dividers and Arduino

 

 

 

 

 

StepUp Regulator

 

In order to provide constant power for the motors (as already seen in other robots) n00b0t includes a switching regulator StepUp circuit. The  MC34063A  boost the voltage to 7V (defined by the voltage divider VD1) to feed the motors. (The inductor L1 must be equal to or greater than 20 uH (for example, a Coilcraft DR0608-563L of 56 uH).

 

We can modify the circuit to work with different input or output voltages, simply adjusting  the value of  its components. We can easily do it  thanks to this excellent tool.

 

Ref: Application of the MC34063 Switching Regulator, Building a DC-DC Power Supply that Works, Let’s Design a DC to DC Switchmode Converter.

 

 

 

 

Low Dropout Regulator

 

Other elements also need a constant power but at a lower voltage, so n00b0t also includes a 5V Low Drop Out regulator in TO-220 format. For example, a Micrel MIC29XXX or a "more classic"  LM2937. It is mounted horizontally on the bottom, and if it matches the screw of the battery holder (case of the Keystone 2461) the tab can be screwed.

 

The circuit is completed with an LC filter, a protection diode and a LED (LD4) .

 

 

 

 

Sensors

 

n00b0t can mount a total of 7 CNY70 sensors.

 

 

 

 

The five central sensors (CN1/CN5), analog readed (and easily calibrated by software), are used to track the line. The lateral sensors (CN0 and CN6), digital readed (due to the lack of analog inputs), are "filtered" with a 74HC14 and can be used to detect  turn signals/marks.

 

 

 

 

Motors

 

Motor control is performed with an L293D. The control signals are "normalized" (to ensure identical 5V signals) and "duplicated" (to generate two output signals from a single input signal, thereby saving a pair of pins) with the 74HC14.

 

The 12mm Sanyo NAXX 12GN type micromotors (Pololu, Solarbotics, etc.) can be directly mounted on the PCB with Pololu standard brackets, 32mm wheels and a 3/8" ball caster.

 

 

 

 

Jumpers

 

The jumpers allows to switch the general supply (ON) or line sensors (LN).

 

 

Buzzer

 

The footprint for buzzers allows to mount different 10/12mm models (for example,  TDK  PS1240 ).

 

Select the holes that fits with yours.

 

 

 

 

 

 

TSOP

 

n00b0t can also mount a TSOP  IR receiver (Vishay TSOP 4838 or similar). It is especially useful in order to adjust  performance parameters without reprogramming, but can also be used to send control signals.

 

Ref: A Multi-Protocol Infrared Remote Library for the Arduino, Control con mando IR con el TSOP4838.

 

 

Programing

 

 

ATmega Pin Mapping

 

The wiring diagram with our ATmega is always useful at programing time.

 

 

LEDs

 

     LED1: DIG03

     LED2: DIG04

     LED3: DIG13

     LED4: 5V  

 

CNY70

 

     LINE:  ANA01/ANA05

     SIGNAL: DIG09 & DIG10

 

MOTORS

 

     SPEED: DIG05 & DIG06

     STEERING: DIG07 & DIG08

 

OTHERS

 

     TSOP: DIG02

     BUZZER: DIG11

     BUTTON: DIG12

     BATTERY MONITOR: ANA00

 

 

 

 

Light & Sound

 

It's always good to check if LEDs and buzzer run properly.

 

LED4 is directly connected to the 5V regulated circuit, so it tells us that both the LDO and the StepUp circuits are working properly. LEDs 1/3 and  buzzer will allow n00b0t  "talk" with us.

 

This simple sketch will check its status: n00b0t_120_checkSIGNAL_001u.ino

 

Note: Do not forget to connect the jumper "ON"!

 

 

 

Battery

 

From version 1.20, there is a voltage divider for battery charge monitoring.

 

This sketch shows the voltage on the serial monitor and turns on LED3 whenever it is over 4.5V:  n00b0t_120_checkBATT_001u.ino

 

Note: The sample code is ready for a 1:1 voltage divider. If you want  to adapt it to other settings, simply calculate the new "resistorFactor".

 

 

Motors

 

Before n00b0t moves by itself, it is important to check if  the motor control system works as expected. With this simple sketch we can check, and adjust if necessary, the control function "motor" to match the position of our motors: n00b0t_120_checkMOTOR_001u.ino

 

 

TSOP

 

With the receiver TSOP we can send commands to n00b0t. If the motors are ready, why not directly control its movement with a remote control?.

 

We can do it with this sketch: n00b0t_120_checkTSOP_001u.ino

 

Notes:

 

1) This sketch is designed to control four basic movements with a SONY infrared remote control, but easily adaptable to any other manufacturer; simply check the values ​​received in the serial monitor and replace them in your code.

 

2) This sketch is based on the excellent work of Ken Shirriff, and requires to install his library for Arduino IR.

 

3) This sketch is designed use with  Arduino 1.0 ( ("ino" extension). From this version, "WProgram.h" has been renamed to "Arduino.h" so any call from a library should be updated. In our case, a simple way to support the library with any version of Arduino (see "Release Notes" / [internals] ") is adding this code to" IRremoteInt.h":

 

  #if defined(ARDUINO) && ARDUINO >= 100

  #include "Arduino.h"

  #else

  #include "WProgram.h"

  #endif

 

 

PD Algorithm

 

There are many ways to program a line follower, but  it seems that  the Derivative Proportional Algorithm offers the best balance between simplicity and performance. Here is an example ready for n00b0t (which includes a sensor calibration phase): n00b0t_120_lineaPD_001u.ino

 

Notes:

 

1) We must remember to update the "motor" function with the adjustments we made previously.

 

2) Do not forget to connect the jumper "LN"!

 

3) You can activate the control variables in the serial monitor to adjust settings (please remove before n00b0t's wheels...)

 

 

 

Versions

 

 

1.20

l

 

 

- Added voltage divider (R10/R11) connected to A0

- Added TSOP connected to D2

- Included two new LEDS connected to D3 and D4 (while maintaining the connection pins)

- Added of 5V & GND pins

 

 

1.10

 

l

 

 

- Added an external battery connector

- ON and LN jumpers relocated

- New buzzer package (supporting multiple models) and slightly relocated

- CNY70  turned 90º

- General components renaming

- Ground plates Isolate grown to 12 mil

- Isolated holes in ground planes in contact positions with nut / screws

 

 

1.00

 

 

l

 

 

 

 

 

 

 

Site Map

 

Intro

 

Components

    ATmega

    Batteries

    StepUp

    Low Drop Out

    Sensors

    Motors

    Jumpers

    Buzzer

    TSOP

 

Programing

    Light and Sound

    Battery

    Motors

    TSOP

    PD Algorithm

 

Versions

    1.20

    1.10

    1.00

 

 

Images