NeuLog Sense Autonomous User manual

Sense
Autonomous


Sense
Autonomous
2_28
© All rights reserved.
The material in this book may not be copied, duplicated, printed, translated,
re-edited or broadcast without prior agreement in writing.
For further information contact info@neulog.com
www.neulog.com


I
Contents
Chapter 1 – Control and Robots............................................................................................. 1
1.1 Robots .......................................................................................................................... 1
1.2 Control systems............................................................................................................ 2
1.3 SENSE autonomous..................................................................................................... 3
1.4 RobocklySense............................................................................................................. 4
1.5 RobocklySense installation.......................................................................................... 4
1.6 Starting the RobocklySense program........................................................................... 5
Experiment 1.1 – Direct Mode................................................................................................ 6
1.1.1 SENSE movement........................................................................................................ 9
1.1.2 The SENSE sensors ................................................................................................... 10
Experiment 1.2 – First Programs.......................................................................................... 12
1.2.1 First program – forward............................................................................................. 14
1.2.2 Program download..................................................................................................... 17
1.2.3 Forward and backward............................................................................................... 18
1.2.4 Turning left and right................................................................................................. 20
1.2.5 Challenge exercises – Moving in a square................................................................. 22
Experiment 1.3 – Interactive Programs............................................................................... 23
1.3.1 Memories and variables ............................................................................................. 24
1.3.2 Wait until.................................................................................................................... 28
1.3.3 Endless loop............................................................................................................... 29
1.3.4 Movement between two lines .................................................................................... 30
1.3.5 Challenge exercise – Between a wall and a line (I)................................................... 30
Experiment 1.4 – Procedures as New Instructions.............................................................. 31
1.4.1 Programs and procedures........................................................................................... 33
1.4.2 Definitions.................................................................................................................. 35
1.4.3 Challenge exercises – Between a wall and a line (II) ................................................ 36
1.4.4 Moving along a black line.......................................................................................... 37
1.4.5 Challenge exercise – Along a complex black line..................................................... 38
Experiment 1.5 – Conditions and Decisions......................................................................... 39
1.5.1 If – then instruction.................................................................................................... 39
1.5.2 OFF and ON with different values............................................................................. 44
1.5.3 AND condition........................................................................................................... 45
1.5.4 OR condition.............................................................................................................. 47
1.5.5 Challenge exercise – Along two lines........................................................................ 48
1.5.6 Movement along a wall.............................................................................................. 48
1.5.7 Challenge exercises – Along walls ............................................................................ 50
Challenge 1.6 – Counting....................................................................................................... 51
Challenge 1.7 – Automatic movement.................................................................................. 52
Challenge 1.8 – Loops ............................................................................................................ 52

II
Challenge 1.9 – Loops and procedures................................................................................. 53
Challenge 1.10 – "Don't touch me" robot............................................................................ 53
Challenge 1.11 – Robots in a convoy .................................................................................... 53
Challenge 1.12 – Movement in a labyrinth.......................................................................... 54
Challenge 1.13 – Exiting a circle........................................................................................... 55
Challenge 1.14 – Moving along corridors ............................................................................ 55
Chapter 2 – Brain Units......................................................................................................... 56
2.1 Brain units.................................................................................................................. 56
2.2 NeuLog sensors as brain units ................................................................................... 57
2.3 Changing Brain unit ID.............................................................................................. 58
Experiment 2.1 – Sound Sensor............................................................................................ 59
2.1.1 Challenge exercise – Wait for sound ......................................................................... 61
Experiment 2.2 – Motion Sensor........................................................................................... 62
2.2.1 Challenge exercise – Moving in a distance range...................................................... 66
Experiment 2.3 – Brain Tracking Unit................................................................................. 67
2.3.1 IR Transmitter............................................................................................................ 67
2.3.2 Brain tracking unit ..................................................................................................... 68
2.3.3 Challenge exercise – Tracking the SENSE with an IR transmitter............................ 70
Experiment 2.4 – Brain Gripper Arm.................................................................................. 71
2.4.1 Brain gripper arm....................................................................................................... 71
2.4.2 Challenge exercises – the SENSE with gripper arm.................................................. 76
Experiment 2.5 – Robot and Science experiment................................................................ 77
2.5.1 The Neulog light sensor............................................................................................. 77
2.5.2 Light intensity vs distance.......................................................................................... 78
2.5.3 The SENSE as USB module...................................................................................... 78
2.5.3 Challenge exercise – Magnetic fields vs distance...................................................... 82

1
Chapter 1 – Control and Robots
1.1 Robots
The world today is a world of embedded computer systems. We find them in
mediasystems, watches, phones, remotecontrol, cars, and many more electronics.
A few years ago, we did not see terms such as wearable computing or internet of
things.
Everyday a surprising new product or application appears and months later, we
cannot realize how we lived without it. Modern systems are based more and more
on machine learning and artificial intelligence.
The robotic systems which are part of the embedded computer system, perform
independent activities such as: search, manipulation, identification, activation,
protection etc.
Many systems combine a certain kind of artificial intelligence in operating and
communication between machines.
The robotic system includes the controller, building components, wheels, gears,
motors, sensors, and more.
Each robotic system includes a controller that allows it to operate in accordance
with different operating programs. The robot developer writes these programs on
a computer and forwards them to the controller.
Building a robotic system creates a challenge to acquire knowledge in various
technology areas (electronics, computers, mechanics, electricity, etc.).
There are many types of robots such as arm robots, mobile robots, walking robots
and more.
The SENSE robots are a series of robots and "brain" units for study,programming
and making robots with wide variety of robot applications.
The sense autonomous is a robot enables us to program many robot applications
and functions such as movement on a line, movement along walls, tracking, AGV
(Automatic Guided Vehicle), autonomic car, autonomic guard vehicle, autonomic
taxi driver, environment monitoring, manipulating car and more. All these
applications are described as exercises in this book.

2
1.2 Control systems
A robot is a computerized control system.
A "Control system" may be defined as a group of components, which can be
operated together to control multiple variables, which govern the behavior of the
system.
Examples:
Air-conditioning systems control the temperature in the room.
A greenhouse control system controls temperature, humidity, light, and
irrigation.
A speed control system maintains a steady motor speed regardless of the
changing load on the motor.
A light control system can maintain a steady level of light, regardless of the
amount of available sunlight. The control system turns lamps ON or OFF
according to the requirements.
Three basic units are in every computerized control system:
1. Input unit – the unit that reads the system sensors like temperature, light,
distance, touch switch, etc. and feeds information into the control unit.
2. Control unit – the "BRAIN" of the control system, which contains the
system program in its memory and performs the program instructions and
processes the received data.
3. Output unit – the unit that operates the system actuators such as motors,
lamps,pump, and fan as the results of the inputs and theprogram "decisions".
Figure 1-1
The control unit is connected to a computer for programming and downloads a
program to the control unit flash memory.
Disconnecting the control unit from the computer and connecting a power source
such as a battery to it will create an independent system.
Inputs
Outputs
Control unit

3
1.3 SENSE autonomous
SENSE autonomous is a mobile robot for applications such as:
Movement along black line or white line.
Movement along walls or in a labyrinth.
Autonomous vehicle such as: AGV, autonomous car, autonomous guard
vehicle, autonomous taxi driver, autonomous manipulator.
Following a moving body holding IR transmitter using tracking module.
Environmental monitoring and measurement robot with NeuLog sensors.
The SENSE autonomous has the following built in:
Base unit
3 connectors for NeuLog sensors or brain units
5 IR range sensors
1 line sensor
Pivot wheel
2 motors with wheels
A controller for the base sensors, motors, and independent operation
A flash memory for the user programs
USB connector for connection to PC or MAC
The sense autonomous comes with an adapter for external battery. Such battery
can be a standard Power Bank with USB outlet.
You may also have the NeuLog battery module BAT-202, which can
be plugged directly into one of the SENSE sockets.
When connecting such battery to the sense autonomous and
disconnecting it from the PC, the sense autonomous becomes an independent
robot running on its internal program in its flash memory.
In this book, we shall call the sense autonomous in short SENSE.

4
1.4 RobocklySense
The RobocklySense is a visual block-programming editor. It uses blocks that link
together to build a program instead of writing code texts.
The RobocklySense uses special blocks that can read the inputs, operate the
outputs, and read any of the data from NeuLog sensors.
The RobocklySense is very user friendly and it is easy to create and run robotics
programs.
1.5 RobocklySense installation
The software and drivers must be installed before connecting any modules
to the PC or MAC.
1. Download RobocklySense Application from: www.neulog.com.
2. Follow the instructions on the screen. The installation process is
straightforward and the required drivers are installed automatically.
The installation is composed of two parts: RobocklySense software installation
and USB driver installation. After the installation process is completed, the
RobocklySensesoftware is ready to use.
The RobocklySense shortcut icon should appear on the PC desktop.
Notes:
Upgrading the software can be done at any time. Installing the upgraded software
just replaces the relevant files, so uninstalling the software before upgrading is
not necessary.
During an upgrade, the software the USB driver installation can be skipped by
clicking the Cancel button.

5
1.6 Starting the RobocklySense program
You can find the RobocklySense program icon on your computer desktop
screen.
Click on the RobocklySense icon to run the RobocklySense software.
The program is opened in a browser and the following screen appears:
This screen is for Direct mode (explained in experiment 1.1).
Exit is done in two steps.
1. Close the browser window.
2. Click on the RobocklySense icon on the bottom and close the opened
window.

6
Experiment 1.1 – Direct Mode
Objectives:
To study the SENSE units and components.
How to operate the SENSE units in direct mode.
Equipment required:
Computer
RobocklySense software
SENSE autonomous
USB connection cable
Discussion:
RobocklySense software enables the user to operate the SENSE controller
directly.
We shall learn how to operate the SENSE motors and to read its sensors directly
without programming.

7
Procedure:
1. Observe the SENSE.
2. Identify the communication cable inlet.
3. Hold the SENSE and turn it.
4. The SENSE includes:
Two motors with wheels.
One pivot wheel.
Five range sensors made of an infrared (IR) LED and phototransistor
each.
A line (black or white) sensor made of an infrared LED and
phototransistor too.
Identify them.
5. Connect the SENSE to the PC using the USB cable.
Bottom sensor
Front sensor
Left back sensor
Right back sensor
Left front sensor
Right front sensor
5
4
6
3
1
2

8
6. Run the RobocklySense software.
The Direct screen appears:
The direct mode enables you to test the system and the sensors' readings before
programming and running the programs. This stage saves a lot of frustration in
development.
This Direct mode window is for manual control and test of the robot optional
units: Sense, Robo, Robo Ex, Brain arm, Brain servo, Brain motor or NeuLog
sensor.
The following screens are Direct mode windows of the Robo, Brain arm and
NeuLog sensor.
Brain arm and NeuLog sensor are explained in chapter 3.
The Direct screen is changed according to the selected unit. Each unit has its own
default ID number. The user can change the module ID number. In this book, we
shall refer to the default ID number of the unit as 1.

9
1.1.1 SENSE movement
The SENSE robot has 9 movement commands:
Forward both wheels rotate forward
Stop both wheels stop
Backward both wheels rotate backward
Left deviate right wheel rotates forward fast and left wheel rotates forward
slower a little
Left turn right wheel rotates forward fast and left wheel rotates forward
very slowly
Left rotate right wheel rotates forward fast and left wheel rotates backward
fast
Right deviate left wheel rotates forward fast and right wheel rotates forward
slower a little
Right turn left wheel rotates forward fast and right wheel rotates forward
very slowly
Right rotate left wheel rotates forward fast and right wheel rotates backward
fast
Each command has an arrow button on the Direct screen.
There are three buttons for changing the robot speed:
1. Identify the arrow buttons.
2. Hold the SENSE in your hand.
3. Click on the buttons and observe the SENSE robot reaction.
4. Place the Sense robot on your desk.
5. Again, click on the buttons and observe the SENSE robot reaction.

10
1.1.2 The SENSE sensors
The SENSE has five wall range sensors on its perimeter and one line sensor on its
bottom, having the following names:
Bottom sensor
Front sensor
Right front sensor
Right back sensor
Left front sensor
Left back sensor
Each sensor is composed of an infrared (IR) LED (Light Emitting Diode) and
phototransistor (light sensor) directed outward.
When the SENSE controller receives a command to read one of the range sensors,
it lights the LED and measure the intensity of the received light.
The range sensors are based on infrared light in order to reduce the effect of the
surrounding light.
A white surface returns much more light then a black surface. Also colored
surfaces return different values. The line sensor on the bottom is based on this
effect.
Note:
The range sensors are not calibrated. The read values represent the intensity of the
received reflected IR light. For the same distance, you may get different value
from each sensor.
Pay attention to the side range sensors. They are all at an angle of 45o. The
Tracking a Wall experiment (experiment 1.4) explains the reason for that.

11
1. Observe the Direct screen and the read values around the SENSE picture.
These values are the read values of the SENSE sensors.
2. Place the SENSE on a white surface.
The value of the bottom sensor should be above 500.
3. Place the SENSE on a black surface.
The value of the bottom sensor should go down dramatically.
Note that there may be a big variation in the read value between different
black surfaces.
4. Place the SENSE robot at different distances from a wall and observe the
effect on each of the five wall sensors.
Note:
The read value of each sensor for the same distance may be different from
sensor to sensor.

12
Experiment 1.2 – First Programs
Objectives:
Using instructions for building a procedure.
Downloading a program to the controller and running it.
Equipment required:
Computer
RobocklySense software
SENSE autonomous
USB connection cable
BAT-202 Battery module
Discussion:
A computer program is composed of chains of instructions according to the
programming language instruction set. There are variousprogramming languages,
with different instruction sets and multiple types of programming.
We must tell the computer which instruction is the first instruction in the chain.
The computer will execute this instruction and will continue on to the following
instruction in the chain.
The program may include instructions that direct the computer to other
instructions other than the subsequent one.
The program may include instructions that move the computer to other chains
under condition.
There are many types of programming languages. Each one has its own syntax
and its own set of instruction.
The RobocklySense is a visual block-programming editor. The RobocklySense
uses blocks that link together to build a program and to concentrate on problem
solving, instead of writing code texts in a certain programming language.
The RobocklySense is very user friendly and it is easy to create and run robotics
programs. It is powerful for robotic programs and the best software to start with.

13
Procedure:
1. Connect the SENSE to the PC using the USB cable.
2. Run the RobocklySense software.
The Direct screen appears:
The direct mode enables you to test the system and its wiring before
programming and running the programs. This stage saves a lot of frustration
in development.
3. Test the SENSE motors as described in experiment 1.1.

14
1.2.1 First program – forward
1. Move to Block mode.
A computer program is composed of chains of instructions.
2. Click on the Program button and a list of program instruction list will
appear:
Table of contents