Basic Electronics for Arduino -basic electronics -arduino related stuff -tips and tricks Rob...

Post on 18-Jan-2016

221 views 2 download

Transcript of Basic Electronics for Arduino -basic electronics -arduino related stuff -tips and tricks Rob...

Basic Electronics for Arduino

-basic electronics-arduino related stuff-tips and tricks

Rob Zimmermann 2015

Matter, Molecules, Atoms

Protons have a positive chargeElectrons have a negative charge

Electronic is the study of the movement of electrons from one atom to another

Some materials like to share electrons> ConductorsSome not> Insulators

Charged materials seek to become neutral, they want to give or take electrons. The amount of this difference in charge results in a difference of potential, ‘electric pressure’, or Voltage (V (sometimes U or E)) and is measures in Volts (V)

The flow of electrons through a body (cable) is called Current (I) and is measured in Ampere (A)Current is depending on Voltage and Resistance

Friction against this current is called Resistance (R) and is measured in Ohm (Ω)

Voltage under 48 V is called Low Voltage and is not really dangerous. Things with batteries, adaptors, accumulators.

Voltage above 48 V is High Voltage and can be lethal!!! Don’t mess with anything which is connected to the 220 Volt contact

The parameters for Resistance are:-what kind of material (plastic high resistance, metal low resistance)-travel distance of electrons. The length of the cable-the width of the material. The diameter of the cable-temperature. Higher temperature means more resistance. Not always though…

Friction creates heat, resistance does as well

A circuit needs a Source, a Load, and closure

All loads are also resistors.

Water metaphor

Voltage, Current, Resistance have a connection:V=I*R; I=V/R; R=V/I

Resitors is SeriesRt= R1+R2+R3+R…

Resistors in Parallel:1/Rt= 1/R1+ 1/R2+ 1/R…

The amount of Power (P) dissipated (consumed) by a resistor (device) is measured in Watt (W) and is the Voltage multiplied by the Current

Make sure your resistor is suitable for the dissipation

P= V*I; I=P/V; V= P/I

Example:A 12 Volt car front light of 80 Watt uses 80/12=6,66 A

Measuring Volts and Amperes

Volts in Parallel Amperes in Series!!!Take care to put the multimeter in the right setting!!!

Resistors

Capacitors are components that store Voltage but don’t conduct Current. We use them to filter out Direct current, certain frequencies, or smoothen peaks in current. They need a specific time to charge, therefore they are often used in timer circuits. Capacity (C) is measuredin Fahrad (F). µF or nF.

A diode let current pass in only one direction.It is used as a voltage protection or as an AC/DC rectifier.

A diode in open direction does not have resistance, so never connect is straight to a power source without a series resistor

Desired Voltage drop over resistor is 5-1,6=3,4 Volt.The desired current through the resistor is 0,02 Ampere. R=V/I; R=3,4/0,02=170Ω

The arduino board can source 40 mA per pin at 5 volt DC. Any rating above this has to be generated by a ‘Driver’. A driver is a device, component, or electronic circuit that amplifies low voltage or current. (metaphor: steering aid)

A relay is an electronic switch which can switch high currents of voltages by activation via a small voltage. Don’t mix up the coil and switch values.Use a diode in parallel to the coil.

A relay circuit

A transistor is and electronic amplifier. Kind of like an electronic relay. With very small input voltage a higher voltage is switched.A transistor has a Base, Emitter (input) and Collector (output)

Transistor driver circuit

A transistor does not have resistance at the base, so it needs a series resitor.To ‘fix’ it in closed position it needs a pull down resistor.

Sensors are the ‘translators’ for the physical world to the Arduino. Physical circumstances are turned into analog voltages which the Arduino can read and assign a value to which can be used in the program

Switches, potentiometers, pressure-, temperature-, altitude-, acceleration-, etc.

A potentiometer is a variable resistor. By manually turning the axis, the resistance changes between zero and maximum rating. If a voltage is applied, the output value changes from zero to the maximum voltage.

PotentiometerThe value of the resistive material is marked on the casing.Linear (B) or logaritmic (A). Always double check because it used to be the other way around

Other Sensors are like potentiometers, the voltage changes between two values (normally 0-5 V) according to the exposure to the medium.

Analog sensors with two contacts need a resitor to GND. The value of this resistor is chosen somewhere in the middle of the dynamic range of the sensor.

Actuators are the ‘translators’ for the Arduino to the physical world. Digital signals are turned into physical events.

Motors, lamps, solenoids, hydraulic pistons, electromagnets, etc.

A servomotor is an electromotor of which the position is constantly monitored. As such it is quite a fail safe system.Servomotors cannot turn 360 desgrees because a potentiometer turns along.

A stepper motor is an electromotor which lets itself be positioned very precisely by pulses. Each pulse lets the motor turn a fraction of a degree. The Arduino knows where the motor is by counting the pulses.Steppermotor control requires a driver.A stepper can be mechanically forced and the counts are lost.

Tips:-cable diameter. The longer the cable, the higher the current, the thicker the cable must be. Use Ampere divided by 10 as the value for mm2 (more or less)-use contacts, make everything to be de-mountable. This makes repairs more easy.-bouncing of switches is often a source for problems. Use debouncing.-use analog sensors in stead of digital ones. They are more easy to use for a beginner. -use http://fritzing.org/home/ to document your circuits.-A good (and relatively fun) book for learning electronics is http://www.makershed.com/products/make-electronics-2ed -have fun and dare to experiment. Yeah!