I spent another 8 hours working on the project today. I’ve pretty much wrapped up everything I can do right now on the electronics side of things. I ordered a new op amp (a similar but easier to find one), a new atmega32, some cables, some headers, and some sockets. Hopefully that stuff will get here soon enough that it is useful this semester.
Things are looking good for my electronics layout. It looks like I will for sure be able to use the sensor board to take 20 or 30Hz inertial readings, 1Hz GPS strings, and the incoming PPM from the receiver. It will pass all this on to the Flashlite. The flashlite will be able to sample the incoming stuff as it needs it. It will then be able to periodically issue commands to the servos via the sensor board serial interface. This configuration will leave the 8 Flashlite ADC pins available for the infrared sensors, the pitot-static sensors, and any angle of attack sensors that might be added. Also, the Flashlite will still have its console port available, as well as two extra RS-232 ports on the I/O board.
If the computation burden turns out to be too high for the Flashlite, my backup is to hook a RS-232-to-bluetooth adapter to the console or other port on the Flashlite and let my ipaq do the work. I think to make the system reliable I would have to get rid of the Windows CE and replace it with Linux, but I’m not sure. Another option would be a gumstix computer in place of the ipaq.
Anyway, it’s about time to start gearing up for all the airplane construction that is coming. I need to start thinking about the configuration.
I looked at the radio shack data sheet and the op amp has like a 15 volt power supply, so that won’t work. I’ll just have to order the original type from internet. I think I’ll get a different atmega32 also. I found a way to program the MCU by wiring it up to the parallel port on my computer. This will cost a couple of dollars to build, but that’s like a $100 savings compared to the “real” programmers.
I made a new harness for the inertial sensors and did some more testing. I found the main problem on the x-y board was that the input Vcc pin wasn’t powering the board. After I re-soldered it, everything worked but the gyro the runs long-wise on the board. I made a voltage probe and did some tesing on the circuit. After a doing this and looking at the opamp datasheet, I found that the gryo is fine, but side B of the OPA2340 is not working correctly. I can’t get that kind of opamp around here, but Radio Shack has one with the exact same pin configuration, so I’m going to try one of those.
The z axis gyro and the two accelerometers on that board work. They actually work really well. I think they will be almost perfect when I move to battery power. I can select which accelerometer to use by changing a jumper around. Now I just need to tear into the x-y board to see what is up. I’ve almost given up on the IMU board ADC. I still need to test to see if the pulse counter is working, because that is the main reason for its existence. I might have to hack my receiver to find that out, though. I might have to remake it or at least replace the atmega, which I may have fried. I think that is like $10, but I’d have to find someone with an AVR programmer to flash the boot loader onto it. Otherwise I suppose I could build my own AVR programmer.
I spent 9 hours today soldering, resoldering, programming, and testing. I think there are some loose connections and/or jumpers on ADC board because I have to wiggle it just right to make it work. I did find that the yaw gyro works pretty well. Right now I’m sending the ACD samples to a real-time viewer at about 50 Hz. I’m getting quite a bit of noise. I think that is because the 50 Hz is too close to the frequency of the AC power. I probably need to switch to a battery.
The sensor board ADC works fine using battery power, except that it only reads pins in differential, when it is supposed to be software-configured to read single pins. Oh, well. I took off the capacitor between Vref and ground to see if that was the cause (I thought I may have fried it with the soldering iron). This just made the readings a bit more noisy.
I spent another 2 hours tonight soldering some temporary wiring to test the accelerometers and gyros using the Flashlite ADC board. I should be able to finish it tomorrow and test it using some of the old UAV software. Note to self: beware of fire alarms when soldering in dorm room.
I think the only real problem with using the flashlite to sample the inertial stuff is that it ties up 6 of its 8 ADC pins. I will still need at least four more to complete the system. I think my old SV-203 controller has like four of them. Also, I should be able to use the atmega32 to give a few ADC pins, if only in differential mode.
I spent about 7 hours today making a program to interface with the sensor board and another 2 hours trying to figure out what to do next. I was eventually successful in modifying one of my old codes to work with the board. I recompiled the software for the board, but the ADC channels are still coupled. I think I might have screwed them up when I had to de-solder the connector earlier. Oh, well. The Flashlite has better ADC anyway. The control board will still give a programmable interface among the servos, the receiver, and the computer. Hopefully I can get it to also handle the GPS stuff so that I can free up resources on the flight computer.
12 hours spent today/yesterday working on avr compiler stuff. Now trying to make a windows serial interface program.
I worked on the project for 3 hours today. I did some reading and testing.
I spent about 2 hours today reading about programming the sensor board using the bootloader. I found a couple of good references and bookmarked them. I looked up the specs on the accelerometers. They are good for +/- 2g. The Gyros are good for +/- 90 degrees/second.
Yesterday I spent around 8 hours working on getting the IMU board built and tested. One of the SSOL guys helped me solder some of the smaller parts. I fumbled around for a while trying to first get the test software recompiled to support my computer’s COM port assignments, then after that failed, I overrode the Windows assignments. So far my computer hasn’t blown up, so that’s good. Supposedly something else had already been assigned to COM2. Well, now I have an entire collection of c and c++ compilers which I may or may not need. Anyway, it looks like the IMU board is working. I will have to play with it a bit more to see if the outputs are actually useful. At least it is communicating over the serial interface. Really, that is all I ask. If nothing else, it will let me bring the PWM servo commands from the radio into the control picture.
I spent about 2 hours today looking at AVR programming stuff for the microprocessor on the IMU (aka sensor board). I’ve got a cross compiler, and a linker and all that stuff to write c programs for the board. I also am looking into using boot loader software to do the actual programming of the processor.
I need to look at the data sheets for some of the components, but I don’t have the CD here right now.
I got the IMU kit today. I spent about 3 hours looking over the open source autopilot software. I think I will use the IMU to collect the accelerations, angular rates, GPS strings, and PWM from the receiver. It will output all this over the serial port to the flashlite. The flashlite will take the stuff from the IMU, the pitot-staic inputs, and inputs from the FMA infrared sensors and issue control instructions to a separate servo controller over another serial port.
I think this design will give the most flexibility and it will give me a simple way out of a lot of convoluted programming. Also, it will allow me to use the FMA wing leveler for attitude control if I’m running out of time as the semester is ending. The time I save by not programming a full controller and an inertial reference system is time that I can spend developing mission software and testing hardware.