Controlling a fischertechnik Conveyor Belt with Arduino board

Similar documents
Lab 2.2 Ohm s Law and Introduction to Arduinos

<Table of content> <Parts and description> <Circuit board Guide> <Pins> <Basics of Coding> <Intro to Arduino> <Intro> <Downloading Arduino IDO>

Rover 5. Explorer kit

Light Sensor. Overview. Features

IME-100 ECE. Lab 4. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

Arduino Robots Robot Kit Parts List

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

GUIDE TO SP STARTER SHIELD (V3.0)

University of Portland EE 271 Electrical Circuits Laboratory. Experiment: Arduino

Arduino Programming. Arduino UNO & Innoesys Educational Shield

SPDM Level 2 Smart Electronics Unit, Level 2

MECHATRONICS CATALOGUE

Arduino 101 AN INTRODUCTION TO ARDUINO BY WOMEN IN ENGINEERING FT T I NA A ND AW E S O ME ME NTO R S

Goal: We want to build an autonomous vehicle (robot)

Grove - 80cm Infrared Proximity Sensor

Arduino - DigitalReadSerial

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

Serial.begin ( ); Serial.println( ); analogread ( ); map ( );

ACORN User Guide For Revision (Aka Acorn_rev3) Updated 1/23/17

Create your own wireless motion sensor with

If I wanted to connect an LED and little light bulb and have them switch on and off with one switch, my schematic would look like the one below.

Web Site: Forums: forums.parallax.com Sales: Technical:

Adafruit INA219 Current Sensor Breakout

Thursday, September 15, electronic components

Thumb Joystick Retail. Tools and parts you'll need. Things you'll want to know. How does it work? Skill Level: Beginner. by MikeGrusin March 22, 2011

HUB-ee BMD-S Arduino Proto Shield V1.0

Objectives: Learn how to input and output analogue values Be able to see what the Arduino is thinking by sending numbers to the screen

Adafruit INA219 Current Sensor Breakout

Hardware Manual CNC760

Robotics/Electronics Review for the Final Exam

ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL

ARDUINO MINI 05 Code: A000087

Introduction to Programming. Writing an Arduino Program

Introduction to Arduino. Wilson Wingston Sharon

Lab-3: LCDs Serial Communication Analog Inputs Temperature Measurement System

AlphaBot2 robot building kit for Arduino

SPIRIT. Phase 5 Analog Board Computer and Electronics Engineering

Grove - 80cm Infrared Proximity Sensor User Manual

Arduino Programming and Interfacing

Strain gauge Measuring Amplifier GSV-1A8. Instruction manual GSV-1A8, GSV-1A8USB, GSV-1A16USB

Project 16 Using an L293D Motor Driver IC

How to Use an Arduino

Physical Computing Self-Quiz

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

Arduino and Matlab for prototyping and manufacturing

Create moving images in forward and reverse with your Arduino when you connect a motor to an H-bridge and some still images BATTERY POTENTIOMETER

LDR_Light_Switch1 -- Overview

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

LSN1 Intro to Software Engineering

TMP36 Temperature Sensor

Table of Contents. Lucas Nülle GmbH Page 1/9

Sensors and Motors Lab

Prototyping & Engineering Electronics Kits Basic Kit Guide

Adapted from a lab originally written by Simon Hastings and Bill Ashmanskas

Strain gauge Measuring Amplifier GSV-1A8. Instruction manual GSV-1A8, GSV-1A8USB, GSV-1A16USB

RedBoard Hookup Guide

PLC. Module 3: Hardware and Terminology. IAT Curriculum Unit PREPARED BY. Jan 2010

Grove - Thumb Joystick

EK307 Lab: Microcontrollers

Adafruit INA219 Current Sensor Breakout

OPT2011. High-performance distance sensor. Operating Instructions

Centroid ACORN CNC controller Specification and Use Guide Updated 8/3/17. Overview

Electronic SD1, AS 8, ASR 14, ASR 20

FIRE SENSOR ROBOT USING ATMEGA8L

Alessandra de Vitis. Arduino

LDR_Light_Switch5 -- Overview

ME 3210: Mechatronics Signal Conditioning Circuit for IR Sensors March 27, 2003

Mechatronics Technician/Engineer (Basic, fitter-focus)

Introduction to Arduino Programming. Sistemi Real-Time Prof. Davide Brugali Università degli Studi di Bergamo

Project Planning. Module 4: Practice Exercises. Academic Services Unit PREPARED BY. August 2012

ARDUINO BOARD LINE UP

AC : INFRARED COMMUNICATIONS FOR CONTROLLING A ROBOT

TANGIBLE MEDIA & PHYSICAL COMPUTING MORE ARDUINO

MegaPi Born to Motion Control

RS 485 Mini Modbus 1AO

Figure 18: Basic input port drawing.

Breakoutboard Rev.2 for Estlcam

TMP36 Temperature Sensor

Sten-SLATE ESP. Introduction and Assembly

Me Stepper Driver. Overview

LDR_Light_Switch2 -- Overview

How-To #7: Assemble an H-bridge Circuit Board

EMTRON AUSTRALIA EMTRON ECU OVERVIEW

Laboratory of Sensors Engineering Sciences 9 CFU

RS422/RS485 Shield. Application Note: Multiple RS485 busses. 1 Introduction

AT42QT101X Capacitive Touch Breakout Hookup Guide

Grove - Thumb Joystick

Conveyor Station Exercise 1: Learning about components and their function

USER S MANUAL. C11S- MULTIFUNTCION CNC BOARD Rev. 1.2

D115 The Fast Optimal Servo Amplifier For Brush, Brushless, Voice Coil Servo Motors

Smart Objects. SAPIENZA Università di Roma, M.Sc. in Product Design Fabio Patrizi

AT42QT1010 Capacitive Touch Breakout Hookup Guide

Connecting LEDs to the ADB I/O

Product Manual Dual SSR Relay Board

Arduino Prof. Dr. Magdy M. Abdelhameed

eace PLC Velocio s Embedded Ace (eace) PLC

Explorer V1.20. Features

This is the Arduino Uno: This is the Arduino motor shield: Digital pins (0-13) Ground Rail

0,25 mm false pulse suppression 4 program options 4 program options on/off switchable 4 preset levels or level set by customer.

L298N Dual H-Bridge Motor Driver

Transcription:

EXPERIMENT TITLE: Controlling a fischertechnik Conveyor Belt with Arduino board PRODUCTS USED: CHALLENGE: AUTHOR: CREDITS: Interface and control a conveyor belt model (24 Volts, fischertechnik) with an Arduino board (5 Volts) Pietro Alberti (Media Direct srl, Italia) pietro@mediadirect.it Wohlfarth Laurenz (fischertechnik GmbH, Germany) Dedicated to my family: Marco, Luca, Chiara, Francesco and Maria 10 th January, 2013: Final version 1/12

fischertechnik: MODEL DESCRIPTION This fischertechnik conveyor belt is preassembled and mounted on a base plate. - several conveyor belts can be connected to each other to form a conveyor belt of any length. Technichal specifications: - Power supply required: 24V DC (not included) - Dimensions: about 275 x 210 x 70 mm (LxWxH) - Length: 275 mm - 1 Output, 24 V DC (1 motor to drive the conveyor belt forward and backward) - 3 Digital Inputs, 24 V: 2 light barriers (consisting of phototransistor and lens tip bulb (which can be connected together to an output for the control or directly to the power supply) and 1 pulse counter coupled to the motor axle (can be used as an encoder to get the distance traveled) - 1 workpiece diameter 29 mm, h = 25 mm (it's possible to use workpieces with diameter up to 29 mm) 2/12

The fischertechnik model comes with a detailed pinout description: This fischertechnik model works with 24 Volts! 24 V motor: 24 V lamp: 24 V phototransistor: 3/12

Arduino: COMPONENTS ESCRIPTION 1 Arduino Duemilanove board... but you can use any of the similar board (Arduino Uno Rev3, Arduino Leonardo,...): the important thing is to have at least 3 analog inputs and 2 digital outputs. 1 TinkerKit Sensor Shield module: only to simplify me the wiring (optional) 2 TinkerKit relays module: to drive the motor (forward and backward) 2 potentiometers (10 kohm) to reduce 24V 5V (from light barriers) Power supply (for Arduino) It comes from a USB cable connected to the computer. When programmed, you can use a 9V battery. Arduino works with 5 Volts! 4/12

THE CHALLENGE The fischertechnik model requires 24V, since it s used as a TRAINING MODEL to be controlled from real life device like PLC from Siemens. So the motor and the lamps needs 24 V. Arduino can drive the 24V motor without problem: I used 2 relays. Fischertechnik now offers two outputs for the driving motor: Q1 to drive forward; Q2 to drive backward: great! But the signal coming from the light barrier is 24 V, too! Arduino accepts only 5 V, not 24 V. The challenge is reading the light barriers signal with Arduino! It s a problem of signal conditioning (max: 5V, 40 ma). I used a very simple circuit with a 10 KOhm potentiometer. Warning: I connected the ground from fischertechnik (-) to Arduino's ground: without a common ground, the ADC input is just going to read noise. Before connecting the wires to Arduino I manually tuned the potentiometer with a multimeter: I stopped when I arrived at 5 V. From an maths point of view: V out = V in *R 2 /( R 1 + R 2 ) V R 1+ R 2 R 2 V out = V in *R 2 /( R 1 + R 2 ) I MAX 0 V 10.000 Ω - 0 V 0 24 V 10.000 Ω 2.000 Ω 5 V 3 ma So now the voltage is about 5V and the current is about few ma. I used some fischertechnik plugs to avoid using soldering: 5/12

ELECTRICAL CONNECTION DIAGRAM I enclose the wiring diagram. Might be useful. I prefer to use pen and paper... though I might have been faster with computer ;-). 6/12

HOW THE MODEL WORKS: ALGORITHM S DESCRIPTION My goal is to move forward and backward a small black cylinder between the two light barriers. I developed a program and then I ve uploaded it to Arduino (when I give power to Arduino via USB cable or with an external 9V battery, the program starts automatically). I implemented the following actions 1-3, repeated indefinitely (default): 1) Motor forward (from light barrier 1 to the light barrier 2): the workpiece must be placed in the middle of the conveyor belt, only once ;-) 2) when the workpiece arrives on the light barrier 2: stop the motor, wait 3 s, reverse motor backward 3) when the workpiece arrives back on the light barrier 1: stop the motor, wait 3 s, reverse motor backward for 1.5 s, (enough to place the workpiece about in the middle position) 4) repeat cycle from point 1) PROGRAMMING ARDUINO (Processing) I used Processing to program Arduino, in C language. The program is very simple, just to test the system. More improvements can be done and in more different ways. I programmed the system by defining a variable state ( stato ), to understand where we are. stato = 0: workpiece in the middle of the conveyor belt and motor forward stato = 1: workpiece arrived on the light barrier 2 (stop motor, wait 5 s, reverse motor) stato = 2: workpiece arrived back on the light barrier 1 (stop motor, wait 5 s, reverse motor) I used the Serial Monitor tool of Processing to show messages on the computer about the state of the system (debug/informations). /* Outputs: pin 10: motor backward (digital output: HIGH/LOW) pin 11: motor forward (digital output: HIGH/LOW) Inputs: pin A0: light barrier 2 (-> analog input to Arduino 0-5V) pin A1: light barrier 1 (-> analog input to Arduino 0-5V) 0V = object present (phototransistor not illuminated) 5V = object not present (phototransistor illuminated) I decide for a threshold about 2.5V to decide if the object is present or not. */ const int MotAvantiPin = 11; const int MotIndietroPin = 10; int stato; // state of the system int sensorvalue; // sensor readings: 0...1023 float voltage; // sensor readings in voltage: 0...5 Volt // 'setup' runs once void setup() { Serial.begin(9600); // start serial communication @ 9600 bps (to debug) digitalwrite(motindietropin, LOW); // Motor backward off digitalwrite(motavantipin, HIGH); // Motor forward on Serial.println("Conveyor forward"); Serial.println("Place the cylinder in middle position"); stato=0; // 0 = initial state } // 'loop' runs forever void loop() { if (stato==0) { sensorvalue = analogread(a0); // light barrier 2 readings: 0 1023 voltage = sensorvalue * (5.0 / 1023.0); // convert analog reading from 0...1023 0...5V if (voltage < 2.5) { // cylinder arrived at light barrier 2 stato=1; // update variable state digitalwrite(motavantipin, LOW); // Motor stop Serial.println("Arrived at FC2: stop 3 s, then go back"); 7/12

} } delay(3000); //pause 3 s Serial.println("Conveyor backward"); digitalwrite(motindietropin, HIGH); // Motor backward on } if (stato==1) // waiting for light barrier 1 signal { sensorvalue = analogread(a1); // light barrier 1 readings: 0 1023 voltage = sensorvalue * (5.0 / 1023.0); // convert analog reading from 0...1023 0...5V if (voltage < 2.5) { // cylinder arrived at light barrier 1 stato=2; // update variable state digitalwrite(motindietropin, LOW); // Motor stop Serial.println("Arrived at FC1: stop 3 s, then go forward"); delay(3000); //pause 3 s digitalwrite(motavantipin, HIGH); // Motor forward on for 1.5 middle position delay(1500); //pause 1.5 s Serial.println("---- STARTING POSITION ----"); digitalwrite(motavantipin, LOW); // Motor stop delay(5000); //pause 5 s digitalwrite(motavantipin, HIGH); // Motor forward on stato=0; // initial state } } 8/12

PHOTOS AND NOTES 1 st release: fischertechnik conveyor belt + Arduino Duemilanove Wires connected without planning, very alpha stage, but very bright. Wires connected to the spring contact on the fischertechnik board. 2 nd release: Using a flat cable (26 pin) for a better wiring and making easy to unplug the fischertechnik model from the Arduino world. The 24 V comes from a Siemens LOGO power supply I already used in the past to interface Siemens PLCs with fischertechnik Training Models. Focus on Arduino section: watch the 10 kohm potentiometer I used to reduce the signal coming from the light barrier pin (24 V). Final release: I built an interface box between Arduino and fischertechnik: - soldering breadboard - 3 trimmer, 10 Kohm - 2 relays, tinkerkit - 1 header, 8 pin (Arduino side) - 1 header, 8 pin (fischertechnikside) - 1 terminals block (for 24V power supply) I also implemented a pulses counter coming from the switch I3 coupled to the motor shaft (it acts like an encoder), displaying this data in serial. Finally I interfaced the system with the Processing environment, synchronizing information via serial transmission. 9/12

LAST UPDATE: 10 January 2013 I decided to close the project attempting to build a system as clear as possible. I built an interface box between Arduino and fischertechnik: - soldering breadboard - 3 trimmer, 10 Kohm - 2 relays, tinkerkit - 1 header, 8 pin (Arduino side) - 1 header, 8 pin (fischertechnikside) - 1 terminals block (for 24V power supply) In management software Arduino I implemented a counter of impulses coming from the switch I3 coupled to the motor shaft (encoder type), displaying this data in the serial. Interesting is the software solution to avoid the rebound effect when switching the digital inputs. State: 0,1,2,3 Pulses: 100 + nr_of_real_pulses Finally I interfaced the system with the Processing environment: I ve dynamically synchronized the motion of a green circle (virtual) with the (real) workpiece. Idem for the light barriers (I1 and I2), with red LEDs on/off. Processing receives Arduino via serial digital data representing the state (values: 0,1,2,3,4) or the number of pulses counted (increased by 100). 10/12

SCREENSHOTS WITH SOFTWARE PROCESSING STATUS 0: The piece (green circle) moves from left to right SCREENSHOT 1: The piece (green circle) has reached the stroke end on the right: - LED sensor on right - Display Number of Pulses 2: The piece (green circle) moves from right to left 3: The piece (green circle) has reached the stroke end on the left: - LED sensor on left - Display Number of Pulses The cycle starts again from status = 0 11/12

FINAL COMMENTS I thought it was a project too simple (only 3 inputs and 2 outputs). Then instead turned out to be very interesting and full of technical hardware/software and ideas for improvements to be implemented later. Here are some ideas. Hardware: - Adaptation electric 24 5 Volts. Note that my solution is probably the simplest and cheapest. Surely you can improve the circuit using operational amplifiers, diodes, etc.. - Number of Inputs/Outputs: you could increase the number of inputs/outputs (thus using more relays, perhaps smaller) and therefore be able to handle even the most complex models of fischertechnik 24V (robotic arm, conveyor, pneumatic station,... ) - Software: The software I've realized is "essential" right to operate the system. But many ideas came to me as possible additions and/or variations: - Insert buttons on the screen to start/stop of the model (using serial communication) - Insert sound/animations correlated to the state of the system - Use another development environment, maybe Visual Basic / C - Control the system via the Web, using an Arduino Ethernet (there is even an appropriate shield) and using it as a Web server - Thank you for your attention! Pietro Alberti pietro@mediadirect.it 10 th January, 2013 Disclaimer: the undersigned disclaims any liability for any damage to people and/or things resulting from the use of this document. 12/12