We will be building line sensors and color sensors on Monday. Please bring some empty 12oz cans to use as test objects for your color sensors. I have included an updated design for the color sensor to use a single analog output that will only require on channel on the vex robot.
February 1, 2011
In the handout I describe using a pair of digital outputs to indicate the three possible outputs. Since the color sensor is slow, we can use a PWM output to generate a voltage proportional to the color. This means the sensor can be read using a single ADC input. The schematic below shows the small changes required to use the ADC. Note the 2.7K resistor and 1uF capacitor attached to pin 5 are approximate. These serve to smooth the pulses from the PWM output to an analog voltage. This is a standard technique to generate a varying voltage from a microprocessor.
high 1,2,3,4,5 ;Turn OFF all colors main: high 4 low 2 ;Turn ON Color 1 (RED) pause 100 readadc 0,b0 ;Store the Reflect RED Value pause 10 high 2 low 3 ;Turn ON Color 2 (GREEN) pause 100 readadc 0,b1 ;Store the Reflect GREEN Value pause 10 high 3 low 4 ;Turn ON Color 3 (BLUE) pause 100 readadc 0,b2 ;Store the Reflect BLUE Value pause 10 ;debug if b0 > b1 and b0 > b2 then RED if b1 > b0 and b1 > b2 then GREEN if b2 > b0 and b2 > b1 then BLUE goto NONE RED: pwmout 2, 99, 0 ; Set the Ouput to 0V goto main GREEN: pwmout 2, 99, 125 ' Set the Output to 1.5 V<br /> goto main BLUE: pwmout 2, 99, 250 ' Set the Outut to 3 V goto main NONE: pwmout 2,99,400 ' Set the Output to 5V goto main
This sensor can now be interfaced to the VEX as a Analog device.
January 24, 2011
Your first projects are due on Wednesday! The project rubric is posted on the Course Materials page.
REMEMBER: You need to invite me to be a contributor on your blog so that I can give you credit for all the work you have done. The six or so blogs that I have looked at so far have all been excellent! (100%)
I will be assigning you to your competition teams by Thursday. This will give you just over two weeks to build your competition robots. The competition will be held SATURDAY February 12th at Cal State Fullerton between 12:30 and 2:00 pm. I have ordered some nice engraved awards for the winners and there should be strong competition from the RSSC folks.
After this week, the number of handouts in class will drop SUBSTANTIALLY as I want you to have the rest of the time to work on your robots.
Keep up the great work!
January 18, 2011
Many of you are making great progress. Above half of you have your basic locomotion platform built and tested. If you are falling behind, remember that I will be in class at 4:30 each day if you would like to get caught up. Also, you can take your kits home (except for the breadboards) If you obtain your own breadboards, you can work on all of the breadboard based projects on your own.
Remember: Bring in an electronic toy to hack (recall the examples suggested in the previous post) for Wednesday!
Here is a list of places where you can obtain breadboards and other supplies:
SCETA (Southern California Engineering Technologists Association)
Cal Poly Pomona
Building 9 Room 244
This is a student fundraising organization that sells basic electronics supplies at reasonable prices. They are only open when students are around.
4747 Holt Blvd.
R-Vac, Abletronics and Orvac are all old time electronics shops that have a solid section of components and prototyping supplies. (I believe they were all started by the same people, but have since come under separate ownership over the years.) The prices here are higher then what you will find online. Some of the employees may be knowledgeable and some won’t(Orvac) There is a mix of new and surplus equipment, so the stores are worth exploring.
9860 6th Street
1645 E. Orangethorp
All Electronics Corporation
14928 Oxnard Street
Van Nuys, CA 91411
A great selection of surplus and some new parts. This is a great place to hunt around for surplus bargains. I find myself checking their web site monthly.
2691 main Street
Electronics Warehouse is a great supplier for the electronics hobbyist. I haven’t been to the store in a decade, but I remember good service and a wide selection of parts. There are two buildings once of which was devoted entirely to surplus.
D & E Electronics
1600 East Holt Ave
I was underwhelmed by D&E. The prices are steep and the shop has a limited selection of electronics components and prototyping supplies. Very little to no surplus.
13401 Crossroads Parkway
A limited supply of prototyping materials.
RADIO SHACK (with links to others)
This is the best supplier of prototyping materials and general electronics supplies. They focus on the education market.
Digikey and Mouser are premier electronics suppliers for small lots of just about any component in production. Since the advent of the internet their minimum order has gone down ($25 for digikey and no minimum from mouser) This is where you buy new components.
Thailand based supplier of many standard prototyping supplies and components. Prices are usually 50% of other sites. Shipping to the US will take on the order of 3 weeks. If I have time, I check them first. Great selection of protoboards and mircoprocessor boards at low prices.
Lots of stuff at reasonable prices, $20 minumum. They used to be the best place for hobbyists to get small parts,and still have interesting component kits.
Lots of Hong Kong, Thai, Chinese etc vendors selling small lots of common (and not some common) parts at low prices. If you have time this is the place to start.
One of my favorites and local.
Great grab bags. I buy all the LDRs in grab bags from them. I visit about once a month and always find some neat surplus components.
Another great surplus supplier. Stands behind their products and is knowledgeable about their stock. I check through the side about every other month.
Pololu is my first choice for small motors, sensors, encoders, wheels, and microprocessor boards. Sparkfun is the best supplier of microcontroller and sensor breakout boards. Sparkfun and Pololu set the example for what a modern business should look like with quick shipping, aknowledgable staff and an active forum about their products. These sites are hard on my credit card.
January 12, 2011
Students should have completed their 5V breadboard power supply. For the few students that did not finish it, I will send you off with John to work on it during class on Wednesday.
Many of you did not pick up a syllabus. Please refer to the electronic version of the syllabus available on this website.
We will start next time learning how to use a multimeter to do continuity tests, voltage measurements and resistance measurements. We will use this to test your power supplies before we use them in your first circuits.
We will build some circuits on breadboards and learn a bit about basic schematics.
January 11, 2011
I have posted the first weeks worth of experiments in the course materials page.
You need to write you blog entry describing what you did during the class period. Include any pictures that were taken of your projects.
For next class period be sure to bring:
- USB stick.
- Digital camera to record your work if you have one.
Keep an eye open for an old robotic toy for use in your first project. The most basic toy that is easiest to work with are the “singing animals”. Here is an example of such a project. Here is an example of a furby that I hacked. Here is a hacked TJ Bearytales. Finally RC car projects here and here. Start thinking about what you would like to do. BTW I find that “Community Thrift” up Grand and Right on Arrow usually has a good selection of things to modify.
December 15, 2010
This is the website for the Mechatronics course at Mt. San Antonio College. Each of the student project blogs will be linked from here. The page at right on course work details many of the assignments.
My main blog which details my other projects is located at www.profmason.com.
Here is an overview of the first week:
Day 1: Learn to solder, heat shrink and strip wire and through hole components. Build a 5V regulated power supply suitable for breadboarding. Assemble your first circuits with LEDs and resistors on a breadboard. Learn about resistor color codes. Introduction to project management and how to maintain an electronic log book.
Day 3: Reading Schematics. Simple Switching with microswitches, SPDT and DPDT. Working with relays. Lighting LEDs with Relays and microswitches. Finish the Square Bot.