LOFI Brain board is an adapter shield for Arduino UNO compatible boards. All of the computing is done by the Arduino board while the adapter simplifies connecting elecronic modules, motors and power.
Assembling the protection shield
Before you start to work with the LOFI Brain it is important to mount protection shield on top of it. The shield lets you attach the controller to robot constructions and protects electronic modules sockets.
Prepare parts of the shield.
1. The shield has to be placed on top of the LOFI Brain board with a support of two distance elements. Connect everything together with four 12mm screws.
2. Insert LOFI Brain shield into sockets of The Arduino UNO compatible controller.
Connecting to computer
LOFI Brain 2.0 controller is connected to computer with a regular USB type AB cable (old-school printer USB cable)
Micro USB port on the LOFI Brain port has only charging capabilities. You CANNOT connect Arduino to the computer and transmit data, with the micro USB only electric power will be supplied with this port.
Power
If the Arduino compatible controller is connected to the computer with USB communication cable you do not need any additional power supply for simple projects (until you want to power more than two motors).
If you want your robot to operate wirelessly you can supply power to the board from a powerbank via micro USB port or from 4AA batteries cart. You can supply the board with 5 to 9 volts.
Powerbank
Distance sensor
The evergreen HC-SR04 distance sensor has it`s own port on LOFI Brain board. You can connect it with a 4-wire FEMALE-FEMALE cable. PLEASE NOTE – polarisation matters in this case. From the sensor side the cable has to be connected with blue wire attached to GND pin and the red wire connected to Vcc pin.
On the LOFI Brain side connect the cable so the blue wire is closer to the USB socket.
Bluetooth
LOFI Brain board provides a socket to connect the most popular Arduino compatible bluetooth modules such as HC-05, HC-06 and HM-10 for bluetooth 4.0.
When connecting bluetooth module pay attention to the direction of the pins, HC-06 and HM-10 have pins set the opposite way so you have to to plug them in different directions. Proper connection is signalised byt the red led blinking on bluetooth module.
PLEASE NOTE – if you connect bluetooth module to Arduino UNO compatible board it interrupts serial communication over USB cable – computer will find the board on serial ports but Arduino IDE will throw errors during script upload also LOFI Robot extension will connect to the board over cable but the board will not receive data from computer.
ADVANCED INFORMATION – for Arduino experienced users
INPUT/OUTPUT
INPUT/OUTPUT sockets are connected with approperiate Arduino pins:
INPUT1 – A0
INPUT2 – A1
INPUT3 – A2
INPUT4 – A3
OUTPUT1 – D10
OUTPUT2 – D9
OUTPUT3 – D6
OUTPUT4 – D5
Each INPUT/OUTPUT socket has three lines (from left)
– signal – (yellow) eg. INPUT1 -> A0
– VCC – (red) connected to 5V
– GND – (brown) connected to common ground
DC motors controller
Two DC motors are driven with H-bridge – L293D type chip, controlled by six Arduino pins
M1 – direction (D2 and D4) and power controlled with PWM (D3)
M2 – direction (D7 and D8) and power controlled with PWM (D5)
To control the motor you have to set two pins that control the directions in opposite values.
For example:
M1 motor rotates clockwise: D2 -> HIGH, D4 -> LOW
M1 motor rotates counter-clockwise: D2 -> LOW, D4 -> HIGH
M1 motor power is controlled independently form the direction by D3 pin
M2 works the same way.
PLEASE NOTE – D5 pin is shared between OUTPUT4 and M2 motor power control, so if you use M2 motor you will not be able to control OUTPUT4, it is a consequence of limited number of PWM capable pins on Arduino UNO
Distance sensor
HC-SR04 distance sensor is connected to pins:
TRIGGER – D12
ECHO – D11
Buzzer
Buzzer is connected to D13 pin – the same as built-in Arduino led
Bluetooth
HC-06 bluetooth module is connected to pins:
TX bluetooth -> RX Arduino
RX bluetooth -> TX Arduino
PLEASE NOTE – if you connect bluetooth module it will block USB cable communication on Arduino UNO