You are on page 1of 7

PROJECT REPORT

FINAL PROJECT

STUDENTS: Diego Ortega Sanz, Ángel Salas Navarro, Guillermo de la Obra Pérez

SUBJECT: Electrónica Digital y de Microprocesadores

PROFFESOR: Víctor Manuel Padrón Nápoles

21 DE DICIEMBRE DE 2017
UNIVERSIDAD EUROPEA DE MADRID
GRADO EN INGENIERÍA ELECTRÓNICA
INDUSTRIAL Y AUTOMÁTICA

ASIGNATURA: ELECTRÓNICA DIGITAL Y MICROPROCESADORES


NOMBRE: DIEGO APELLIDOS: ORTEGA SANZ

INDEX
INTRODUCTION ............................................................................................................................. 2
PROJECT ´S DESCRIPTION .............................................................................................................. 2
DESCRIPTION OF THE PROJECT ELEMENTS ................................................................................... 3
ARDUINO ................................................................................................................................... 3
PIXY CMU CAM5 ........................................................................................................................ 3
JOYSTICK .................................................................................................................................... 4
SHIELD ....................................................................................................................................... 4
CAMERA STRUCTURE ................................................................................................................ 4
DESCRIPTION OF THE PROJECT CODES ......................................................................................... 5
JOYSTICKS MANUAL CONTROL .................................................................................................. 5
CAMERA INFO TO ARDUINO ..................................................................................................... 5
WHEEL ROBOT CONTROL .......................................................................................................... 5
HOW TO IMPROVE THE ELEMENTS OF THE PROJECT ................................................................... 6
REFERENCES .................................................................................................................................. 6

1
GRADO EN INGENIERÍA ELECTRÓNICA
INDUSTRIAL Y AUTOMÁTICA

ASIGNATURA: ELECTRÓNICA DIGITAL Y MICROPROCESADORES


NOMBRE: DIEGO APELLIDOS: ORTEGA SANZ

INTRODUCTION
The students of the subject digital electronic and microprocessors has made a project at the end
of the subject in order to show the knowledge’s learned, not only in that signature, but also in
others. For that reason, we have tried to make a project with this specifications, and the project
chosen involved several signatures and is a project in which robotics club are very interested.

PROJECT ´S DESCRIPTION
That we´re going to do is to implement an artificial vision camera. We´ll try to achieve several
goals:

 Make a pan -tilt movement: we want to achieve an autonomous movement of the


camera. Once he has been teached on an object, it will follow, moving the servo-motors.

 Move the camera structure with a manual joystick: we want to move the camera
structure in a manual mode, we will control this movement with a joystick, attached in
Arduino pins.

 Send the camera info to Arduino: We want to send the information of the pixy camera
to Arduino. To achieve that goal, we will use the UART port and communications.

 Make the code to control a wheel robot: we want to give orders, but not to Arduino, in
this case we want to give orders to control a robot or something similar. That will be an
experimental code, and right now, it won´t be probe.

2
GRADO EN INGENIERÍA ELECTRÓNICA
INDUSTRIAL Y AUTOMÁTICA

ASIGNATURA: ELECTRÓNICA DIGITAL Y MICROPROCESADORES


NOMBRE: DIEGO APELLIDOS: ORTEGA SANZ

DESCRIPTION OF THE PROJECT ELEMENTS


Let’s see the different elements that we have:

ARDUINO
Arduino is an open source computer hardware and software company, project, and user
community that designs and manufactures single-board
microcontrollersand microcontroller kits for building digital devices and interactive objects that
can sense and control objects in the physical world. The project's products are distributed
as open-source hardware and software, which are licensed under the GNU Lesser General
Public License (LGPL) or the GNU General Public License(GPL), permitting the manufacture of
Arduino boards and software distribution by anyone. Arduino boards are available commercially
in preassembled form, or as do-it-yourself (DIY) kits.

Arduino board designs use a variety of microprocessors and controllers. The boards are
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to
various expansion boards (shields) and other circuits. The boards feature serial communications
interfaces, including Universal Serial Bus (USB) on some models, which are also used for loading
programs from personal computers. The microcontrollers are typically programmed using a
dialect of features from the programming languages C and C++. In addition to using traditional
compiler toolchains, the Arduino project provides an integrated development environment(IDE)
based on the Processing language project. [1]

PIXY CMU CAM5


Pixy (CMUcam5) is a partnership between the Carnegie Mellon Robotics Institute and Charmed
Labs. Pixy comes from a long line of CMUcams

Pixy can easily connect to lots of different controllers because it supports several interface
options (UART serial, SPI, I2C, USB, or digital/analog output), but Pixy began its life talking to
Arduinos. Over the last several months we've added support for Arduino Due, Raspberry Pi and
BeagleBone Black. Software libraries are provided for all of these platforms so you can get up
and running quickly. Additionally, we've added a Python API if you're using a Linux-based
controller (e.g. Raspberry Pi, BeagleBone).

Pixy uses a color-based filtering algorithm to detect objects. Color-based filtering methods are
popular because they are fast, efficient, and relatively robust. Most of us are familiar with RGB
(red, green, and blue) to represent colors. Pixy calculates the color (hue) and saturation of each
RGB pixel from the image sensor and uses these as the primary filtering parameters. The hue of
an object remains largely unchanged with changes in lighting and exposure. Changes in lighting
and exposure can have a frustrating effect on color filtering algorithms, causing them to break.
Pixy’s filtering algorithm is robust when it comes to lighting and exposure changes.

Pixy remembers up to 7 different color signatures, which means that if you have 7 different
objects with unique colors, Pixy’s color filtering algorithm will have no problem identifying them.
If you need more than seven, you can use color codes (see below). [2]

3
GRADO EN INGENIERÍA ELECTRÓNICA
INDUSTRIAL Y AUTOMÁTICA

ASIGNATURA: ELECTRÓNICA DIGITAL Y MICROPROCESADORES


NOMBRE: DIEGO APELLIDOS: ORTEGA SANZ

JOYSTICK
The Joystick module is similar to analog joysticks found in gamepads. It is made made by
mounting two potentiometers at a 90 degrees angle. The potentiometers are connected to a
short stick centered by springs. Output: This module will output roughly 2.5 volts from both
outputs when in its resting position. Moving the stick will cause the outputs to change from 0v
to 5v depending on its direction. If you connect this module to an Arduino through the Tinkerkit
Shield, you can expect to read a value of roughly 512 in its resting position (expect small
variations due to tiny imprecisions of the springs and mechanism) When you move the joystick
you should see the values change from 0 to 1023 depending on its position. Module Description:
This module features two 4k7 Ohm linear potentiometers, two standard TinkerKit 3pin
connector, two signal amplifiers, a green LED that signals that the module is correctly powered
and two yellow LED whose brightness depends on the values output by the module. This module
is a SENSOR. Its connectors are OUTPUTs which must be be connected to two of the INPUT
connectors on the TinkerKit Shield. [3]

SHIELD
Thinker kit shield with 22 3-pins inputs otputs and UART and TWI interface

CAMERA STRUCTURE
We have created one by ourselves and used the structure given with the camera too.

4
GRADO EN INGENIERÍA ELECTRÓNICA
INDUSTRIAL Y AUTOMÁTICA

ASIGNATURA: ELECTRÓNICA DIGITAL Y MICROPROCESADORES


NOMBRE: DIEGO APELLIDOS: ORTEGA SANZ

DESCRIPTION OF THE PROJECT CODES


We have made different codes, here we are going to explain them a little bit, we will upload
this document and the codes:

JOYSTICKS MANUAL CONTROL


In this case we have connected the joystick to the shield and then the servo, following the next
diagram (cached on internet)

As we can see we have connected three wires, Vcc Gnd and signal, we have done this twice.

In the code, we have defined the outputs of the tinker-kit shield joined to the joystick ans the
servo objects, then we just have make a map to convert the values from 1024 to 180 degrees
and have send this to the servos and to the serial port

CAMERA INFO TO ARDUINO


This code is very simple, we just send the info from the camera to Arduino, and it showns it
across the serial monitor.

Here we had to include the spi and uart communication libraries, because that’s the way we
have made the communication between both devices

WHEEL ROBOT CONTROL


In this case, we have taken several parts of internet to make an initial code to make a robot.

This code is more complex than the other one and need to be implemented and depurated.

The most important here is that we have implemented a PD controller and define the cebter of
the matrix of searchs.

The motors defined “zumbo motors are a special one that will be used if that code is finally
implemented”

5
GRADO EN INGENIERÍA ELECTRÓNICA
INDUSTRIAL Y AUTOMÁTICA

ASIGNATURA: ELECTRÓNICA DIGITAL Y MICROPROCESADORES


NOMBRE: DIEGO APELLIDOS: ORTEGA SANZ

HOW TO IMPROVE THE ELEMENTS OF THE PROJECT


We can make some improvements in this projects

 Improve the camera control, using all the tools in the pixy motion software
 Create the robot, and install the code complete
 Improve the PD controller
 Try to make this project with another micro controller

REFERENCES
1. Arduino. (s.f.). Obtenido de https://en.wikipedia.org/wiki/Arduino:
https://en.wikipedia.org/wiki/Arduino

2. CAM5, P. C. (s.f.). Introduction and Background - CMUcam5 Pixy - CMUcam: Open


source. Obtenido de Introduction and Background - CMUcam5 Pixy - CMUcam: Open
source:
http://www.cmucam.org/projects/cmucam5/wiki/Introduction_and_Background

3. (s.f.). tinkerkit joystick datasheet.

You might also like