Monday, November 25, 2013
11-25 Fine Tuning
In our lab time, the group worked on tweaking the arduino code and finalizing our parts to be submitted. Erek and Jeannie added some final details to make the frame of our present to make sure the frame can withstand the car running into a wall if the sensor does not work properly. The laser printed material was also designed. Tyler and Kari-Ann attempted to make the arduino work when the light is on the sensor rather than when the sensor is covered. We spent the whole time digging through the arduino forums to try to find some help. We also took part in making our blog functional with pictures and videos embedded into the blog.
11/17/2013 Arduino Update
Our group met to publish our code onto GitHub and upload the code onto an arduino. After figuring out the Github website, the code was uploaded and few errors were fixed. The group then added comments to tell what the arduino is going to do.
Our program successfully can get the recording module to work with the photosensor. Our problem is that it plays when the light is off of the sensor. We then decided to begin working on the frame design while we wait for our pieces to be mailed to us.
analogRead(2) //values determine the trigger point for the photocell. analogRead(0) and analogRead(1) //values determine the current which will cause the Arduino to think the package has hit an obstacle. If you run on carpet, the values may need to be higher. If you run the motors faster, the value may need to be higher. //Note that the "startup current" on motors is greater than the "run" current--that's why there is a delay on forward before checking the current values. int valm=0; int valm1=0; int trigger=0; int triggerlock=0; const int pwmA=3; const int pwmB=11; const int brakeA=9; const int brakeB=8; const int dirA=12; const int dirB=13; const int relay=7; void setup() { pinMode(relay, OUTPUT); digitalWrite(relay, HIGH); delay(2000);//leave relay on 2 seconds to play song digitalWrite(relay, LOW); } void loop() { trigger=analogRead(2); if(trigger<900 or triggerlock>0) {//light shining on sensor now or previously triggerlock=10;//don't check light again pinMode(dirA, OUTPUT); pinMode(brakeA, OUTPUT); pinMode(dirB, OUTPUT); pinMode(brakeB, OUTPUT); digitalWrite(dirA, HIGH);//forward A digitalWrite(brakeA, LOW);//release brake A analogWrite(pwmA, 150);//set speed A digitalWrite(dirB, HIGH);//forward B motor digitalWrite(brakeB, LOW); analogWrite(pwmB, 150);//set speed B valm=analogRead(0); valm1=analogRead(1); if(valm>520 or valm1>520) { digitalWrite(relay, HIGH);//turn on sound delay(100); digitalWrite(relay, LOW); digitalWrite(brakeA, HIGH);//stop motor A digitalWrite(brakeB, HIGH);//stop Motor B digitalWrite(dirA, LOW);//reverse A digitalWrite(brakeA, LOW);//release brake A analogWrite(pwmA, 150);//set speed A digitalWrite(dirB, LOW);//reverse B digitalWrite(brakeB, LOW); analogWrite(pwmB, 150);//set speed B delay(300); digitalWrite(brakeA, HIGH);//stop one wheel delay(400); digitalWrite(brakeB, HIGH);//stop other wheel //start both wheels forward digitalWrite(dirA, HIGH);//forward A digitalWrite(brakeA, LOW);//release brake A analogWrite(pwmA, 150);//set speed A digitalWrite(dirB, HIGH);//forward B digitalWrite(brakeB, LOW); analogWrite(pwmB, 150);//set speed B delay(700);//get past startup current }}}
Our program successfully can get the recording module to work with the photosensor. Our problem is that it plays when the light is off of the sensor. We then decided to begin working on the frame design while we wait for our pieces to be mailed to us.
11/19/2013 Part Update
Today we started designing the Solidworks part that will be 3D printed based off of our sketches that we drew yesterday. Erek and Tyler took the dimensions from the RC car and determined the overall size of the frame that we are building. KariAnn began the part creation using Solidworks and after that, Erek and Jeannie completed the part, changing the design slightly. The final part after 11/19/2013 is posted below:
The part has some flaws. Although the measurements are pretty good, the measurements will be retaken next week just to double-check. The part was hollowed out, although this may not be the best method as the structure may be too weak so we will have to rethink what we will do about the volume/overall structure.
The part has some flaws. Although the measurements are pretty good, the measurements will be retaken next week just to double-check. The part was hollowed out, although this may not be the best method as the structure may be too weak so we will have to rethink what we will do about the volume/overall structure.
11/18/2013 Part Drawings
Today our whole group met to work on designing our part that will later be 3D printed. We are planning on designing a frame to hold our circuit board and the rest of our sensors. A picture of our initial sketches are shown below:
Sunday, November 17, 2013
11/13/2013 Group Meeting Update
Today our whole group met up for about an hour and a half to touch base on the progress of our project and to outline our course of action over the next few weeks.
Materials we have:
- 9V battery
- Relay
- Photocell
- 2N2222A transistor
- Diode
- 1k and 10k resistors
- Recording module
- Motor shield
- Ultrasonic sensor
During our meeting, we discussed what we needed to do in terms of making the circuit, coding, and designing parts using Solidworks to later be 3D printed. We split up the work, with Erek and Jeannie mainly working on design and Tyler and Kari-Ann working on coding the circuit as well as gathering the supplies in order to do so.
For the circuit that we are using in our project, we are planning on using a photosensor that signals for the circuit to start running when it detects light, and an ultrasonic sensor so the RC car can detect when its getting to close to a wall.
For our Solidworks design, we are (tentatively) going to be designing supports and a platform in which to hold all of the circuit components. Preliminary sketches of our designs are also shown below. By next week, we would like to have the part drawings created using Solidworks as well as a code containing all the various components that we need in it.
A video of a few of the sensors working and our preliminary sketches will be posted soon!
11/12/2013 Project Introduction
Hello, welcome to our project blog!
First, we would like to introduce ourselves.We are Team Untouchable (consisting of Erek, Jeannie, Kari-Ann, and Tyler) and we are working on our Mechanical Design Lab project. This class introduced us to Solidworks design and Arduino programming and therefore for this project, we were given the task to design a mechanism that can be controlled using an Arduino based circuit.
Instead of designing a mechanism from scratch, we are cannablizing an old remote car (donated by Tyler) and rewiring it to fit our purposes. Using our Arduino based circuit and coding, our goal is to have the car turn on using a light sensor, and have the car be able to stop itself/reverse directions before or as soon as it bumps into walls and other items. An audio component may also be added to the circuit, as well as some other things that we may have planned for the future.
In terms of our Solidworks designs, we are planning on designing a superstructure that will support all the electronic components of our mechanism. Some parts will be 3D printed while other parts may be cut out from acrylic sheets.
We will be keeping you all updated with our group meetings and will be posting more pictures and videos of our progress soon!
Picture of the RC car:
First, we would like to introduce ourselves.We are Team Untouchable (consisting of Erek, Jeannie, Kari-Ann, and Tyler) and we are working on our Mechanical Design Lab project. This class introduced us to Solidworks design and Arduino programming and therefore for this project, we were given the task to design a mechanism that can be controlled using an Arduino based circuit.
Instead of designing a mechanism from scratch, we are cannablizing an old remote car (donated by Tyler) and rewiring it to fit our purposes. Using our Arduino based circuit and coding, our goal is to have the car turn on using a light sensor, and have the car be able to stop itself/reverse directions before or as soon as it bumps into walls and other items. An audio component may also be added to the circuit, as well as some other things that we may have planned for the future.
In terms of our Solidworks designs, we are planning on designing a superstructure that will support all the electronic components of our mechanism. Some parts will be 3D printed while other parts may be cut out from acrylic sheets.
We will be keeping you all updated with our group meetings and will be posting more pictures and videos of our progress soon!
Picture of the RC car:
Subscribe to:
Posts (Atom)