Arduino Hackday: Rebooting Computing


Published on

An introduction to the Arduino, delivered at Chalkwell House for a Southend Educational Trust organised Arduino Hack Day

Published in: Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Arduino is referred to as an open source physical computing platform. The open source element of the Arduino is significant in itself and it has opened up electronics projects to a massive range of people. Arduino is 7 years old (launched in 2005) and has had a massive impact, an impact documented in the recently released Arduino: The Documentary The software used for Arduino is based on Processing – which is an open source language developed by Casey Reas and Ben Fry The hardware is made in Italy and all the schematics for constructing the board have been made openly available by the creators. The arduino is basically a very simple computer, and when you connect it up to electronic components you are responsible for designing the arduino’s interface to reality. Essentially the arduino lets you compute reality (or experience). And due to it’s simplicity the depth of experience which it can compute is consequently quite crude (low resolution). The arduino is also useful for computer – environment interaction.” - COSM & Citizen Science
  • One of the major benefits of Arduino’s open source heritage is the amount of resources available to you if you get curious about doing further projects with it. The community that has built up around the project are very helpful When you first come to code with Arduino this is a massive learning aid. Arduino is closely linked to electronics as it began as a means to prototype inventions quickly without robotics know how. The co-creator of the platform Massimo Banzi pictured it as sketching but with electronics instead of a pen and paper. And coincidentally, arduino code is referred to as 'sketches' rather than the usual nomenclature for code, which would be scripts. You write these scripts on the computer, and then upload them to the board via USB
  • Sources of Power – any socket on the board with either “five v” or g-n-d labels beside are used to power external elements from the arduino. The five v is like the plus of a battery and the GND is like the negative. Inputs and Outputs On either side of the arduino are Digital pins, numbered 0 – 13 and analog pins numbered 0 – 5. By plugging electrical wires into these sockets (which are known as pins in the nomenclature around arduino) you can create interactive hardware. Data Transmission On pins 0 and 1 on the Digital Pin side of the board, you should see TX and RX labelled. Also there are two lights near pins 12 & 13 labelled the same. Mechanisms for transferring data to other hardware or back to the computer which the arduino is plugged into. Arduino works in the following way. You upload code from the computer onto the arduino board itself. The arduino board will have methods of sensing or acting upon reality though it's Input & Output pins.
  • Nearly everything that you code into arduino will have a real world physical counterpart. And when you get started that real world counterpart is something called a breadboard – on the left hand side of that drawing. By connecting your arduino to a USB port you are supplying it with power. In the arduino cartoon schematic above I've illustrated how you could use the arduinos built in power to drive an LED – a light emitting diode. You use a lot of these when you play with arduino – for debugging and prettifying
  • It’s also known as a rapid prototyping board. Basically it’s a way to arrange electronic circuits without having to go through the hassle of soldering. It’s a little like lego with electronics
  • We talk of electronics circuits because electricity always has to close its own loop, so when you have a high of 5 volts you need somewhere for that energy to travel to, which is provided by the GND pin, effectively equivalent to 0 volts.
  • In the middle is a button, which is like a like switch, a socket button etc. If you can suggest any other buttons to me that would be great as I live in the world of touchscreens and keyboards so my experience of buttons is impoverished. When the button isn't pressed, no voltage can flow to the LED. When you press it the voltage can flow across to the LED. We can think of the time when the LED is OFF as LOW . When there is high voltage turning the LED ON we can think of it in a HIGH state. These terms are useful in understanding the terminology used within Arduino code The circuits you assemble on your breadboard are as much a part of the entire logical system that you are creating as is the code you will type into the computer and upload to the board. But electronics and arduino code has their own respective logical parameters. They do operate by different logics, which will become more obvious the more we play with it.
  • Digital pins on on the side which has a row of pins numbered 0 to 13, and a further 2 pins labelled A-R-E-F and G-N-D.” We will get to the other set of pins later. We’ve got 13 digital pins or sockets on the RHS of the board. We also have a ground on this side These pins are the most used way of making the arduino do big things in the real world. It’s basically a way for you to switch things on and off. When you set a Digital Pin to ON it sends a HIGH voltage of 5 volts to whereever it is connected.
  • Here is the same LED, but connected to a digital pin. The Digital Pins are one of arduino’s ways of interacting with the real world, that’s to drive things in an on/off binary manner. There is a caveat however, the arduino can only provide 20 milliamps of power, which isn’t enough to power all that much. But the arduino is quite modular and with a bit of electronics know how you can use circuit amplifiers and relays (and in some cases transistors) to boost the power output of your arduino.
  • The pin powering an LED is a one way flow. Just as Arduino can tell something to turn on or off it can also recognise whether something is on or off via the same digital pins. These same digital pins can be used as sensors – they can be both inputs and outputs A real world “switch circuit” – things which are natually in a high or low state EG a light bulb a dam/canal dock Arduino sends out a high or low voltage to turn things on and off. It recognises whether something is switched on or off by sensing the voltage value. It will read anything up to approx. 2.5 volts as low and anything above as high. These two activities are the digital functionalities of the arduino ON/OFF = Binary
  • The arduino can also sense electrical signals in a more subtle way than binary on/off provided by DigitalRead The arduino has greater facilities than just that, and it is provided by the analogIn pins. The analog values only go from 0 – 1023. So the arduino samples whatever voltage it is reading into 1024 subsections. The conversion to analog values is accomplished by a 10 bit resolution A/D (analog-to-digital) converter
  • These are pretty essential kit for when you’re working with arduino, and if you use them correctly to test your circuits you will use yourself a lot of stress. You can test voltage, resistance and amperes with this tool. We can effectively use the arduino as a voltmeter. We can use changes in a voltage signal (whether due to resistance or otherwise) as input from the real world to make data or make the arduino do things.
  • Pins 0 and 1 are marked TX and RX respectively. These pins are used by the arduino to communicate with the computer. The LEDs also marked TX and RX when you upload the script, you’ll see them flicker as the computer communicates the script to the arduino. Arduino's functionality can be enhanced by “shields”, many of these shields utilise the TX/RX ports for data transmission. These shields make the arduino robust and modular
  • Arduino Hackday: Rebooting Computing

    1. 1. ARDUINO
    2. 2. Open Source Open HardwareA simple computer which can gather inputfrom reality and interface outputs with the environment however you instruct it to
    3. 3. Fundamentals Of Arduino• Write sketches or modify existing ones to suit your needs• Wire an electrics circuit• Upload the sketches to the Arduino (via USB connection) and connect the electrics circuit to the arduino, by joining wires to the sockets on the Arduino board
    4. 4. What is Arduino?• 5V & GND : sources of power• Inputs and Outputs• Data transmissionNomenclature• On board sockets = Pins• Any numbered pin = input or output• TX = transmitting RX = receiving• Arduino AKA microcontroller fig (i)
    5. 5. Sources of Power fig (ii) The arduino has three GND pins and one 5V out The pins can be used to create a 5v DC circuit,_sufficient to illuminate an LED (fig ii, above) A resistor is necessary to ensure the current does not_burn out the LED
    6. 6. Breadboard: An Arduinos Companion  The breadboard holds components external to Arduino  Each socket on a breadboard connects to a conductive _horizontal or vertical strip
    7. 7. Electrical Circuits fig (iii) The yellow trail indicates the positive pole of thiscircuit The green trail indicates the common or negative pole When both trails are linked by the LED, the circuit is_completed
    8. 8. The Logic of Switches fig (iv) The LED does not complete the circuit this time –_instead a button links the positive and negative poles_of the circuit A button can be pressed (ON) or not pressed (OFF) Depending on the buttons state (ON/OFF) the circuitis _complete or open
    9. 9. Input & Output: Digital Digital Pin :: input & output Digital means two possible states  HIGH/LOW = ON/OFF  5v – 0v = ON/OFF Programmed code tells the arduino whether each pin is HIGH/LOW (aka on/off) (The arduino assumes a pin to be off until told otherwise) fig (v)
    10. 10. Digital Switches fig (vi) This circuit is the same as fig (ii) This time the HIGH signal from digital pin 13_supplies the 5v positive pole to the circuit
    11. 11. Digital Sensors Digital pins detect whether a circuit is in an ON or OFF state When arduino measures voltage in a circuit it will register 0 – 2.5v equal to LOW 2.5v – 5v equal to HIGH LOW == OFF HIGH == ON fig (vii)
    12. 12. Input & Output: Analog* Analog Pin(s) :: input only* Analog is different to digital *Analog equals continuous *Digital equals discreet* Not just HIGH/LOW* Instead 0 – 5v is a wider spectrum of values to measure0 – 5v = 0 – 1023 in Arduino fig (viii)
    13. 13. Multimeter: Good Electronics Practice• Multimeter reads resistance, voltage and ampage• Multimeter is a big help to making sure you’re electronic circuit works the way it should:• a circuit should always work the way you expect it before writing/amending arduino code
    14. 14. Other Variable Resistors• LDR = Light Dependant Resistor• Thermistor = heat dependant resistor• GSR = Galvanic Skin Response Galvanic Skin Response• FSR = Force sensitive resistor Thermistor
    15. 15. Serial Port CommunicationSerial Port is how the ArduinoCommunicates with other DigitalDevices (E.G. the computer or adigital SD card)All computer tetheredcommunications go via the serialport which arduino is connectedtoSerial Port data can be accessedby software other than Arduinoprogramming software (mostreadily via Processing)Arduino can save data to SDcards using the TX and RXfacilities (advanced feature)