Wednesday 29 March 2017

Arduino Starter Kit - Project 8 - Hour Glass

Tilt Sensor Utilisation

Build a timer that turns an LED on a LED every ten minutes. The timer uses the Arduino Uno's built in timer that is accessible through millis. Reset the clock , by tilting the UNO.

Building


Monday 27 March 2017

Arduino Starter Kit - Project 7 - Keyboard Instrument

Resistor ladder

This is a way to read a number of switches using the analog input. It’s a helpful
technique if you find yourself short on digital inputs. You’ll hook up a number of
switches that are connected in parallel to analog in 0. Most of these will connect
to power through a resistor. When you press each button, a different voltage level
will pass to the input pin.

Building



I had a lot of trouble relating the breadboard layout to the schematic, evidence of my being a novice. I spent a lot of time trying to understand it.

Saturday 25 March 2017

Arduino Starter Kit - Project 6 - Light Theremin

Using a photoresistor and a piezo element make a light-based theremin


A photoresistor is used to detect the amount of light and by varying the amount of light the sensor receives a different frequency of note will be played.

Building



Wednesday 22 March 2017

Arduino Starter Kit - Project 5 - Mood Cue

Control A Servo Motor Through A Potentiometer 

Servo motors are a special type of motor that don’t spin around in a circle, but
move to a specific position and stay there until you tell them to move again.
Servos usually only rotate 180 degrees (one half of a circle).

Servo motors expect a number of pulses that tell them what angle to move to.

  • A servo motor is a special type of motor that doesn't spin around in a circle, but moves to a specific position and stays there. Servos usually only rotate 180 degrees.
  • The potentiometer is a voltage divider packaged in one component
  • project video is available and an Instructables tutorial
The header pins for the server motor did not connect correctly so I used jumper leads.

Building

Fritzing




Sunfounder - Components

  • Power Supply
      1. A convenient power module supplying especially an MB102 breadboard, supporting 5 V or 3.3 V output.
      2.  Input voltage: DC 6.5-12 V.
      3. Output voltage: 3.3V/5V; Maximum output current: 700 mA.
      4. With a power switch and indicator LED; two circuits at top and bottom for separated control – can be changed between 0V, 3.3V and 5V.
      5. Uses a USB Type-A 5V output port for control board and a voltage regulator chip 1117-5.0V/1117-3.3V.
      This is a power supply module designed for MB102 breadboards. It is powered by a 5V DC jack with an input voltage of 6.5v-12V. The module has a power button and power indicator LED on board. When you press the power button, the LED will brighten and the module starts working.
      The module supports output of 3.3V or 5V. Two circuits are set at top and bottom for separated control and output can be changed between 0V, 3.3V and 5V. You can connect the two rows of pins on the module for 3.3V/5V output, and the 5V USB Type-A port can be used to supply the MCU.
      With this power module, you can do experiments and start learning in a more convenient and simpler way!
      Note:
      1. The module needs an input of 6.5V-12V. If a lower voltage like 5V is provided, you can't get a 5V output, because there should be a voltage difference between input and output, otherwise the module cannot work. 
    • Not too impressed by this device

Monday 20 March 2017

Arduino Starter Kit - Project 4 - Colour Mixing Lamp

Investigate the use using a tri-color led and three photoresistors


A lamp will be created that smoothly changes colors depending on external lighting conditions

Using a tri-color led and three photoresistors, a lamp will be created that smoothly changes colors depending on external lighting conditions.

The Arduino can’t vary the output voltage on its pins, it can only output 5V. Hence you’ll need to use a technique called Pulse Width Modulation (PWM) to fade LEDs. PWM rapidly turns the output pin high and low over a fixed period of time. The change happens faster than the human eye can see. It’s similar to the way movies work, quickly flashing a number of still images to create the illusion of motion


  • The Arduino Uno has six pins set aside for PWM (digital pins 3,5, 6, 9, 10, and 11), they can be identified by the ~ next to their number on the board.
  • Photoresistors are sensors that change their resistance depending on the amount of light that hits them, also known as photocells or light-dependent resistors.
  • A project video is available and an Instructables tutorial



Building


Built it in AutoDesk and Fritzing. This is good practice in using those tools.
  • Autodesk. The simulation worked as can be seen on YoutTube.

  • Fritzing


  • Found the covering of the photoresistors with the coloured strips a little too fiddly.
  • My wire cutting is not that brilliant, look at the red wire!

Arduino Starter Kit - Components





The Components

Arduino / Genuino Uno https://www.arduino.cc/en/Main/ArduinoBoardUno
USB cable         https://www.arduino.cc/documents/datasheets/USBcable.PDF
Breadboard 400 points https://www.arduino.cc/en/uploads/Main/BreadboardSolidWire.pdf
Solid core jumper wires https://www.arduino.cc/en/uploads/Main/BreadboardSolidWire.pdf
Easy-to-assemble wooden base https://store.arduino.cc/product/FB00001?language=en
9v battery snap https://www.arduino.cc/documents/datasheets/9vBatterySnap.PDF
Phototransistor https://www.arduino.cc/documents/datasheets/HW5P-1.pdf
Potentiometer 10kOhms https://www.arduino.cc/documents/datasheets/Potentiometer.PDF
Pushbuttons https://www.arduino.cc/documents/datasheets/Button.pdf
Temperature sensor [TMP36] https://www.arduino.cc/en/uploads/Main/TemperatureSensor.pdf
Tilt sensor https://www.arduino.cc/documents/datasheets/TiltSensor.PDF
alphanumeric LCD (16x2 characters) https://www.arduino.cc/documents/datasheets/LCDscreen.PDF
LED (bright white) https://www.arduino.cc/documents/datasheets/LED(white).pdf
LED (RGB) https://www.arduino.cc/documents/datasheets/LED(RGB).pdf
LEDs (red) https://www.arduino.cc/documents/datasheets/LED(red).pdf
LEDs (green) https://www.arduino.cc/documents/datasheets/Leds(Green).pdf
LEDs (yellow) https://www.arduino.cc/documents/datasheets/LEDY-L-7113YT.pdf
LEDs (blue) https://www.arduino.cc/documents/datasheets/LED(blue).pdf
Small DC motor 6/9V https://www.arduino.cc/documents/datasheets/DCmotor.PDF
 Small servo motor https://www.arduino.cc/documents/datasheets/servoMotor.PDF
Piezo capsule [PKM17EPP-4001-B0]https://www.arduino.cc/documents/datasheets/piezoCapsule.pdf
H-bridge motor driver [L293D]     https://www.arduino.cc/documents/datasheets/H-bridge_motor_driver.PDF
Optocouplers [4N35] https://www.arduino.cc/documents/datasheets/Optocouplers.pdf
Mosfet transistors [IRF520] https://www.arduino.cc/documents/datasheets/MosfetTransistor.pdf
Capacitors 100uF                 https://www.arduino.cc/documents/datasheets/cap100uF.pdf
Diodes [1N4007]         https://www.arduino.cc/documents/datasheets/Diodes.pdf
Male pins strip (40x1)         https://www.arduino.cc/documents/datasheets/Strip40x1.pdf
Resistors 220 Ohms https://www.arduino.cc/documents/datasheets/Resistors.pdf
Resistors 560 Ohms https://www.arduino.cc/documents/datasheets/Resistors.pdf
Resistors 1 kOhms         https://www.arduino.cc/documents/datasheets/Resistors.pdf
Resistors 4.7 kOhms https://www.arduino.cc/documents/datasheets/Resistors.pdf
Resistors 10 kOhms https://www.arduino.cc/documents/datasheets/Resistors.pdf
Resistors 1 MOhms https://www.arduino.cc/documents/datasheets/Resistors.pdf
Resistors 10 MOhms https://www.arduino.cc/documents/datasheets/Resistors.pdf

Friday 17 March 2017

Arduino Starter Kit - Project 3 - Lover-O-Meter

Analogue Project with Temperature Sensor

A video tutorial is available on YouTube and also an Instructables tutorial.
Instructables has a tutorial on "How to Use the TMP36 Temp Sensor"



The Low Voltage Temperature Sensor specification describes from an engineering perspective the sensor  physical parameters. The particular variety supplied is the TMP 36 although on the device it says TMP36GZ. The TMP35, TMP36, and TMP37 are low voltage, precision centigrade temperature sensors. They provide a voltage output that is linearly proportional to the Celsius (Centigrade) temperature. The TMP35/TMP36/TMP37 do not require any external calibration to provide typical accuracies of ±1°C at +25°C and ±2°C over the –40°C to +125°C temperature range.

The TMP36 is specified from –40°C to +125°C, provides a 750 mV output at 25°C, and operates to +125°C from a single 2.7 V supply.

Building

With Autodesk Circuits I had some difficult after the circuit was tested/ I could not move one of the diodes and I lost a diode connection.

Here are the Fritzing breadboard and schema.







Results

  • Manage to burn my finger badly, plugged the sensor in the wrong way round! But after that it worked well. Surprised it did not blow the sensor.
  • Surprisingly simple to code these controllers and additionally how simple and functional the sensors are.

Thursday 16 March 2017

Arduino Starter Kit - Project 2 - Spaceship Interface

Spaceship Interface

The  Youtube video by Massimo Banzi, one of the Co-Founders of Arduino, introduces the Spaceship Interface


Building

I built the circuit first based on the Arduino Starter Kit Project 2. The completed board is shown below. This time I transferred Project2 circuit into Autodesk Circuits to simulate and test it. Project2 in Autodesk Circuits can be seen in on YouTube.

The Constructed Breadboard

Constructed in Autodesk Circuits

Breadboard and Schema through Fritzing

Project 2 - Breadboard in Fritzing

Project 2 - Schema in Fritzing

Code

int switchState = LOW;
const int greenLED = 3;
const int redLED1 = 4;
const int redLED2 = 5;

const int waitTime = 2000;  // ms

//configures the digital pins
void setup() {
  pinMode(greenLED, OUTPUT);
  pinMode(redLED1, OUTPUT);
  pinMode(redLED2, OUTPUT);
  pinMode(2, INPUT);
}

//Checks the voltageo of the digital input and chooses the pin for voltage ( pin 2 )
void loop() {
  switchState = digitalRead(2);

  if (switchState == LOW) {
    //Button is not pressed

    digitalWrite(greenLED, HIGH); //Green LED
    digitalWrite(redLED1, LOW); //Red LED
    digitalWrite(redLED2, LOW); //red LED
  }

  else { //the button is pressed
    digitalWrite(greenLED, LOW);
    digitalWrite(redLED1, LOW);
    digitalWrite(redLED2, HIGH);

    delay(2000); //wait for a quarter second
    //toggle the LEDs
    digitalWrite(redLED1, HIGH);
    digitalWrite(redLED2, LOW);
    delay(2000); //wait for a quarter second
  }
} //go back to the beginning of the loop

Results


The circuit worked and the LED lit as predicted.

  • Voltage drop across green diode 1.99V
  • Voltage drop across green LED resistor 1.94V
  • Voltage drop across red LED resistor 1.99V

Monday 13 March 2017

Arduino Starter Kit - Project 1 - Get to know your tools

Get to know your tools

The components in the kit. See technical specification.

This easy project uses the Arduino UNO as its source of power for its source of voltage.(5V). I will try this with a power supply that  provides the 5V. Unsure about this as a lot of pundits say I will have to smooth the voltage with a regulator and capacitor. I could blow the components but they are not the most expensive. 

I did test the power supply as described in Understanding DC Power Supplies by 
ITP Physical Computing.  The advice given is
If the voltage showing on your multimeter is more than half a volt or a volt off its rating, then you most likely have what is called an unregulated power supply
The power supply I used read 5.1V but I do not know if the supply is regulated. This was also a useful introduction on how to use a multimeter.

It was interesting to find out how a barrel jack worked as well.

The Get to know your tools Youtube video complements project 1.

Building

  • Strangely I thought the supplied jumpers would be somehow related to the power codings on the board. They are colour coded by length. This is a good case for cutting lengths to follow colour coding rules for the circuit.
  • Its really fiddly to place the components onto the breadboard. 
  • Do not know whether to cut the resistor wires to fit snugly on the breadboard.


Breadboard and Schema through Fritzing

This is by first attempt at Fritzing. It took me a long time to generate these pretty rough diagrams but I will keep working at it.



Results

The circuit worked and the LED lit as predicted.

  • Voltage drop across diode 2.2V
  • Voltage drop across resistor 3.15V
  • Voltage drop across circuit 5.19V

Arduino Project book version

I wired up the version as was in the book. This was much easier to do as there was no jack connector on the board and the 5V supply on the UNO was used.


Project 1 Series Switches

Series Switch in operation


Breadboard Circuit 


Schematics 

Autodesk Circuits

I also found  prototyping  software for board simulation, it is called AutoDesk circuits. I simulated the board above with the board above with two serial switches. A small introduction is given on YouTube. 

Sunday 12 March 2017

Arduino Starter Kit

This post will address the success and failures of learning electronics through the Arduino Starter Kit. It is amazingly well produced with a well written project book although the font is quite small for my old eyes.

I have found a book on-line that contains all the projects and is a copy of the project book



Initially I put together the wooden base without much problem and setup  the Arduino IDE. The Arduino guide is very useful and complements the Arduino project book very well.  The project book refers to old versions of windows software but the online guide is up to date and the download and windows installation is complete with all required drivers.

All of the links in the project book referred to the old style link arduino.org and not arduino.cc. Most are wrong. Here is a list of those that I have found.

I found on the Foundations and More page a link to on the Tutorials homepage  to 

ITP Physical Computing a site that is very useful for finding basic useful information on all aspects of electronics with very interesting videos as well. Some really interesting things to read are:



The Youtube Arduino Starter Kit tutorials are a useful complement to the project book

Complementary vimeo on the basics of Arduino LEDs, switches, resistors and pull ups.

Techniques