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
• Arduino programmable
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.
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.
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.
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) .
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.
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 jumpers allows to switch the general supply (ON) or line sensors (LN).
The footprint for buzzers allows to mount different 10/12mm models (for example, TDK PS1240 ).
Select the holes that fits with yours.
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.
ATmega Pin Mapping
The wiring diagram with our ATmega is always useful at programing time.
SIGNAL: DIG09 & DIG10
SPEED: DIG05 & DIG06
STEERING: DIG07 & DIG08
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"!
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".
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
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
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
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
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...)
- 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
- 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
Design & PCB
n00b0t 1.21 g024 Gerbers (with logos)