Wednesday, July 23, 2014

4/7/14 Update

Registration Information
ECEN 285-558 (CRN 17255)
ECEN 485-558 (CRN 17256)

We worked on creating a demonstration for parent's weekend (similar to Aggieland Saturday).

Michael and Luke worked on the LEDs again. Our adviser keeps changing his mind on what would be the best resistor set up.


Friday, April 4, 2014

3/31/14 Update

Software
Worked on the code for the wondering, as discussed in the last post
Worked on maze mapping/exploring the maze

Mechanical
IEEE had a soldering workshop recently, so we got a free perfboard from them

3/24/14 Update

Software
We talked about ways to correct wondering when moving around the maze.
To start off with something simple, every few squares, it will compare the sensor values and determine if the difference between them is too large. If so, rotate one of the wheels a small fraction. Something along these lines. It will be a bit slow, but this way we can use the code already written.

Mechanical
Michael and Luke got the LEDs to work. We'll be needing a perfboard to solder everything together.
We could potentially start designing a PCB if we are pleased with all the parts.

Wednesday, March 19, 2014

3/17/14 Update - Micromouse Competition

Dr. Villareal, Tan, Alan, and I went to the APEC's Micromouse Competition in Fort Worth on Monday. The community was very nice and supportive.

Observations of the robots
  • Almost all of their batteries were tiny, about the size of a quarter. The four Taiwan teams were using a lithium polymer 120mAh 2S (7.4V). 
  • The PCBs were very low to the ground and the wheels were about 23 mm diameter.
  • Some of the robots used beeping tones and LEDs to know what the robot is sensing or deciding. 
  • Some of the robots used gyroscopes in order to determine direction and position.
Thoughts
  • Can we detach the Stellaris from the launchpad like how the MSP430 detaches?
  • Auto correcting seems to be very essential when roaming the maze.
  • Many of the robot submissions were not teams of people, but rather individuals. Dr. Villareal wondered if we should we change the structure of Micromouse.
Some of the robots:




Shinichi Yamashita's robot (below) it uses a camera to take pictures of the maze walls in order to solve the maze.


Tuesday, March 11, 2014

3/3/14 Update

Battery
Carlo has been talking to the Remote Control Hobbies Store for help. We are taking the battery and robot there over spring break. The store owner plans on helping us get a good battery.

LEDs
Luke and Michael got the emitter to work, but the receiver's output voltage range isn't large enough.

Software
Tan has been working on pseudo code for the maze scouting/mapping. It's pretty much completed now.

Things to do

  • Double check the maximum voltage for the Stellaris' built in ADC
  • We will probably need a perfboard for all the sensors' resistors
  • Go through the pseudo code and start translating into C


Monday, March 3, 2014

2/24/14 Update

Stellaris
Fixed the Stellaris pin by simply moving the direction pin to a different pin. We are still not sure why this happened, but this is a simple fix since there are plenty of pins available to use.

Battery
Dr. Villareal had us test some things and he concluded that the battery is probably damaged. We plan on buying a new one. Carlo has also contacted a store called Remote Control Hobbies and asked them for some help.

Sensors
Michael and Luke started working on the LEDs again. Dr. Villareal says that there is a current problem. We need to supply more current in order to get better output voltages. They were originally getting very small voltages, and we need a larger range, like 2 to 4 volts.

Software
Tan, Alex, and I discussed the software that needs work
Break down of functions:

  1. Initial exploration, prioritizing toward the center
  2. Arrival at center, start prioritizing squares that haven't been entered
  3. Recursion from wherever robot is located in the maze to start of the maze
  4. Travel to start
  5. Recursion from start of the maze to center
  6. Race to center

2/17/14 Update

The battery is still being difficult.
It's supposed to be around 11V and 3A/hr, but when it is connected to the robot, it's 5V and 0.1A.
When the power supply is connected to the robot, it can handle 11V to 12V and about 0.88A.
Someone suggested looking into power ratings of the battery.

A problem occurred while trying to test the battery, one of the wheels wasn't rotating backwards anymore. We tested the output voltage of the Stellaris pin that handles direction. It should be a high voltage (3.3V) for forward, and then a low voltage (millivolts) for backwards. The low voltage wasn't low enough, it was outputting about 1V. The other three motor control wires were working fine; it was just that one output.

Solutions:
Research more about this battery and ask a professor's opinion
Change the output pin on the Stellaris


Thursday, February 20, 2014

2/10/14 Update

The new battery came in and it doesn't seem to work. We spent most of the time trying to move the wires around and get the battery to work.

We got some stuff ready for Aggieland Saturday

  • Created a 3x3 maze
  • Set up an IR sensor to a multimeter so students could watch the output voltage change with distance
  • Contacted Chris Jones and secured us a power supply that could run the robot

Wednesday, February 5, 2014

2/3/14 Update

Progress
  • Purchased the battery and charger
  • http://www.all-battery.com/111volt-3000mahli-polypack.aspx
    http://www.amazon.com/Tenergy-Smart-Charger-Li-ion-Battery/dp/B008UCOMC2
  • The sample code for the start button that Carlo found didn't work properly; asking Senior Design teams how they did it later in the week
  • Michael and Luke started working on the IR sensor testing
  • Alan, Hunter, and Tan started working on the maze mapping/search the maze for wall information function
More Senior Design questions for Wednesday:
  • When making a fake maze: how to populate the 16x16 array with our fake information for the squares; this information may also be used for the maze mapping part of the code.
  • How to change from one spot in the array to the next spot. The original idea was to increment/decrement the x or y coordinate, but the array already has a "coordinate" system, so we want to use that one instead. 
Aggieland Saturday (2/15/14)
We are requested to have a demo of the robot. Since it cannot map the maze yet, possibly have the robot move in a set pathway and not use the sensors.

Front: http://imgur.com/jnrtdi9
Back: http://imgur.com/62C4J1U

Monday, February 3, 2014

1/27/14 Update

Software
Functions that definitely need work:
  • Algorithm to explore the maze; how should it prioritize the mapping
  • How will the bot get back to the start of the maze after mapping
  • Function for keeping centered throughout the maze
Functions written but not perfect:
  • Recursion algorithm for solving the maze after mapping; it outputs a string of directions
  • Execute the shortest path to the goal
  • Square's goal state; if the robot is in one of the middle 4 squares, the goal state changes to 1
Hardware
We need a battery with 9~18 Volts and 2~3 Amperes to support the stepper motors. After getting the battery, the bot will not be tethered to the power supply!

Data sheet for DC converter: http://www.cui.com/product/resource/v78xx-1500.pdf
  • Max Vin = 18V
  • Min Vin = 6.5V
Data sheet for motor driver: http://www.ti.com/lit/ds/symlink/drv8805.pdf
  • Max Vm and Vclamp = 60V
  • Min Vm = 8.2V
To Do List
  • Think of ways to test mapping algorithm; can we print out the informational vectors?
  • Create informational vectors for a fake maze; test recursion algorithm; can it find the shortest string
  • Research and purchase battery
  • Get IR sensors set up and create graphs of distance and voltage

Monday, December 9, 2013

ADC Working

Resources
The file single_ended.c, which is an ADC example created by TI. It was included with the Code Composer download.
I used this link because they also had multiple sensors that needed reading
http://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/200521.aspx

I used this piece specifically:
ADCSequenceStepConfigure(ADC0_BASE, 0, 0, ADC_CTL_TS);ADCSequenceStepConfigure(ADC0_BASE, 0, 1, ADC_CTL_CH0);ADCSequenceStepConfigure(ADC0_BASE, 0, 2, ADC_CTL_CH1);ADCSequenceStepConfigure(ADC0_BASE, 0, 3, ADC_CTL_CH2);ADCSequenceStepConfigure(ADC0_BASE, 0, 4, ADC_CTL_CH3);ADCSequenceStepConfigure(ADC0_BASE, 0, 5, ADC_CTL_CH8);ADCSequenceStepConfigure(ADC0_BASE, 0, 6, ADC_CTL_CH9 | ADC_CTL_IE | ADC_CTL_END);
I was accidentally putting "ADC_CTL_IE", which is an interrupt flag, on each configure step. So it would read the first voltage correctly, but the other ports were reading strange results.


Setting up PuTTY 
This is used in order to read the digital numbers. 
https://docs.google.com/document/d/1vS1P7lHgfN0qNN-VUYzAmbf1uEs35KgN65zdVGpilhs/edit?usp=sharing


UART and ADC code added to existing code
https://docs.google.com/document/d/1jRJDIFJe60oUCF9FxPxIToOBODayL5LCVNqKEs4tatw/edit?usp=sharing


Below are pictures of ADC working

The list below explains the voltages used
Sensor 1: 0.5V
Sensor 2: 1.0V
Sensor 3: 1.5V
Sensor 4: 2.0V
Sensor 5: 2.5V



Next, I put each one to 0V. For the last two samples, all of the power supplies were set to zero.



Lastly, I connected all the ports to the same power supply


Sunday, December 1, 2013

11/25/13 Update

Last official meeting for the semester

Monday (12/2/13) students are supposed to attend Friday classes, so if people are able I would like to have an unofficial meeting that day.

We discussed maze mapping and what the different types of data that will need to be stored.

https://docs.google.com/document/d/1Wu7waLjxTljn7O5gQABQTvZVNVyDUbZHxnj9jpVSczc/edit?usp=sharing

My friend, Brad Berger, he was pursuing a computer science degree for about 2.5 years and I've started to bother him about maze solving pseudo code. Below is a link to my notes about his recursion function:

https://docs.google.com/document/d/1p5ur2zxr1kikKd2vrjDfMCA7L8vXMStbqWzvAuT4IoI/edit?usp=sharing


Picture Time

George soldered the motor's wires sorter and made them very professional looking.



Here's a picture of the washer (silver part in red box), so now the bolts do not rub against the green wheels.


Here's a picture of the IR LEDs


Tuesday, November 26, 2013

11/22/13 Update

Meeting with George Sullivan

When testing the motor functions, the motor was getting warm again. We think that having the high pulse on for too long and/or having a small step frequency was heating the motor up. This should be verified by a professor who is more familiar with motors.We reviewed the data sheet for the motor driver, specifically page 6 http://www.ti.com/lit/ds/symlink/drv8805.pdf In the table it says that the smallest high pulse can be 1.9 microseconds. We tested 40, 30, and 20 in the SysCtrlDelay function and got the high pulse duration pretty small but not exactly 1.9 us. Before, in the sysctrldelay I was using 15625 which corresponds to 266.5 Hz or 3.752 ms. Below is a doodle:


Using an example George found online and the TI's example with Code Composer, we got the UART working. George explained how some of the ADC example code was working, but we didn't have time to debug everything Friday. In the picture below, I was trying to get the ADC to work. I think the 300ish number is representing a very small voltage.


11/18/13 Update

On Monday, Micheal Feller set up the LED IR sensors and tested some resistor values on bread board. More resistor values are needed for further testing. We want a large range for the output voltage. For example, the IR sensors that come in a package (http://www.karlssonrobotics.com/cart/infrared-proximity-sensor-short-range-sharp-gp2d120xj00f/) have a range of 0V to 3V. Later we can create some graphs for future reference. 

Also on Monday, Garrett Barbour tested the DC-DC converter on the motors. The converter can only output up to 1.5A but each motor needs about 1A, therefore an additional converter will need to be purchased. Other than that, the converter works perfectly for one motor.

John Desaulos suggested a better method of attaching the motor with the bolts. As of Monday, the bolts were rubbing slightly against the wheel's lettering and the wheel was slowly unscrewing the bolt. He suggested cutting the bolt shorter with bolt cutters. On Wednesday, I went to Home Depot and the hardware department person suggested using a washer to space the bolt away from the wheel versus using a bolt cutter or a saw and cutting it. Since it was the cheaper and faster method, I bought some washers and so far they seem to be working fine. If the washers become a problem, we can revisit the idea of cutting the bolts.

The new chassis was finished Monday and everything seems to fit nicely.

Things to do:
-The wheels need to rotate smoother
-Have robot complete all four motor functions correctly
-Calculate 1 block distance forward and backward
-Play with left and right motion

Tuesday, November 19, 2013

Registering for Micromouse

If you would like to register for Micromouse next semester and receive one credit hour, the information is below

ECEN 485 558 (CRN 20094)
ECEN 285 558 (CRN 20092)

I believe 285 is for freshman and sophomores, and 485 is for juniors and seniors. At least, that's how it worked last semester. Other than that, there shouldn't be any other differences between them. 


If you do not want to register and just be a volunteer, the meeting time next semester is 4:10 PM - 5:25 PM every Monday in ZACH 225A.

Wednesday, November 13, 2013

11/11/13 Update

Most of the parts that I ordered come in. We have been slowly assembling the robot. I had a problem with receiving the wheels, but they should be here and on the robot by Monday (11/18).

We've noticed a few problems with the chassis and are considering redesigning and printing a new one. I don't have any tests this week or the next so I think I can do this Wednesday. I have some notes written down about all the little fixes that the team suggested. I can then email Chris Jones the .stl file and hopefully it will be ready for pick up Monday morning.

John Desaulos suggested that the Stellaris should be able to read analog signals and that we may not need to convert it to digital. So we will try it that way first. Michael Feller and two others researched example code online of the Stellaris reading analog sensors.

This week's IEEE Workshop is over ADC: http://ieeetamu.org/mcc/workshops/adc/ I did attend this workshop Tuesday and they said that it would be best to convert the analog signals into digital. So I'll bring up the argument again on Monday.

We will also need Stellaris specific UART example code. The IEEE Workshops did go over UART but it was for MSP430 http://ieeetamu.org/mcc/workshops/serialcommunication/

It seems that the DC/DC converter, that George found for the motors, can also be used for the Stellaris. http://forum.stellarisiti.com/topic/669-stellaris-launchpad-power-options/ This is really good because these are kind of expensive and bulky.

Tuesday, November 12, 2013

11/8/13 Update

Meeting on Friday with George Sullivan


Analog - Digital Converter: How it works

Written Notes: https://drive.google.com/file/d/0B-46Wb6HXkEETmJ6bXp4NjJ2UHc/edit?usp=sharing

The Stellaris has a 12-bit input/output range. So for the maximum voltage input (5V), it would output the number 4096 (= 2^12). Then for 0V input, it would output the number 0. The relationship is linear. Testing is need to verify this.

For example,
We are using two of these http://www.karlssonrobotics.com/cart/infrared-proximity-sensor-short-range-sharp-gp2d120xj00f/ on the sides. We placed it in the maze, in the middle of a block/square. We decided that 1V outputted from the sensor would be a good threshold for whether or not there was a wall in front of the sensor. Less than 1V means there's no wall, and greater than 1V means there is a wall. The highest output from the sensor is around 3V.

So 1V (outputted from sensor, inputted into Stellaris) would be about 819 (=(2^12) /5) outputted from Stellaris since the relationship is linear. We'll also need other thresholds in the future. If the mouse veers to the side, slowly running towards a wall, we can use the sensors to correct it.

Note: We want to avoid having the robot completely up against the wall. If the sensor is roughly less than 1cm away from the wall, the voltage drops. I say roughly because, when tested, all the sensors work slightly different, some will be better candidates. The datasheet on the second to last page shows their standard graph of voltage and distance. Using the 1V threshold, the robot would record this as no wall.


Mapping the Maze

Written Notes: https://drive.google.com/file/d/0B-46Wb6HXkEEWkZYUlU0SG9aeEU/edit?usp=sharing

In order to solve the maze and write the movement logic, first we'll need to figure out how to store the maze: break the maze into blocks, or walls. No matter the method, everything will have pros and cons.

Blocks
The robot would have to enter every single block on the maze to record if there are walls or not. This takes up time, but it would be easier to code and potentially solve.

Walls
Slightly different approach. We would want the robot to avoid redundantly exploring blocks where it has already recorded that wall, but from the other side. In videos, I've seen many robots skip over sections of the maze.

In the notes, George wrote down realistic problems that we may encounter when running the robot through the maze.


The Next Steps

ADC
- Write code to read the sensors
     - Assign pins on the Stellaris for the sensors
     - Read ADC values (function* see below)
     - Find/Test  ADC #s for important values
- Make UART/Serial debug connection for computer, so we can get a log of values displayed. We thought this would be a good way to verify that everything is working up to this point.

George drew a bubble map/flow chart in the notes.
Start with a move function, like move forward into a block, then in the middle of the block, read the sensor value. Read the sensor data (is there a wall or not, this would be the function* above) and store it in an array or vector of some sort. Next make a decision: should the mouse keep moving forward, turn left/right, or turn completely around. Finally, we are back to the move function.

Things that can be done without sensors in the mean time
- Make the robot go a path
- Figure out how long a block is (for now, breaking the maze into blocks seems to be simpler)
- Test turning & "1 block" motion to make sure motion & turning is consistent
- Start testing prototypes of mapping ideas

Thursday, November 7, 2013

APEC Research

The different types of Micromouse competitions: http://micromouseusa.com/?page_id=23

Link to confirm the region we are in http://sites.ieee.org/local-sections-chapters/region-5/
Main website for Region 5 (which doesn't seem to be very informative about the competitions): http://ieeer5.org/

Link to the APEC Micromouse Contest (Which is the highest level in America) http://www.apec-conf.org/conference/participating-in-micromouse/

"APEC 2014 will be hosting its Twenty-Eighth annual Micromouse contest in Fort Worth, Texas. The contest will take place on the evening of Monday, March 17 starting at approximately 8:00 PM. It is not necessary for contestants to register for the conference in order to compete."

"The rules for the contest use a scoring system with a penalty for the time taken to map and run the maze, and a bonus for not touching the mouse ... The time for each contestant has also been reduced from 15 to 7 minutes. Within this time limit, the Micromouse may make up to 7 runs. Only one mouse per handler will be allowed this year." More specifically: http://www.apec-conf.org/wp-content/uploads/2013/10/Micromouse_Rules.pdf

Other goodies on the APEC Micromouse Contest website
Hotels: http://www.apec-conf.org/conference/hotel-travel/hotel-reservations/ Special rates for students if apec@courtesyassoc.com is contacted


After signing in with my IEEE member code, it showed three options 

Full Conference: $800
This registration category includes the following:
  • Technical sessions
  • Proceedings on USB
  • Educational seminars
  • Seminar workbook on USB
  • Exhibition
  • Social Event

Technical Session Only: $500
This registration category includes the following:
  • Technical Seminars
  • Proceedings on USB
  • Exhibition
  • Social Event

Educational Seminars Only: $400 
This registration category includes the following:
  • Educational Seminars
  • Seminar workbook on USB
  • Exhibition

I have a feeling that we'll  be choosing the "exhibits only" option but it isn't available to click on until February 21, 2014. I will email apec@apec-conf.org and ask for more information.

Tuesday, November 5, 2013

11/4/13 Update

Some of the items that I ordered came in the mail and we attached them to the chassis Monday.

We discussed possible chassis modifications:
--buffer/slider on the bottom - There's only two wheels so the robot may wobble forward/backward when operating
--Velcro options for attaching the battery or other objects to the chassis
--screws/pegs for a more secured motor
--have the battery lay differently and then use a box cutter to make the mouse a little shorter
--acetone to dissolve the chassis material or use a file to shave off unwanted material if more room is needed

We briefly discussed infrared LED sensors. I purchased this http://www.digikey.com/product-search/en?mpart=IR7373C&vendor=1080 and this http://www.digikey.com/product-search/en?mpart=LTR-4206&vendor=160 They are pretty inexpensive.

I helped Wenjie Cao get CCS running on his laptop and I helped Michael Feller get the motor control code working on his laptop. 

The last IEEE workshop about serial connections will be helpful for us once we convert the analog sensors to digital using the Stellaris. The powerpoint and sample code is here http://ieeetamu.org/mcc/workshops/serialcommunication/