Tag: arduino

light follower robot wheeler

Light follower

1 July 2016

Light follower is one of the most popular robot design for beginners. It the detects the amount of ambient light by using two light sensors – photoresistors. Depending on the relation of readings between left and right sensor robot can control rotation of it`s motors to turn itself towards direction of the light source.

Drawing robot arduino lasercut

Painter robot

Po dodaniu do robota pojazdu uchwytu na pisak zamienia się w robota malującego, którego programować możemy tak, aby tworzył różnego rodzaju geometryczne sekwencje.

Nasz robot wykonuje prostą sekwencję ruchów np: RUCH DO PRZODU, SKRĘT, RUCH DO TYŁU. Ponieważ jednak wykonują ją w PĘTLI powtarzając te ruchy wielokrotnie może rysować na kartce (zaopatrz się w duży arkusz papieru!) ciekawe geometryczne wzory podobne do FRAKTALI.

Poniżej znajduje się przykład oprogramowania robota malującego.
Zwróć uwagę na instrukcje znajdujące się w pętli LOOP. Wykorzystujemy tam cztery podstawowe funkcje określające ruch robota: PRZÓD, TYŁ, LEWO, PRAWO. Dodatkowo w nawiasie jako parametr funkcji wpisujemy czas przez jaki robot ma ją wykonywać, czyli np. LEWO(500) oznacza, że robot będzie skręcał w lewo przez 500 milisekund (czyli pół sekundy).

Poeksperymentuj z własnymi sekwencjami ruchów zmieniając paramtery czasu i dopisując kolejne etapy ruchu.

LOFI Control – iOS and Android app

29 June 2016

LOFI CONTROL lets you control an Arduino robot with an iOS device (iPhone or iPad) over Bluetooth LE (Bluetooth 4.0) module such as HM-10 or HM-11.

The app was designed to work with LOFI Brain controller and is compatible with almost any Arduino board.

Download the app:

LOFI Control Available on the App StoreLofi Control get it on google play

1. Connect your Arduino with bluetooth module and upload LOFI CONTROLLER sketch to Arduino.
2. Turn on bluetooth on your iPhone/iPad, start the app and connect to Arduino by clicking the bluetooth button in upper right corner of the screen.

Arduino code

The code below is for Arduino Leonardo compatible board (Arduino Micro, Sparkfun PRO Micro etc.) tha use Atmega32U4 chips. Leonardo boards have two serial ports Serial – simulated by USB and Serial1 – connected to TX/RX pins which are then connected to bluetooth module thus communication between Arduino -> bluetooth module -> LOFI Control app is on port Serial1.

To make the code compatible with Arduino UNO and familiar boards – switch Serial1 to Serial

Compatible devices

– iPhone 4S and newer
– iPad 3 and newer
– iOS 8 and up
– Android 4.3 and up on devices capable of using bluetooth LE

AUTHORS:
Programming and design – MACIEJ WOJNICKI

LOFI Brain

15 June 2016

LOFI Brain is the main controller of robots built with EDUBOX kit. It is not called that way without purpose. If we compare a robot to a living organism (some animal for example) a controller in a robot does exactly the same job as a BRAIN in any living body.

What are controller main functions:

– reading signals from SENSORS (robot`s senses)
– controlling ACTUATORS – motors, leds, buzzer, or any other instruments that let your robot ACT
– communicating with computer (or mobile device) – talking to a BIGGER computer/brain
– executing programs

Technically speaking our LOFI Brain board is a so called adapter to an Arduino-compatible microcontroller. Arduino does all the computing while the adapter board makes connecting power, sensors and actuators simple by using one universal JST connector. You can easily power up your robot from anything USB (computer, smartphone charger or powerbank) and connect DC motors, servos, bluetooth and some other modules on the fly to build your first robot in minutes.

LOFI Brain - opis

LOFI BRAIN main elements:

  • 1. PRO MICRO module – Arduino Leonardo compatible
  • 2. Four INPUT connectors – four white connectors on the left side of the board for reading sensor data provided by LOFI modules (light sensor, button, potentiometer)
  • 3. Four OUTPUT sensors – four white connectors with analogue output to control actuators such as LED, voltage meter or servo motors, they can also drive the DC motors but only in one direction and with very little load
  • 4. Buzzer – little built-in speaker that lets your robot give simple squeaky sound signals
  • 5. BLUETOOTH connector – compatible with the most popular bluetooth 2.0 (HC-05, HC-06) and blueotooth 4.0 (HM-10) modules
  • 6. HC-SR04 distance sensor connector
  • 7. L293D motor driver – built-in DC motor driver lets you turn motors and change their directions
  • 8. DC motors connectors – two black connectors labeled M1 i M2 for powering up DC motors
  • 9. ON/OFF switch – works when the board is powered by built in micro-USB connector (not the one on the Arduino Pro Micro module)

Power

LOFI Brain is powered via micro-UCB port with a powerbank or any other USB power source (computer, mobile device charger).

LOFI Brain - zasilanie

If the board is connected to computer by PRO MICRO (Arduino) USB port, connecting additional power to LOFI Brain USB port is not necessary, ON/OFF switch will not work then (robot will be always ON)

If the robot works autonomously powered only with powerbank connect it to the LOFI Brain USB port (not the PRO MICRO one)

Connecting modules

All LOFI Brain electronic modules (light sensor, button, potentiometer, led) are being connected to the controller with a 3-wire cable with an universal JST connector.

Modules are divided into two basic categories:
SENSORS – light, button, potentiometer
Actuators – led, voltage meter, DC motor, servo motor

SENSORS are being conected to INPUT 1-4 while ACTUATORS are being connected to OUTPUT 1-4 except of DC motors which are being connected to M1 and M2 sockets

WARNING! – while plugging JST connector to INPUT/OUTPUT socket pay attention to putting it in right direction – JST plug has three metal blades on one side – plug them facing the plastic bolt of the socket

LOFI Brain - podłączanie modułów

BLUETOOTH module connection

LOFI Brain is compatible with the most popular bluetooth modules widely used in Arduino community – bluetooth 2.0 (HC-05, HC-06) and bluetooth 4.0 (HM-10)

Connecting Bluetooth module:
LOFI Brain - instalacja modułu bluetooth
WARNING – pay attention to plugging the bluetooth module in the right direction otherwise it might get damaged

Compatibility:
– bluetooth 2.0 – Android 2.3 and up, App Inventor, most desktop and laptop comuters, easy to use serial interface
– bluetooth 4.0 – iPhone 4s and up, iPad 3 and up, Android 4.3 and up, little compatibility with desktop and laptop computers

Work modes

LOFI Brain controller can work in two main modes:

1. Controlled by host (desktop or mobile) – eg. when working with Scratch – main program is executed on the host computer and only specific instructions are passed to the Arduino microcontroller which acts as a puppet on the strings.

2. Autonomuous mode – main program is uploaded to the Arduino and executed “on the robot” without any dependency to external hardware like in the example with obstacle avoiding robot. In that mode robot can still comunicate with wither devices (for example can be controlled via bluetooth with a mobile device)

light follower robot wheeler

Light follower

Light following robot

Robot ŚWIATŁOLUB to jedna z wariacji na temat jeżdżącego pojazdu zbudowanego z zestawu EDUBOX. Na jego podstawie przetestować możemy sterowanie robotem przy pomocy czujników światła. Sam wygląd robota jest oczywiście niezależny od sposobu sterowania więc jeśli chcesz możesz tę konstrukcję wykorzystać do innych celów.

Parts list

  • LOFI Brain controller
  • Powerbank
  • Two DC geared motors DC with wheels/propellers
  • Set of wooden parts
  • Two light sensors – photoresistors

Instrukcja montażu

1. Silniki DC włóż w klocki uchwytów (po trzy na każdy silnik) – NIE skręcaj ich na razie śrubkami.
kolarz1

2. Do łącznika o długości siedmiu otworów przykręć od góry łączniki w kształcie trójkąta.
Robot KOLARZ ŚWIATŁOLUB

3. Do trójkątnych łączników przykręć jedną ze ścianek korpusu pojazdu.
Robot KOLARZ ŚWIATŁOLUB

4. Zamontuj kółko obrotowe na przeznaczonej do tego ściance, dolne śrubki przykręć z dystansującymi podkładkami tak aby obrót kółka był zablokowany i było ono skierowane w dół. Z drugiej strony ścianki przykręć dwustronny łącznik o długości siedmiu otworów.
Robot KOLARZ ŚWIATŁOLUB

5.Skręcone ścianki połącz z silnikami DC skręcając obustronnie przy pomocy dłuższych śrubek.
Robot KOLARZ ŚWIATŁOLUB

6. Od góry do uchwytów silników DC przykręć boczne ścianki korpusu pojazdu.
Robot KOLARZ ŚWIATŁOLUB

7. W otworach bocznych ścianek korpusu pojazdu umieść powerbank. Sterownik LOFI Brain zamocuj na ściance połączonej z trójkątnymi łącznikami. Zwróć uwagę aby kabelek USB powerbanku sięgał do gniazda zasilania na sterowniku.
Robot KOLARZ ŚWIATŁOLUB

8. Na frontowej ściance korpusu pojazdu zamontuj twarz robota – nos złożony z trójkątnego łącznika i oczy w postaci czujników światła.
Robot KOLARZ ŚWIATŁOLUB

9. Zamontuj twarz robota na krawędzi ścianki ze sterownikiem.
Robot KOLARZ ŚWIATŁOLUB

10. Zmontuj koła robota (identycznie jak śmigło wiatraka)
Robot KOLARZ ŚWIATŁOLUB

11. Zamontuj koła na trzpieniach silników (pamiętaj po podkładce na śrubce). Konstrukcja robota jest gotowa!
Robot KOLARZ ŚWIATŁOLUB

PODŁĄCZENIE CZĘŚCI ELEKTRONICZNYCH

1. Silniki podłącz do gniazd M1 i M2 sterownika LOFI BRAIN
2. Czujniki światła podłącz do złącz INPUT1 i INPUT2

Co dalej?

1. Wgraj na sterownik program robota światłoluba