Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page will be populated with all exercises given in the class. Use it as a reference for compiling your documentation 

...

Exercise 1.1: Electricity 

Image Added

Using some of the following materials shown, create a circuit that lights up the LED. Photograph your outcome and draw a schematic. Here's an Image of the material to help find them.

  • Tactile switch
  • Jumper wires
  • Breadboard
  • LED (red) 
  • Resistors 
  • 9-volt battery
  • 9-volt battery holder

circuit with an LED that can be switched on and off.


Exercise 1.2:

...

Install the Arduino IDE and find the "Blink" sketch in examples. Expand the example to sequence three external LEDs with appropriate resistors. 

Exercise 1.3: Digital Input

...

Electricity 

Image Added

Add another LED to your circuit from exercise 1.1, that can be controlled by it’s own button.


Exercise 2.1:

...

Using the "Button" Sketch again, modify the code so that one press turns one LED on, and another press turns one LED off. 

...

Arduino Blinky 

Image Added

Connect an LED and Resistor (150 ohm) to your Arduino to GND and Pin 11 using your breadboard. Code it to blink using the examples.

Exercise 2.2:

...

Use a potentiometer to control the speed of a flashing LED. 

Exercise 2.3: Analog Sensor PWM 

Use a circuit with a photoresistor to control the brightness of an LED. 

...

Reuse the previous circuit and modify your code to get your values over the serial terminal. Use a moving average algorithm or a weighted moving average algorithm to smooth out the values.

Exercise 2.5: Soldering

Solder your own micro-interaction ball. Don't forget to draw a schematic of the circuit from the PCB. 

Exercise 3.1 Transistors 

Use a transistor to control a small motor with the Arduino. Hook up a suitable input component to control the motor. 

Exercise 3.2 Servo Motors  

Exercise 3.2: Integrated Circuit

a) In the first part, try to understand how an H-Bridge IC works and find the data-sheet for your specific component in the box. Then draw a simple wiring schematics of an H-Bridge circuit to drive one motor with an Arduino. You can draw it by hand, in a tool of your choice or create a tinker circuit at https://www.tinkercad.com/circuits/.

Hint: The L293D H-Bridge in TinkerCad shares the same pin-mapping with the SN754410.

b) Implement the code for the Arduino to control the motor. It should be possible to start and stop the motor and to control the drive direction through a button click. After implementing these basics methods, think about how it is possible to control the motor speed with the H-Bridge.

Exercise 3.3: Arduino & Processing

In the last exercise, you learned how to control a direct current motor with an H-Bridge IC. To further work on this project without the need for an actual motor, it would be great to have a visual representation of the motor state.
Send the motor state (speed, direction) through Serial to a Processing application. The Processing receives these parameters and visualizes the state of the motor, which could look like the following image:

Image Removed

In the beginning, it is ok just to display text which represents the motor state.

Advanced Task: Try to send commands back to the Arduino and control the motor if the user presses a key on the keyboard.

Exercise 4.1: Digital Components 

a) Connect the Ultrasonic Distance Sensor and read distances with the help of the NewPing library. Log the distances to the Serial Monitor.

b) Add the NeoPixel LEDs to the circuit and display the current distance on them.

...

More Blinkys 

Image Added

Connect two more LED and Resistors to your Arduino. Code it to blink a sequence on all LED.


Exercise 3.1: Voltage Divider 

Image Added

Assembly the circuit with resistors of two different values. Try calculating the voltage between your resistors, and check with the multimeter if it’s correct.


Exercise 3.2: Light Sensor

Image Added

Build a circuit and code it to turn on an LED when it gets dark using a Photoresistor.

Optional: code it so the LED fades smoothly between dark and light states. 


Exercise 3.3: Reverse Parking helper

Image Added

Using the VCNL 4040, build a circuit with at least 3 led’s and code it show proximity level (i.e as an object moves closer, more led’s turn on) 

Alternative: Operate a motor so it “reverses” itself until it is too close to an object.


Exercise 5.0: Sensor visualizer

Image Added

Create a visual output on your computer from one sensor, using Arduino and Processing.

Steps:

  1. Using one of the sensors you have been provided, research on how to correctly connect up the sensor, install a library and get a basic example up and running. 
  2. Output at least one value from the sensor over serial, and interpret that information in a visual form using processing. 

What if I can't get either of my sensors to work? Use the VCNL4040 that you already used in the exercise 3.3. 


Exercise 7.1:

Build a stopwatch with the smart servo and two buttons.

The movement of servo indicates the seconds elapsed. 

Clicking the first button starts and stops the stopwatch. The 2nd button resets the stopwatch.

TIP: Use the millis() function to find the elapsed time.

Possible Solution


Exercise 7.2: 

Develop an interactive device, taking inputs from one sensor and providing a physical output such as lights or movement. 


Sound (Buzzer or Loudspeaker)Movement (Motor, Solenoid, Servo) Light (LED, neopixel, lightbulb, laser)Tactile (vibration motor, actuator, Peltier element)Graphic Display (OLED, LCD, 7 segments, Printer, laptop screen with Processing) 
Sound (microphone, piezo)  




Movement (distance, motion, gesture, gyro, pressure, flex sensor)




Atmospheric (Temperature, humidity, air quality, pressure)




Bio-sensor (Pulse, GSR, EMG) 






Light (colour, luminance, IR) 




Touch (buttons, pressure, capacitance)