The Larry Project

1/31/2005

Modified board

Filed under: Senior Project — von der Lord Larry @ 8:32 pm

I modified the board slightly. I added a series resistor to the voltage divider to give finer control of the supply voltage to the FMA sensors. I also removed the RC low pass filter from the FMA supply line. I don’t know why I put it there anyway.

Data rate

Filed under: Senior Project — von der Lord Larry @ 2:26 pm

I did a rough calculation of the data rate the IMU is using on the serial port. It is using about 22,000 bits per second out of the 38,400 bits per second maximum allowed transfer rate.

IMU programming

Filed under: Senior Project — von der Lord Larry @ 2:23 pm

I spent another 3 hours testing programs on the IMU. I finally have a code which seems to work really well. The servos don’t jitter except for radio interference. The manual/computer control switching and failsafe works in all cases now. I’ve decreased the control overide lag by a factor of three. I did not end up using a separate signal counter for renewing trust in the PPM signal. If there is an updated PPM signal coming in at about 3 Hz or more, the PPM signal is trusted. I have disabled the high-speed servo driver. The control handoff code is now much simpler.

1/30/2005

Integrated sensor board

Filed under: Senior Project — von der Lord Larry @ 5:22 pm

I spent about 8 hours today designing a circuit layout for an integrated sensor board. The board will do the same as the three other boards except that it will add some RC low pass filters. It uses less power regulators and has some other benefits compared to the old boards. It took me about 3 hours to get a high resolution version copied from ExpressPCB to a bitmap format. I did this by taking screen shots with ExpressPCB zoomed in really close. I then took the screen shots and lined them up like a puzzle in MS Image Composer. This worked really well in the end, but it was more work than I wanted.

Integrated sensor board

Total logged time, cost

Filed under: Senior Project — von der Lord Larry @ 1:19 am

At this point I have logged between 145 and 150 hours working on this project. I have probably spent another 100 hours at least that I haven’t logged. Most of this was time spent researching stuff over Christmas break and last semester.

I don’t know how much the project has cost me yet. I’ll have to sit down and add it all up sometime, but I won’t do that until it’s all over. It will probably be close to the $2000 target that I specified last semester. At the time I never really thought it would be that much. I thought $1000 would be closer. But then I hadn’t planned on a $500 airplane or on frying that one board. I have said that if I accidentally fried the 386 I would probably quit, and I think I would. At this point I have done just about enough work for a senior project anyway.

I need to find a good reference on system identificaiton techniques for airplanes. I also need a reference for designing the controllers that the airplane will need. Those things aren’t really the focus of the project. I’m more interested in hooking all of the components up and getting them to work together.

IMU programming

Filed under: Senior Project — von der Lord Larry @ 12:57 am

I spent about 14 hours today testing different programs on the IMU. I was trying to see what the upper limit on performance was while maintaining quality serial output. I can run it at up to 40 Hz before the serial data starts to overlap. I made a lazy attempt at increasing the baud rate, but it was no use. I think 38400 must be the upper limit for that thing. I just hope the flashlite won’t have too much trouble taking in all that, since I am not now using DMA. The memory buffer will make a big difference, though.

I need to do some more fine tuning on the IMU software, but the battery in my transmitter is dead, and the servo battery is almost dead. I just made a few modifications, but I can’t test them until I get the batteries charged. It looks like the control handoff mechanism is not working right. It works some of the time, but the computer isn’t given control if the ppm signal is lost while manual control mode is still engaged. I have to fix this because this is a critical handoff. There is now also a small lag in the control transfer back to the radio. I’m pretty sure this has to do with the 1 second period that I allow to determine if the ppm signal is active. I will probably take care of this by setting the signal active flag as soon as a ppm signal is received. If that is too touchy, I will just require a small “good behavior” period before the ppm signal is trusted again.

I am going to rebuild the air sensors on a single board. This will allow me to add filters, declutter the pressure hookups, and much simplify the wiring. I will also add a ground plane if I can. All of this will make the board more durable and resistant to electrical noise.

I have started writing the integrated flight software for the flashlite. I am almost done with the servo control function. Then will come the receiving and parsing routines for the IMU interface.

I ordered 4 copper boards from digikey. They are the same type as I used on the power board. They are thicker and less brittle than the radio shack boards.

The department of residence doesn’t know this, but I have about 1/2 gallon of spent ferric chloride sitting in my room. They also don’t know that my floor is covered with a fine coating of fiberglass powder and various sharp things. Oh, well. I suppose those of us who can’t get work space in Howe just have to turn our rooms into toxic waste-filled construction zones.

1/29/2005

IMU programming

Filed under: Senior Project — von der Lord Larry @ 4:10 pm

I have changed the IMU software quite a bit. Basically I have set it up to give full servo control to either the radio or the flashlite, depending on two things. If the receiver is getting a good signal at least once every 8 program cycles and the manual override is set on the transmitter, the servos are manually controlled. If either or both of these conditions are not met, the computer takes over until both are again met. This makes sure there is no time when the airplane is not controlled by either the computer or the radio.

In the future, I will probably also have the IMU check to see if the flashlite is still active. In the case that it becomes inactive, the controller IMU will switch control to the radio. If both the radio and the computer are inactive, I can use a very simple flight controller on the IMU that will initially set all of the servos to some predetermined position. Then it could assume a 1-g flight condition and use the accelerometers as tilt sensors and the gryos as rate sensors. This would allow the airplane to be leveled to a good degree as long as the accelerations are low. This failsafe would return control to the radio if it came back online. If I use the watchdog timer on the flashlite to reset it, the IMU could then turn control back over to the flashlite.

If the IMU starts acting up inflight, the flashlite can issue a reset command over the serial connection. I doubt this would have any practical use, since the reset command would likely not work if the IMU was locked up. I think the Atmel controller has a reset pin, though. I could hook this up to one of the digital lines on the flashlite to send a reset.

In the end, if the IMU fails in flight, the airplane will be lost. Without the IMU running, there is no way to get signals to the servos. To get around this potential problem in the initial testing phases, I will use a second receiver to control the servos directly from the radio. In this case the receiver that is plugged into the IMU will simply supply the IMU with the servo commands for the purpose of logging them.

Right now I am going to go back and change the IMU program a bit so that it will send the same number of lines to the flashlite in every cycle. This will make it more predictable when timing becomes important.

Watch the polarity

Filed under: Senior Project — von der Lord Larry @ 10:58 am

Mental note: don’t plug it in backwards. Everything is fine now, but the computer didn’t work for a couple of minutes after i reversed the polarity on the power supply. The lesson is to not work on the computer when you are really tired or not seeing well. Bluh.

Servo control

Filed under: Senior Project — von der Lord Larry @ 5:19 am

I spent about 7 hours last night/this morning working out some software on the 386. The 386 can now control the servos using a serial link to the IMU. I have run into a few issues with the linker and floating point variables, so I switched to the old development environment from the guided missile project. That made it all better. I still don’t know why, though. It might have been the memory model I was trying to use. I can’t use c++ with the I/O drivers, so I’m stuck with c for the most part. There is probably a way to get around it, but I don’t care about that yet. Bluh.

1/26/2005

Air sensor box done

Filed under: Senior Project — von der Lord Larry @ 9:38 pm

I worked on the project for about 4 hours today. I finished the air sensor box and tested it. The box has a thermometer, an absolute pressure sensor, a differential pressure sensor, and 3 axes of infrared sensors. Everything worked well in the test. I was able to scale/offset all of the voltages to work in the ADC. There is a bit of intermitant noise in the readings. It doesn’t seem to be affected by moving the wires around, so I think the wiring is not the problem. My idea for getting rid of the noise by subtracting the sensor box ground voltage from the measured outputs won’t work, since the noise doesn’t seem to be directly connected to the ground offset.

My new idea is to connect the sensor box ground to each of the adc ground lines. I will have to check with JK Micro on this, though. My concern here is that by doing this I will somehow introduce ground loop current that could add to the noise.

I’m tempted to now remake all of the air sensor boards into a single board. This would reduce the wiring complexity, allow for a common ground plane, and make the whole thing more robust.

1/25/2005

Bad boards

Filed under: Senior Project — von der Lord Larry @ 11:11 pm

The thicker Radio Shack board material is really brittle. I might not be able to use it. I’ll just have to see if it breaks up too much when I drill it.

On another subject, the powdered Ferric Chloride reacts violently with water. It spatters and gets hot and releases some kind of gas that smells funny. I wonder what the residence halls would think of my using this stuff in my dorm room. I don’t think its dangerous, it just makes quite a production when you mix it with water. It also stains stuff really bad. Meh.

1/23/2005

Wasted day

Filed under: Senior Project — von der Lord Larry @ 7:16 pm

I didn’t work on the project at all today. I went to Radio Shack to get etchant, but they were closed. Instead I flew for 3 hours to update my IFR currency.

1/22/2005

Cables and board masking, goals

Filed under: Senior Project — von der Lord Larry @ 11:23 pm

I spent an additional 6 hours this afternoon working on the UAV project.

Radio shack was closed by the time I got there, so I couldn’t get any copper etchant. I made the layout for a signal distribution board that will go in the air sensor box. Initially I put some low pass filters on it, but I decided they probably wouldn’t be needed and that they would take up too much room. The final board is shown below. I have already used this pattern to mask the copper. Now it is a matter of getting some etchant to finish it with. After the last boards are assembled tomorrow, I will try to finish the air sensor box, close it up, and run the 8-wire cable to the computer.

Signal distribution board

I made two serial cables to interface the IMU with the computer and the computer with the PC. I made the 4-wire power cable for the IMU. I was going to remake the GPS serial cable, but I need a part from Radio Shack to do this.

My goal is to finish the hardware by next weekend so that I can start programming. After two more weekends I want to have the software on the 386 and the IMU/controller setup to record measurements from all of the sensors (maybe not the GPS yet, since that will be a secondary non-interrupt task which will depend on timing). I have decided that I will use a DMA channel to handle the serial communication with the IMU/controller since it will have to run at high speed. Using regular interrupts or polling would take a huge portion of the 386 cycles. The GPS will be polled. The onboard ADC channels will also be polled, since they are fairly low frequency events.

Airspeed board

Filed under: Senior Project — von der Lord Larry @ 6:31 pm

I just masked the airspeed board for etching. Now I have to go to Radio Shack to get more etchant. It is a real ripoff. But I have no patience for mail order and I need this done. Here is the layout.

Airspeed sensor circuit layout.

Power board, calibration plans

Filed under: Senior Project — von der Lord Larry @ 2:16 pm

I finished the power board after working on it today and yesterday for another 6 hours. I made some changes to the final circuit. The variable voltage regulator had a different pinout than I thought, so it doesn’t work with the board. Since I decided not to use an offset on the airspeed sensor, I had another channel on the op amp to act as a variable voltage regulator. The system seems to work very well. The temperature sensor is reading almost exactly what I expected, and it has a small adjustment to match it up with the resistance table that came with the thermistor. The only question is if the op amp can maintain a very constant voltage when it drives the thermopile circuitry.

All of the aileron extensions came from Tower Hobbies today, so I hooked them up to the IMU/controller board. They fit better than the old Airtronics style wires that I had earlier. That finishes the construction phase of the IMU/controller box. The only thing left is some minor programming of the servo interface and the calibration of the gyros and accelerometers. I think I will do as Dr. Vogel suggested and calibrate the gyros using a long pendulum to provide a known angular rate. I think the accelerometers can be calibrated to a good degree by measuring the response to gravity in various different orientations.

I think I will ask Dr Haan to help me calibrate the pressure sensors using the manometers in Howe.

1/17/2005

Making circuit boards

Filed under: Senior Project — von der Lord Larry @ 10:42 pm

I spent about 6 hours today making a circuit board that generates three different voltages for the various sensors. It also has the amplifier circuitry for the thermistor. Here is the diagram of the board. I made it with the free ExpressPCB software. I had to do a screen print to print to get a printable file. The image was transferred to photo paper using a laser printer. The image was then ironed on to the copper board. Then comes the etching with the ferric chloride. Power supply and amp circuit The Radio Shack etching solvent is not very good. It took 1.5 bottles and about 2.5 hours of soaking to etch the circuit. Somehow this must be the EPA’s fault. I still need to make the board for the differential pressure sensor. I have the schematic all planned out on my white board.

Making circuit boards

Filed under: Senior Project — von der Lord Larry @ 12:08 am

Today I spent about 10 hours designing circuits for the air sensor box. I think I can do everything using just three boards. I will have three different regulators and the thermistor op amp circuit on one board. Another board will have the differential pressure sensor and its instrumentation amplifier. The third board is already built. It is the absolute pressure board.

I made the PCB layout for the power regulator board, but I forgot to connect the second op amp in a variable voltage regulator circuit for the offset in the instrumentation amplifier circuit. I am using offsets and signal inversions in some things so that under typical conditions I can avoid the extra noise associated with signal voltages near to ground.

I don’t know why, but radio shack closes in Ames at 5 or 6 pm on Sundays. This threw a monkey wrench in some of my plans.

I’ve spent some time looking for some free PCB design/schematics software. I found one that works fairly well, but it doesn’t output a clean image for transfer to a board. I have to take a screen shot and monkey with it to get it to print in the right scale. Now All I need is to borrow someone’s clothing iron to transfer the printed layouts to the boards. Then I’ll be in business. It is too bad custom PC boards are so expensive. The software told me that my boards would be over $40 each. Maybe that foreign company has a better deal. I think I will check on that. For now, I will try to do the boards in my high-tech dorm room manufacturing facility.

1/16/2005

1st Saturday back at school

Filed under: Senior Project — von der Lord Larry @ 1:40 am

I’ve spent between 12 and 14 hours today working on the recon UAV project.

In case I didn’t mention it last time, I have an airplane to put the electronics in. It is a 15- or 20-pound super decathlon with a gas engine. It has a JR PCM receiver in it, but unfortunately I can’t use it since my radio is Futaba. Instead I’ll just stick to the Tower Hobbies PPM reciever that I already modified. I just hope I don’t have too much trouble with interference from the ignition. Maybe I’ll just wrap everything in foil. I should make sure it has a resistor spark plug instead of one of the normal ones.

I didn’t work on the project during the school week. I really need a room in Howe to do some of the work, since some of these things are probably not a good idea to do in the dorm room. I don’t think the aero dept. is likely to give me any room after last semester’s 462 debacle.

Today I started working on the computer again. I put a separate voltage regulator in the box for extra things that I can’t go without, such as blinking blue lights. At least now my project has some coolness. I should take pictures of the lights. This wasn’t entirely trivial; it allowed me to test some code for the relays. I also fastened the DB-9 connectors to the case.

While I was Still at home, I realized I would need a way to measure atmospheric temperature so that the air density could be calculated. I had a spare 10k thermistor in a pile of old components, so I hooked it up to the ADC in a half-bridge and tried to get some readings. It worked in the sense that it responded to my body temperature, but it bounced around when I messed with the wiring.

I think there might be some noise issues in my box. I did a little snooping and found that I also might run into some ground loop trouble coming from my air sensor box. Since it measures everything from with respect to the flashlite ADC ground, my system is at a disadvantage in when it comes to ground loops and other interference sources. I intend to somewhat offset the effects of the ground loop by measuring the difference between the sensor ground and the flashlite ADC ground, and then subtracting that from each of the other measurements. I think this will compensate for the fluctuations in the flashlite’s ground level when large things are turned on or off. Another thing that I can now see is that I will need to low pass filter everything coming from the air sensor box. Depending on how steady the resulting measurements are, I may also have to start shielding things inside the computer box. It could be a real noise mess in there, but I think the low pass filter will take care of lots of problems since I only need like 10 Hz readings.

Back to the thermometer. I decided to remove it from the computer box and put it in the air sensor box. To do this I had to take up a voltage reference line that I had originally intended to use as a supply for the infrared sensors. I think I will use an op amp in the thermometer circuit instead of just a half bridge. Now I will have to generate 3 voltages in the sensor box: 5 volts for the differential pressure sensor(easy), 8 volts for the absolute pressure sensor (done), and 3.8 volts for the infrared sensors. I don’t know the current draw of the infrared sensors yet, so I will just use a transistor regulator instead of a splitter. I think the variable voltage one can be made to give a steady 3.8 volts, provided it is supplied with a constant voltage by another regulator. I need to remember to put some capacitors in the power supply circuits to smooth things out.

I just counted the external pins on my computer box. So far there are 41, of which only about half will be used. The air sensor box will have 8 external pins. The imu box has 37 pins, of which 31 will be used. That makes me wish I had made the connectors or something. Then I would have at least done something impressive.

And that is pretty much that.

1/7/2005

Christmas break

Filed under: Senior Project — von der Lord Larry @ 10:44 pm

The airplane has been found. It is a Super Decathlon. The engine is a Zenoah G38. The computer boxes are mostly assembled. The IMU box is assembled and tested. The 7-channel Tower Hobbies FM reciever has been modified to output multiplexed PWM. It has been tested. Servo data logging and servo override functions have been verified. The altitude sensor board is finished. Development of test programs has started. The airspeed pressure sensor is still on back order. The third axis of thermopile sensors is still on backorder.

Powered by WordPress