Arduino at the Crucible
Important Announcements
Reminder:We are extending our class hours to make up for a missing class:
November 13 – Class from 10-2
November 20: Class from 10-2
November 27: No class, Thanksgiving
December 4: Class from 10-2 (last class)
References
- Schematic for your Arduino
- Arduino website
- Sparkfun, Adafruit, Jameco
- Recommended tutorials are at adafruit, arduino, sparkfun, todd kirt, tronix stuff (links coming)
Week 1
- Introduction
- Arduino IDE installation
- First program with IDE
- Introduction to programming
- time permitting, 4 basic interfaces
Homework:
- Research Arduino projects online and bring to class 5 that inspire you
- Review this tutorial for the Blink sketch that we did in class
- Try this tutorial which will teach you how to control the brightness of an LED. Substitute the 470 Ohm resistor I gave you in place of the 220 Ohm they quote.
Replies to questions that came up in class (links will be added soon):
- One of you is interested in creating objects that respond to motion. By this I assume you mean motion of someone in front of the piece.
Before we get into the specifics of motion sensing, you should be aware that almost all sensors are not 100% reliable, that is, sometimes they miss something they are supposed to detect (“false negative”), and sometimes they mistakenly sense something that didn’t really happen (“false positive”). Motion sensors certainly exhibit both of these conditions. If your project can tolerate or even benefit from a certain amount of random behaviour, this is not an issue. If on the other hand this would be a problem, there are a variety of techniques to reduce these errors, such as more complicated software (for instance, a 1 second blip in an otherwise empty room is probably an error) or using multiple sensors to corroborate data.
There are basically 3 official (and one unofficial) way of detecting motion: - Passive InfraRed (PIR) motion sensor: This is the type of motion sensor used in burglar alarms. They tend to have a rather wide range and a they don’t tell you how far the person is, only that someone is or is not moving. They are tuned to detect motion and not presence, so if your viewer stands still the sensor will stop seeing them.
- Infrared Distance Measuring sensors: This sensor is designed to measure the distance to any object in front of it. It has a very narrow beam (like a laser pointer) and thus will miss something that is standing just to the side. They are available in different ranges
- Ultrasonic Distance Measuring sensors: Like the IR distance measuring sensors, but with a much wider field of vision, like a wide cone. Will report the distance to the nearest object in its field of vision.
- The unofficial sensor is the ubiquitous and very inexpensive light sensor. As we will learn in class, these are very sensitive to any variations in light, so that a person walking in front of a piece can not avoid being detected. There is not information about distance or motion, just that something has changed. Of course if the lights change or the sun goes down this is also detected. Nonetheless, in my experience this sensor is often the best choice
- Another of you wanted to drive many LEDs. We’ll talk more in class, but you might want to visit the Tronixstuff tutorials and read #40a – “More Digital I/O”. It’s a pin extender, MCP23017, that gives you 16 more pins. You can cascade as many as you need. Use your original idea of 1 pin high and 1 pin low. Both pins low = off. The MCP23017 is byte addressable so you can turn on off 4 LEDs at a time if necessary.
Week 2
- Homework: Did you do any/all of the 4 basic interfaces
- Review:
- Basic electronics
- Basic microcontrollers
- Basic programming
- Lecture:
- electromagnetism and motors (very briefly)
- Lab: stepper motorThis lab is an exercise in using on line resources to connect a stepper motor and driver to Arduino. Resources:
- Discussion of lab:
- Why do we need ULN2003
- Programming concepts
- Further topics:
- Further IO and sensors
- Serial communications
- Intermediate programming concept
Week 3
- Sensors
- Review the schematic of RBB
- Current limit and review need for ULN2003
- Communication with computer
- Motors
- Review PM, BLDC, stepper
- Servo
- AC: reversable, non-reversable, capacitor (can’t control directly from Arduino)
- Relays
- Further programming concepts: Blink without Delay
Lab choices:
- Servo motor (challenge: pair of switches to control direction)
- Transistor to control high current light
- Graph or bouncing ball
- Other sensor
- Relay
- Speake
Homework
- A really great tutorial on microcontrollers in general, with strong references to Arduino
- Excellent series of Arduino tutorials, 40 tutorials at last count
November 6, 2011 at 8:16 am |
I think adding another hour to the classes would work out quite well! My volunteer shift starts then, so I’m going to be around anyway, and it seems to be quite flexible! I’m for the idea.