Saturday, October 16, 2010
IFI Field Trip
What happened today was an absolutely wonderful field trip to Innovation First International (IFI) in Greenville, Texas. IFI has multiple product lines at the World Headquarters in Greenville: Rack Solutions that designs and produces custom solutions for rack mount problems, HEXBUG and the VEX robotics platform. As a member of the DPRG field trip to IFI, we were most interested in the VEX line, but I would be remiss if I did not mention that they apply rapid prototyping to their development; extremely rapid prototyping that can shut down production equipment for a special run on the prototype for development. They also produce toys in the HEXBUG line that they conceive and develop in a month or so and then send the product overseas for tooling setup.
The VEX line is primarily focused on education; robotics education, that is. It's a terrific teaching tool that has roots in E-Systems and Erector sets. What has come out is an extremely flexible system of engineering a robot (or robots) that can be developed by a middle-school student.
IFI was extremely generous with their time and their products during our visit. They took the time to answer all of our questions and provided us with a guided tour of the entire facility. Before we left, those that were interested were allowed to take home Cortex and ProtoBot bundles.
I will be blogging here on the use of the Arduino with the ProtoBot. IFI has asked that we provide feedback to them if we take a VEX product with us. That's a deal that is hard to beat.
So, hats off to Bob and the gang at IFI- thank you for hosting us and providing a tour of your facility! It is my hope that IFI and DPRG will have a long history together.
Sunday, September 12, 2010
Still alive and well
Thank you for your patience!
Sunday, May 16, 2010
More Arduino Reading Optical
http://roamingdrone.wordpress.com/2008/11/13/arduino-and-the-taos-tsl230r-light-sensor-getting-started/
I will probably use the code as-is. It handles this device as an interrupt process, and handling interrupts was an intention of the class.
I have this mystery phototransistor from Tanners. No datasheed can be found by several people working on int and Tanners sells the item "No data". It looks like a TO-18 case with a glass top, so I will assume that the connections are the same. It has a base pin, it would seem, which I thought was odd as I thought that that base was controlled by light. I have several, so I will experiment with a few, but I'm not sure how I will know if I have destroyed one or not. I think I may skip this one for another day and leave it out of the class.
----- Code 4 You -------
/*
IR1
*
detects moving infrared with PIR. Upon sensing, checks light level with Light Dependent Resistor (Cadmium photocell) and then uses infrared rangefinding to determine range of object.
*/
int IRrangePin = 0; // select the input pin for the potentiometer
int inPin = 1; // select pin for IR detector (analog)
int LRpin = 2; //select analog pin for LDR
int ledPin1 = 13; // select the pin for the LED
int ledPin2 = 12; // second led
int ledPin3 = 11; // third led
int val = 0; // variable to store the value coming from the sensor
int dval = 0; // variable to store valud from IR detect
int Lval = 0; // Variable for use with LDR
int NewVal = 0; // Work variable
void setup() {
Serial.begin(9600);
Serial.println("Setup. ");
pinMode(ledPin1, OUTPUT); // declare the ledPin1 as an OUTPUT
pinMode(ledPin2, OUTPUT); // declare the ledPin2 as an OUTPUT
pinMode(ledPin3, OUTPUT); // declare the ledPin3 as an OUTPUT
pinMode(inPin, INPUT); // declare the Infrared detect pin as an INPUT
pinMode(LRpin, INPUT); // declare teh LDR pin as an INPUT
digitalWrite(ledPin3, LOW); // full on
}
void loop() {
dval=LOW;
detect();
val = analogRead(IRrangePin); // read the value from the sensor
/*
Serial.print("Proximity: "); Serial.println(val);
digitalWrite(ledPin1, HIGH); // turn the ledPin on
delay(val); // stop the program for some time
digitalWrite(ledPin1, LOW); // turn the ledPin off
*/
delay(val); // stop the program for some time
}
void detect()
{
delay(100);
dval = analogRead(inPin); // read input from IR detector
//Serial.print(dval);
if (dval>0)
{
Serial.println();
Serial.print(" Detection >YES. ");
digitalWrite(ledPin2, HIGH); // turn the ledPin on
LDR();
findRange();
}
if (dval<=0)
{
Serial.print(".");
digitalWrite(ledPin2, LOW); // turn the ledPin off
}
delay(200);
}
void LDR(){
Lval = analogRead(LRpin);
Serial.print(" LDR: "); Serial.print(Lval); Serial.print(" ");
analogWrite(ledPin3,(75+Lval));
delay(100);
}
void findRange(){
val = analogRead(IRrangePin); // read the value from the sensor
NewVal = val/100;
Serial.print("Proximity: "); Serial.print(val);
switch (NewVal) {
case 0:
//far away
Serial.print(" Too far. ");
break;
// break is optional
case 1:
//do something when var == 1
Serial.print(" Zone 1. ");
break;
case 2:
//do something when var == 2
Serial.print(" Zone 2. ");
break;
case 3:
//do something when var == 3
Serial.print(" Zone 3. ");
break;
case 4:
//do something when var == 4
Serial.print(" Zone 4. ");
break;
case 5:
//do something when var == 5
Serial.print(" Zone 5. ");
break;
case 6:
//do something when var == 6
Serial.print(" Zone 6. ");
break;
case 7:
//do something when var == 7
Serial.print(" Zone 7. ");
break;
default:
// if nothing else matches, do the default
// default is optional
Serial.print(" Unknown. ");
}
Serial.println();
digitalWrite(ledPin1, HIGH); // turn the ledPin on
delay(val); // stop the program for some time
digitalWrite(ledPin1, LOW); // turn the ledPin off
delay(val); // stop the program for some time
}
Tuesday, May 11, 2010
Arduino Reading Optical
Reading Optical
Many optical devices are analog and not digital. The task is often to convert the response of the analog device into a more-or-less digital response. In the application of the analog devices in this segment, the analog pins on the Arduino chip will be used. Pins 0, 1 and 2 will be used. The analog pins on the Arduino read the input voltage from the device and convert into a numeric value.
The Arduino reference manual states, “This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit.”
Note that the voltages are still between 0 and 5 volts. Be careful not to fry your Arduino.
The numeric values from the analog pins may then be tested and branched using ranges of values and a case statement; an “if” structure will also work. Synthesizing digital action from an analog device merely means that the voltage has crossed a certain threshold; the number returned from the pin has passed a certain value and a test becomes true of false accordingly.
Goal
Instruct the student on input sensors- light (including optical encoder), switches and potentiometer. Optical encoders and switches are the “more binary” devices in the group; other items are “more analog”
Prerequisites
No prerequisites beyond the basic Breadboard Arduino class. These programs cover new material for this class and do not build on previous material.
Method
Cover analog versus digital input. Reiterate voltage capacities of the Arduino (0-5 volts). More information is available through the serial output than with LEDs in this segment.
Notes
There are multiple circuits on this board. Neither takes up much breadboard space or pins on the Arduino. If the infrared rangefinder is the Sharp brand, then a connector will most likely need to be built. In this case, a three pin, 0.10 inch pitch header pin was soldered to the end of the special pigtail for the sensing unit. After soldering, insulation and stability were needed, so a blob of hot-melt glue was added to the header pin.
The Parallax PIR unit, without a pigtail will only fit on the corner of the board due to I/O pin placement and jumper pin placement. A couple of ling wires are needed to connect to the Arduino. Other components are fairly straightforward.
The programs have some serial output to be displayed on the computer monitor. Power indicators may be left off.
The Class
Optical sensors are sensitive to light. Infrared (IR) has been grouped into this segment as it is looked at as both heat and light. It is light that cannot be seen with the naked eye, but certain electronic devices are sensitive to it. The remote control for your television is an IR device. For some reason, cameras on cell phones are sensitive to IR light. If you aim your TV remote at your cell phone camera, you will be able to see the light produced by the remote. There is more going on than just an IR flashlight, but at least you can verify that the batteries are not dead.
In this class, there are three devices- a simple photo resistor that passes power as a function of the amount of light striking it. This particular device is translucent and as such, is also sensitive to some of the light striking the back of the device. As more light strikes the surface, the resistance lowers. When the resistance lowers, more voltage appears on the Arduino analog pin and the Arduino returns a higher numerical value.
The infrared rangefinder uses reflected infrared light to determine range up to about 50 inches. Since it is using light, it is also susceptible to interference- things that would also get in the way of visible light. It is also sensitive to the color of the reflective surface. If sensing people, different colored clothing will yield different responses. It is not an exact science.
The Passive Infrared (PIR) device works the same way as the motion detector lights that light your driveway when someone walks by. It has a series of Fresnel lenses over an IR-sensitive device. When the device senses IR moving from one lens to another, a signal is produced. This device is also sensitive to distance. This particular PIR is a Parallax device designed for hobbyists.
Monday, May 10, 2010
Package from Sparkfun redux
So, the big lesson here is that Sparfun made a boo-boo. Hey- it happens. The important thing is that they corrected the situation in a timely manner. When you next need electronic components- how about checking http://www.sparkfun.com/ first?
I should get back to work.
Monday, May 3, 2010
Arduino Light Dependent Resistor
The easiest approach is to take the value returned from the LDR and feed it into an analogWrite command and use PWM to alter the brightness of the LED. Doing this directly would normally dim the LED as the light was dimmed. The LED was reversed and now operates as the inverse of the value read from the LDR. That is, as the light dims, the LDR returns a lower value, that value is fed into the analogWrite command and as the value drops, the LED gets brighter. Quick, easy, effective.
Here is the code in action:
Here is the board in action:
Sunday, May 2, 2010
Arduino Infrared
Nothing from Sparkfun yet, but weekend delivery was not expected- They need time to respond. So the next best thing was to borrow an Arduino off another board and get moving again.
The current project is an optical board with Arduino. Starting with infrared which may not actually be classified as optical, but it will be for this board. Passive Infrared (PIR) coupled with an infrared rangefinder makes sort of a neat human detector (or dog, cat, rats, what-have-you). Currently, the two items operate independently, but the code will be changed to let the PIR drive. If a heat source is sensed, then the rangefinder will be engaged. Perhaps. There are other approaches.
For your viewing pleasure, here is a picture of the board so far. It's a little blurry, but you should be able to get the point.
More news as it happens.
Friday, April 30, 2010
Another Sparkfun Response
While I am composing the last post, this email comes in (I left off the email headerinformation because it was a pain to post as it kept gagging the HTML):
Hello Bruce,
Our returns department finished testing the ATmega328s you returned to us, and found that they had somehow made it out without the Arduino Bootloader having been loaded. I have placed a new order, # 21xxxx, which contains five ATmega328, DEV-09217.
Please let me know if I can help with anything else, and have a great day!
Best,
L (Sparkfun rep name)
Customer Service
SparkFun Electronics
Now- I have not yet returned anything, but they have tested them. I think I will wait and see what comes in the mail. Sparkfun may be experiencing growing pains- that's OK; it happens. Let's see how they handle it. I believe they will make everything right, it just may take another pass at the problem to get there.
Sparkfun Response
Subject: Re: [FWD: SparkFun Order 21xxxx]
From: Tech Support
Date: Fri, April 30, 2010 10:16 am
To: "Your Host"
Hi Bruce,
I talked to customer service, they should be sending you out 5 replacement ATMega328s with the bootloader and a return label for the 5 unprogrammed ones. Sorry for the inconvenience this has caused.
Thanks,
P (Sparkfun rep name)
Monday, April 26, 2010
Sent to Sparkfun
Date: Mon, April 26, 2010 11:39 pm
To: customerservice@sparkfun.com
Good day.
I received my latest order from Sparkfun. I had some spark, but unfortunately, no fun.
On my previous order, I received Arduino 328 chips. All were marked with a red dot but one. I had my doubts, so I reserved it. When attempting a project with the unmarked chip, it would not load. OK, I still needed some more Arduino chips, so I ordered four more- Order 2xxxxx. I received the four chips I ordered, but none were marked. I removed one from the package and tested it- it would not load.
Here is what I did to test:
1) Took a known good circuit and removed the Arduino
2) Installed the unmarked Arduino
3) Recompiled the code
4) Attempted to download
5) Received the following error:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
6) Powered down
7) reinstalled the known good chip
8) Powered up, recompiled code
9) Downloaded code
10) Code executed as expected
I think none of these chips has the Arduino bootloader loaded on, even though my packing list has a certification of compliance signed by the Customer Service Manager. What do you think?
I am attempting to write a class using Arduino chips, but that is rather difficult when they are not the correctly configured chip and my deadlines are slipping. I now have 5 chips that are not what I purchased. What can you do to rectify this situation?
Sincerely,
Testing the Unknown
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
Looks like my backup chip really is not an Arduino.
Neither are the chips in the new order.
I took a known good circuit with a known good Arduino in it, removed the Arduino and replaced it with an unmarked chip. I recompiled the code and tried to download it. I received the error above. I powered down, swapped the known good chip back in, powered up, recompiled, loaded to the chip and the program ran as expected.
Time to contact Sparkfun.
Package from Sparkfun
I am hopeful that I can start on the Arduino project again- I have ideas and need to implement them!
Slightly out-of-focus pictures below tell the story better.
Saturday, April 24, 2010
Anticipation
Saturday, April 17, 2010
Good day at The Generator
The Arduino appeared in a rare, shared-power configuration. The Cylon board already had a voltage regulator on it, the Ping did not. These particular boards will snap together, so they were shapped and a jumper was run between the positive and negative 5-volt buses on each board. It would have looked great with the switching board in the middle, but that was not to be today.
Friday, April 9, 2010
RBNO
Tuesday night was a productive night at Robot Builders Night Out (RBNO), a weekly gathering of DPRG (Dallas Personal Robotics Group http://www.dprg.org/ ) members. I finished a basic Arduino breadboard for the next class session. The next task is to see how much junk I can cram onto this board. It is sitting in front of me and the only additions are the USB to TTL converter and a phototransistor.
There have only been minimal changes made to the class, so there isn't much to report there.
Hopefully, I can make some progress this weekend and have more to report to you.
Monday, April 5, 2010
Arduino Project Checkpoint
What I will do is share the table of contents with you. I know, it isn't much, but you can get a feel for how things are progressing. The section on reading input has not been started yet. I need to build the board, write the class and the programs.
If you happen to be within the reach of the Dallas Personal Robotics Group (http://www.dprg.org/), then please consider taking the introductory class and getting that under your belt. If you happen to BE a DPRG member, so much the better. If you are NOT YET a member of DPRG, visit the website and sign up! We do a lot of interesting things and have a lot of fun.
There are still a lot of detail items to complete before this class can be offered, but forward motion is being made; please have patience and the class should be available soon!
Remember- this is a DRAFT!
The Table of Contents is really tiny as that is the size I had to select to get the TOC to fit on the page. Go get your reading glasses and check it out.
Here is the Table of Contents:
Arduino Motor Control Breadboarding
Sunday, April 4, 2010
Arduino Using Ping ))) (tm)
The Class
Ping)))™
What is Ping? “Ping” is a networking term used to troubleshoot network issues. It sends out a request and times how long before the response. It is analogous to a sonar ping used in submarines where a sound (audible or inaudible) is sent out and the response is timed to determine the distance of objects in water.
This demonstration uses a product from Parallax.com that is also called “ping”. Ping ))) ™ to be exact.
From the Parallax website: The Ping sensor measures distance using sonar; an ultrasonic (well above human hearing) pulse is transmitted from the unit and distance-to-target is determined by measuring the time required for the echo return. Output from the PING))) sensor is a variable-width pulse that corresponds to the distance to the target.
Read the Wikipedia entry: http://en.wikipedia.org/wiki/Sonar
Using Sonar
The Arduino chip is used to measure the distance as sound travels at a generally predictable rate through air at given densities (generally associated with altitude). The variances aren’t beyond usable in hobby robots.
Arduino supplies some code with the development platform code that handles the Ping )))™ (heretofore called just “Ping”) does return distance based on time of signal return. For this demonstration, functionality was added:
a) Delta distance
b) Indicating delta distance
c) Indicating direction
Sonar may be made more useful if other data points are included. Because the distance is measured with sound, it is not precise. The more measurements that are taken, then generally, the better the data on distance. However, there has to be a stopping point somewhere. This demonstration code takes the average (mean) of 4 distance samples. A better determination might be made taking the modal values and discarding the rest. This will be left as an exercise.
Once an acceptable distance is measured, the value is kept until the next measurement is averaged. The two distances are compared and the Delta (finite forward difference) of the distance is taken. From the Delta, direction may be determined- if the distance is smaller, then the gap between Ping and the sensed object is closing. If the distance is greater, then the gap is increasing.
Since the time between samples is known, then the rate of Delta may also be determined. At this point the following items are known:
Two distances
The Delta of those two distances
The rate of Delta for those two distances
Once the above information is in-hand...
==============
I know, this is such a tease- remember that the document is still in draft status right now.
Enjoy!
Saturday, April 3, 2010
Arduio Motor Control CLASS
The Class
What is an H-bridge?
That’s a really good question. It is a device that allows voltage to be applied in either direction. The “H” is due to the graphical representation of the circuit used to control DC motor direction.
When controlling motors, especially drive motors, it is usually desirable to be able to not only control the motor speed with PWM, but to control the motor direction as well. To do that with a DC motor (the component used for this demonstration), one must reverse the polarity of the motor connections. Of course, this may be done with a relay, but a relay is not particularly advantageous for robotic control. One would like to be able to switch the motor direction at transistor speeds. It is possible to build a H-bridge with discreet components, but a low-cost H-bridges are available in DIP packages in such quantity that is makes more sense to try to find one of those to fit the project instead of “rolling your own”.
More information may be found on Wikipedia: http://en.wikipedia.org/wiki/H-bridge
This project uses the SN754410 Quadruple Half H-Driver. This particular unit was purchased from Sparkfun. It is a 16-pin DIP and will control two motors; 4.5 – 36 volts, one amp continuous rating. At this writing, Sparkfun offers the chip for $2.35.
The H-bridge has three distinct features that are interesting for this demonstration:
1) It can control two motors at significantly more power drain than the Arduino can
2) It is switchable at transistor speeds, direction AND speed; it supports PWM
3) It’s cheap
It also breadboards easily.
The way the H-bridge is controlled in this demonstration ...
And that is your tittilating tidbit for today. Enjoy!
Thursday, April 1, 2010
Nuts & Volts
Smiley also writes about Arduino novices and more experienced types. That is an important point to cover. The advanced Arduino course here is for the novice. Having fun is a big part of the course. Delving into the inner workings of the Arduino may indeed be fun for some, it is not typically an exercise for the novice.
In addition, Mr. Pardue is using a different development environment than this class will be using. Here is the environment for this Arduino class:
Monday, March 29, 2010
Arduino Project Mission, Goal and Scope
Advanced Arduino
Mission Statement
The mission of the Breadboard Arduino Project is to provide hands-on training with the Arduino micro controller with widely available and generally affordable components in a breadboard prototyping environment. In other words, Learn Arduino, Have Fun, On the Cheap.
Course Goal
The goal of this course is to provide the student with a working knowledge of Arduino features that are beyond the introductory course. It is intended to be a stepping stone on the student’s path to Arduino enlightenment.
Course Intent
The intent of this class is to provide the student with a handful of tools that should be helpful in developing robotic platforms using the Arduino platform. It is not intended to be the definitive course on use of the Arduino and does not delve into the architecture of the chip. Indeed, this class does not really exploit any particular feature of the Arduino, but will leave the student with the knowledge of how to interface the Arduino with other components and assemblies.
In addition, the intent of this class is to let the student experience working with the Arduino at minimal cost. Students are encouraged to shop for lowest prices on components and buy in bulk when it makes sense. This course is specifically intended to keep costs as low as possible. Arduino has a development platform called the Duemilanove (extra credit for pronouncing it correctly). It’s a dandy platform, but at this writing, Sparkfun carries it for $29.95 + S&H. For our purposes, it doesn’t do anything better than what the student built in the introduction to Arduino class. In addition, for the exercises, one would still need a breadboard and all the additional components. Also, with the breadboard class, prototyping another chip means swapping out the Arduino with another chip and rewiring components. That activity may be performed for the cost of the new chip.
Overall, this class provides hands-on education at a low cost with a development platform and components that are reusable with other micro controllers. And it’s fun!
Course Scope
The scope of this class is limited to breadboard prototyping of different robotic functions including
• Indicator lights
• Switching
• Motor control
• Sensor input
• Position
• Motion
In addition, the coding is limited to the Arduino development platform and the Arduino interpretation of the “C” programming language. Even though the Arduino is an Atmel ATMega 328 chip, the specific Atmel and AVR functionality will not be specifically covered. Coding at the assembler level will not be covered. Should you wish to teach those classes, your involvement will be heartily welcomed.
The particular Arduino used in the Breadboard Arduino series is the Atmel ATMega 328 chip in the 28P3 28 pin PDIP (Plastic Dual Inline Pin) package. This is generally affordable, readily available, easily handled by hobbyists and lends itself well to breadboard prototyping. Outside of this class, you are welcome and encouraged to explore other chips and packages.
Intended Audience
The intended audience for this class is students that have participated in the Introduction to Breadboarding Arduino class as delivered by Dale Wheat. This prerequisite class defines the foundation for this class, familiarizes the student with the Arduino chip and the student will have already built the breadboarded Arduino that is used as the base for each of the sessions in this class.
Saturday, March 27, 2010
More Arduino Motor Control Powered Up
The down side to all this is that I am running the chassis on the bench. I need to solve several mobility issues. The breadboard is a collection of wires that will not tolerate a crash. The battery is too big for the chassis. It does make a good demonstration nonetheless.
I think that is enough fun for one day. Church in the morning.
Arduino Motor Control Powered Up
I wired up the Arduino motor control to the Tyco machine and the little 9-volt was wheezing to spin the motors. Being the chairatable and cautious type, I used the 12-volt battery that I had lying around. Even though it's not at the top of its game, the 12-volt unit had sufficient power to run the Arduino board and the motors.
Thursday, March 25, 2010
Arduino Project Status
The mission of the course is: Learn Ardunio, Have Fun, On the Cheap. As a result, the GPS module of the class may be stripped. $75.00 is cheap for GPS, but probably not really cheap for this class. I think it would be interesting for another class. The Arduino may not be able to handle it, but I think it is worth the attempt.
Tuesday was DPRG night and also a board meeting. Ed (our beloved DPRG President) is doing a fine job of leading us forward. That also meant that I had some work to do in the DPRG arena as well. Board meetings are such a thrill. I think we may turn to Robert's Rules of Order for some assistance in organizing our meetings and making them more efficient. We worked through a lot of material the other night, but it took awhile. The agenda was a page and a half long. If we are to get through the material, we need to do it quickly and efficiently.
In Scouts, I was able to organize the PLC meetings where the young men were able to conduct their meetings efficiently and actually get things done. I am confident that adults are able to learn the same tricks just as effectively. It would be to our benefit to do so.
Saturday, March 20, 2010
The Beginning of the Arduino Project
Perhaps where you're at right now, Arduino-wise, you could help me map out my "advanced" class. Controlling servos, H-bridges, relays, etc. is one path I would like to do. What say you?
How could I resist? In my usual reserved and cautious manner, I pretty much bulldozed the project and took it over. Dale really has enough to do. I outlined the course and sent that information to Dale for perusal. Since then, I have been fleshing out the course, writing the… I hate to say “lecture” … portion of the class, writing the programs and wiring up breadboards with the class examples. If you are not already familiar with breadboard prototyping, Wikipedia has a very good explanation at this link: http://en.wikipedia.org/wiki/Breadboard Two of their examples make my boards look absolutely pristine.
In the introductory class, students built a breadboarded circuit using the Arduino and built a few projects. This class builds on that same breadboarded Arduino and continues forward. Students will build multiple projects on this breadboard, disassembling the current circuit in favor of the new. As an instructional tool, the boards for teaching must already be assembled to demonstrate a working model and a physical example of what the board should look like when completed. Well, more or less, anyway.
So, for each session in the class, I have assembled a breadboard to demonstrate all the lessons covered in that session. For the first session, Flashy, Winky, Blinky, Traverse, Fader, Fading Traverse and Cylon are all programs to be demonstrated (I will define these programs in a later post). Fortunately, one row of six LEDs is sufficient. I did have to add a push button to demonstrate all these functions in one program. The push button is beyond the scope of the first session, so the result is that we have the instructor’s board that is similar to, but not quite identical to the student board.
The second session on switching was a bit more challenging in that four distinct and independent functions are demonstrated on the board, requiring independent hardware. Once again, the demonstration mode runs all the programs, but this time, there is just a pause between programs. The programs demonstrate Arduino switching in the following forms:
· using a PN 2222A transistor to switch
· using a PN 2222A with PWM
· using a PN2222A to switch a relay
· using a MosFET to switch
· using a MosFET with PWM
That is really only three distinct circuits, but there is the addition of a voltage regulator in that the MosFET is used to switch a heavier, non-USB-5-volt supplied source. When not hooked up to the USB to TTL converter, a 12-volt battery runs the entire circuit.
The third board is more coherent in that the Arduino control of a single H-bridge (SN754410 Quadruple Half-H Driver) is the only demonstration. There is more wiring due to the manner in which each communicates. Once again, the voltage regulator is present. There will also be two motors involved with this project. I have to figure out a good demonstration for the motors that fit within the mission of the Breadborad Arduino project (simply, commonly available to all the students and cheap).
Board five is already built- it is the one that got me into this. It is a demonstration of the PING ))) ® ultrasonic transducer with the Arduino. That board is already too crowded to incorporate another project, so session three will have two instructor boards- one for other input handling (board four) and one board for ultrasonic sonar.
Pieces that have not yet been worked into the class are that push button mentioned above- yes, it’s a simple piece of hardware, but it requires some specific handling in the software, the voltage regulator that keeps popping up and a serial LCD screen. The LCD screen is perhaps a little pricey for the class, but it would be fun. All programs currently use serial output to the computer to communicate text. This limits the portability of each example in that the board must be tethered to the computer with a USB cable.
More updates as they happen.
Friday, March 19, 2010
More Arduino Motor Control
1) run wiring to the motors
2) add protective diodes
3) add power
4) write the program
After that, the class needs to be written. Most of the work will be done by then.
Additional features of the board are:
1) LEDs to indicate the motor direction so one can see how the power is directed to the motors
2) LEDs to indicate pinMode LOW when the motor is disabled
3) actually running two motors at the same time
This class will have less demonstrations on the same breadboard, but several things come together in this class. The students will be using PWM to control the H-bridge. The H-bridge is a solid-state device built expressly for motor control but can be driven like a MosFET.
The entire breadboard can be mounted to a 2-motor differential drive unit for demonstration. It would be good to have a method of securing the breadboard to the chassis.
More news later.
Wednesday, March 17, 2010
Arduino Motor Control
For some great content, my friend Dale sent me a treatise on PWM that explains it in simple terms. It will make a great addition to Class-1.
The remaining Arduino received from Sparkfun does not have the red marking that the other Arduino chips have. To test, it will be inserted into a known working circuit and a program will be loaded. If it works, it is merely missing the red mark. If it does not work, then perhaps it is missing the Arduino boot loader. That's what testing is for.
That is enough for tonight.
Tuesday, March 16, 2010
RBNO
These assembled breadboards do not travel well. There must be a better way to carry them around. Granted, that's not something one usually does with a prototyping board, but that is the current plan.
Monday, March 15, 2010
Prelude to Arduino
In process right now is the development of class utilizing the Arduino microcontroller. Before anyone points it out, there are others that are developing classes utilizing this same chip. This class is being developed by a person that has been building projects with this chip for almost a year. It is an easy to use chip and it’s a lot of fun building the projects.
The intent behind this class is to share. There are those that may be experiencing some difficulty or just don’t know how to proceed. After taking the class, then someone working with small robotic projects will have a set of tools and solutions that can be easily applied in that field.
There are multiple microcontroller products with the name “Arduino.” In this class, the term “Arduino” will refer to the Atmel ATMega 328 chip with an Arduino boot loader. The chip itself is used on a prototyping breadboard and not on one of the development platforms sold by Arduino such as the Arduino Duemilanove. It’s easier to pronounce if you speak Italian.
Much information about the Arduino can be found on the web.
Arduino maintains this site:
Much more is available and easily found.
The Arduino chips for this class were purchased from Sparkfun Electronics
(http://www.sparkfun.com/)
and are modestly priced. Breadboards were purchased from Marlin P. Jones & Assoc. Inc. (http://www.mpja.com/);
Breadboards and other electronics were purchased from Tanner Electronics in Carrollton, Texas (http://www.tannerelectronics.com/).
The current USB to TTL serial adapter is the USB BUB board from Modern Device (http://www.moderndevice.com/)
and is the most expensive item on the basic Arduino breadboard setup. This product may be changed in the future.
In addition, this class is built as an extension to the “Breadboard Arduino” class developed by Dale Wheat (http://blog.dalewheat.com/tag/arduino).
Prerequisites to this class are all in his class. If you have attended the introductory Breadboard Arduino class, then you have the base hardware and training needed for this class.
So, as far as the class goes, updates have been posted to Facebook, but will now be posted in this blog. There will probably be some information fed into one or two posts that gets the information caught up.
Saturday, March 13, 2010
Genesis
Please bookmark Z Axis Zero and visit often. Content will change on a sporadic basis at the beginning and become more regular as the dust settles on this new site.
Thanks for visiting!
-Your Host