You are viewing an older revision! See the latest version
nitro_car_project
I came to ARM as part of my young apprenticeship and I had little experience of embedded chips and no experience of programming them. On my first couple of days I was playing around with the compiler and the mbed making the LED’s light up. As I got the hang of programming I started to think of a project that I would like to do and that would be useful to me. So I started to think about hobbies I do and an idea jumped out at me. I could improve the technology on my nitro R/C car! I now had a object to improve but I had to think of what to add to it, so I came up with a list:
• Engine temperature
• RPM
• Fuel level
• Speed
• Range finder
• Engine stop
• An accelerometer
I chose the three that I wanted to do the most and I chose to measure the RPM to make the engine stop if the car flipped and because we needed to use an accelerometer for the engine stop I chose that as well. We also thought that because we have this data it should be saved to a flash drive. We thought because the accelerometer was the most important part we would start with that, we used the LIS302 because it all ready had a library for it and it was easy to use. I wired it up to a LCD display to check the readings where correct but it printed lots or random numbers. I tried to workout what was wrong but in the end I just rewired it up and it worked! I next went on to making a program to work out the RPM there where a couple of things we could have done but we decided to use a QRD1114.
The QRD1114 detects black and white and records a voltage for each (black is 0-5v and white is 5v+). I had a problem trying to get it to work because I could get it to give readings but they where not right. So I did tests on it and found that the QRD1114 was a dud so as soon as I changed the component it started to work! The penultimate component that I needed to get working was the servo. All I needed to do for this was use the calibration program in the mbed cookbook. To make the engine shut off we needed to make an array so if the accelerometer read a certain value for 2 seconds or more then it would turn the servo 90°. The servo would be attached to a butterfly valve inside the exhaust of the car and when it was closed the car would stop.
The final thin that I had to do was to get the data to save to a USB memory stick. This was no problem because I only had to change a little bit of my program. So I had made all the programs that I needed all I had to do was put them together (easer said then done). I started by getting the accelerometer and the QRD1114 to save to the flash drive and then I wired up the servo and added the array. The main problems I had was getting pieces of the different program in the wrong places. I did not think that it mattered but apparently it did. Ob of the most frustrating things was that the program would run but it would not do what I wanted it to do so I hade to go through my program to work out what was wrong. When we did our first test run on the QRD1114 only read 0RPM all the time so we decided that it could not determine the white and black at 31,000RPM, but there was one upside everything else worked almost perfectly. We decided that the best thing to do was to change the QRD1114 to a photo-interrupter (the KTIR0611S) luckily it worked with the same program so we did not have to make any changes. So I had finished my program. This is my finished program and circuit!
http://mbed.org/users/joe/programs/nitrocarproject/latest
More edits coming soon!