Wednesday, May 18, 2016

EE Project: Arduino Project Videos and Specifications Sheets

Two of the deliverables that students need to submit during the course of my Electrical Engineering robotics project are Arduino project videos and what I'm calling a "specifications sheet."

The Arduino project video involves them finding a pre-existing project - from the Make Arduino text that they have or the Sparkfun Inventor's Kit book or the Parallax Robot kit's materials or anywhere else - for the Arduino that they think might have some relevance for their robot build, to build it, then to modify it in some way to change its behavior, then to present a short Youtube video explaining the process and its relevance, and providing the commented code in the video description.

These have gone really well; the students haven't had training in coding for the Arduino, but they're fine with the electrical assembly issues, so it's a platform for them to modify code and hardware, which leads to them unpacking some of the working of the scripts. Lots of the projects have combined two functions, which is terrific. For example, several groups took sensor input and used it to output status messages to an LCD.

Here's one example using the LCD and a pushbutton:

...and here's one using the LCD and a photocell, complete with director extras.

The specifications sheet is like a datasheet for the robot. One of my goals is to get students to the point where they can read and use a datasheet, because it's ridiculous to think that they could ever learn all of the devices that they might encounter in their projects after this course. Instead, I want to train them to use the resources at their disposal - Stack Exchange, online tutorials, datasheets, etc. - and learn how to learn to use a new device, software package, or programming language.

These came in with varying levels of success, and I think that I can be more specific with these next year (though they can revise them this year to address any lack of specificity). The one below is a pretty good example, though I wanted some more detail on the values fed to the servos - what do those numbers mean? What's PWM, and how does it work? It's a great start, though.

Pin A0 - photocell
Gives a number value and identified as “pcellreading”
When the light value reads 250 or lower, the car will stop
Pin A1 - ultrasonic sensor
Need to wire sensor and input code
Will give number value and identified as “ultrareading”
Pin 7 - right whisker
Equal 0 when the right  whisker is touching something
identified as “wRight”
Pin 5 - left whisker
Equal 0 when the left  whisker is touching something
identified as “wLeft”
Pin 13 -left servo wheel (input of 200 means the amount of continuous pulses are being generated) (can be anything from 1-250) (corresponds to amount of time spent rotating the wheel)
Pin 12 - right servo wheel (input of 200 means the amount of continuous pulses are being generated) (can be anything from 1-250) (corresponds to amount of time spent rotating the wheel)
Backs up and turns left 120 degrees
If pcellreading>650 & wLeft=0 & wRight=0
Or if ultrareading>6
Backs up and turn right 60 degrees
If pcellreading>650 & wLeft=0
Back up and turns left 60 degrees
If pcellreading>650 & wRight=0
Moves forward
If pcellreading>650
Stop moving and it has reached the goal
If pcellreading<650 br="">Expected exceptions:
Car goes up ramp at angle so that one wheel goes over the edge before the ultrasonic sensor detects the cliff edge
It gets stuck in a corner area so that it keeps hitting the 2 wall in front of it without turning around

No comments:

Post a Comment