Monday, 31 October 2011

Error in accelerometer

A Repost of something I did while working on a project a while ago.... Throughout it might be of use to someone.
Today i wrote a fairly simple program to plot position from accelerometer values. It wasn’t too complicated, just a simple python program that reads accelerometer values from the 9DOF accelerometer package (relayed from the ardwino). The hardest part was stripping out the data i wanted from everything else the accelerometer outputs. I had to restart my computer manny manny times initially because i hadn’t figured out how to close the serial stream and for some reason if you close idle with the stream open the keyboard stops working…. I used two of the equations of motion, v2 = v1 + at and s2 = s1 + vt to convert from acceleration to velocity, then to time. There were other methods but this was the easiest to implement.
And what were the results? Not good…….
Here is a plot of acceleration, velocity and position (green, blue and red consecutively) in the x axis Vs. samples (25Hz)  for the acceleration sitting still. As can be seen the error in velocity isnt too bad, but error in position is an order of magnitude more (about 0.25m per second).
I had been hopping for something in the order of a few centimetres per second. This pretty much kills dead reckoning.

Saturday, 29 October 2011

Uni has been hectic lately but all my assignments/thiesis are done so all thats left now is two exams.

I have been learning allot about peroxide over the last month as its the direction I would like to go in. I have managed to find  good supply of bulk %50 food grade peroxide, but it is heavily stabilized.


The first picture is the %50 food grade peroxide. As can be seen it has quite allot of floaties which I believe to be either colloidal stannate or silicate. The bottom picture is %35 reagent grade peroxide as can be seen there are very few particles suspended in it. The few that are visible are a few visible i believe are from not washing the container properly. The reagent grade is probably lightly stabilized. 

I wondered how much the stabilization ada an affect on decomposition, so I did a test comparing decomposition of the two grades. I found out that despite being lower in concentration the %35 it was significantly more reactive when a exposed potassium permanganate catalyst. The first video is of food grade and the second video is of lab grade. As can be seen the %35 reacted faster than the %50






I have ordered a hydrometer so I can measure the exact concentration of the two grades. Using a TDS (total dissolved solids) I measured 0.33g/l for the food grade and 0.26g/l for the lab grade. This was interesting and made me think that the lab grade was more stabalsied than I had initially thought. It also means that the lack of reactivity of the %50 is dependent on the colloid, although without knowing what dissolved stabilizers are present a conclusion can't really be drawn on how much.

For removing the coloid I am going to try a fine carbon filter. For the dissolved stabilizers I will use an ion exchange resign. I have some resin and will give filtering it a go soon, and see what affect ti has on dissolved solids. Ii should be easy to see if the carbon filter has any affect.

I am still looking in to methods for contentrating it. Ideally I would like to use %90 for fuel but initially I all probably concentrate it to %80. A method which seems to be popular in the rocket belt community is distillation under a vacuum. It has a high yield with little loss but also results in the occasional explosion. Normally peroxide vapor at atmospheric pressure will explode, so distillation is done under vacuum at which the vapor is stable. The problem is if you loose your vacuum the peroxide in your distillation column will probably decompose (violently). The articles I have read written by people who produce HTP for their rocket belts all say: design your apparatus for an explosion and stand behind a shield. Everyone who distills peroxide seems to have had at least one explosion. It seems you would have to be crazy to try distillation but then again these are the people that ride rocket packs! 

The other method which is most popular among the amature rocket community is sparing. This involves bubbling a dry gas through the peroxide. Since peroxide has a vapor pressure 10 times less than water the water will evaporate 9 times faster (in theory).

Fractional crystallization (freezing) is another method that doesn't seem to be widely used. It takes advantage of that fact that the freezing point of water is different to peroxide. The difference depends on the concentration of peroxide/water. Its interesting that for concentrations of bellow %62 the water will freeze whereas for higher concentrations the peroxide will freeze first. What is sometimes done is to sparge to around %65 then separate the peroxide by fractional freezing. 

I read a very interesting article on a patent that NASA own that uses a membrane filter with sparing.  A plan of this can be seen bellow.

The membrane (similar to a reverse ozmosis membrane) has a selectivity towards water (it prefers to only let water through) although because peroxide and water are similarly sized so it does let quite a bit thorough  (the articles says 2:1 water :peroxide is good)  The sparge gas then takes away the liquid that gets through the membrane. I do see a flaw in this method, or possibly I am missing something. Assuming that the membrane filter tubes have air in them (the sparge gas), some peroxide and water (more water than peroxide) but all liquid that gets through will be evaporated if the membrane tube is to not get filled up with liquid. If thats the case then I can't see what the point of the sparge gas is. You may as we'll just  use it like a typical reverse osmosis setup. Doing that you can turn %50 to %75 (2:1 selectivity). You can either throw away the waste of save it then repeat the process with it (25 to 37.5). 

I will probably just concentrate on sparging for the moment as it seems to be the easiest to get going. I have started designing a regenerative desiccant dryer, and I plan on using a aquarium air pump to pump the air for sparging. I should be able to get it decently concentrated just using normal air on a reasonable dry day.

I am becoming concerned about the safety aspects of using using peroxide. Sparging is quite a safe method but there is still the issue of safely handling it. Also it can become quite dangerous if contaminated with things that will burn. I don't plan on concentrating any significant amount until I get the new workshop sorted out, which should be over the next few weeks. I have ordered a full face shield (at the moment I am wearing enclosed protective goggles) and will probably order a safety shower for the new workshop. I am considering buying a protective PVC suit to wear but that may be overkill. Armadillo and lots of others regular handled %90 just take basic precautions of eye wear and pure cotton clothing. I would like to develop some strict guidelines which we will all use to handle the peroxide (no matter what concentration it is).

We are still planing to get the nitrous engine up and running, but we are just waiting for another opportunity to test. This will be in the first few weeks of the holidays.

Tuesday, 27 September 2011

Cancelled Test

We had been planing to conduct another test last weekend but unfortunately  it had to be cancelled the night before.

The source of the problem was that the new H-Bridge motor controller dent have the power to drive the valve motors. I hadn't tried it before then because I thought it would be a trivial task and a waste of time, but I learnt yet again that few things are simple. When buying the motor controller I noted at the motor's specs and noted that it retired 3A while moving. The motor controller could provide this, but I didn't take into consideration that it required allot more current to get moving. So If I hand started the motor it would work, but it couldn't start on its own.

I had been working really really hard last week to get everything finished and it is quite disappointing to have to cancel the test. We probably won't get another shot to test before the Christmas break, because I have exams coming up which I really need to concentrate on.

In the last 6 months I have learnt a really important lesson - things are usually harder than you think they are going to be - The entire reason I used actuated valves was so that I can vary the amount of fuel or oxidizer going into the engine. I think that to keep things simple I will replace the actuated valves with solenoids. Once I get the engine going they can be switched back.

Another example of how things were not as simple as I thought they were going to be is the relay back. Apparently (didn't  say it on their ebay page)  they wired active high. This means they are closed when they are open and open when they are off. If I used them like that it would mean that if the relays lost power everything would open (solenoids etc.) at the same time as the igniters ignited. Not the ideal situation. Ariel suggested I modify them, by removing a resistor and attaching the signal line to one side of the removed resistor which worked quite well.

So I guess I really need to make less assumptions and check everything!

On the valve front I would like to continue development of actuated valves as they will be extremely useful, but the current implementation is a bit haphazard. It will work for just opening/closing but I am not sure I will ever get the accuracy I want out of them without some major modifications. In the past I had thought that all the play had to do with the method used to attach the motor shaft to bearing plate. I have now realized that there is also quite allot of play in the reduction gearbox itself.

Originally I had considered using a large RC servo to actuate valves, but wasn't sure if they would have enough torque. After talking to someone the other day who told me about a 1/4 scale servo he had that nearly took his finger off and i thought... thats exactly what I need! (not the finger bit). I bought  cheap 1/4 scale servo, which I will test soon (once I get a torque wrench). It reckon it has 3.2Nm of torque, which might be enough to open a valve. If not there are two options. Get a better servo (the one I got was relatively inexpensive), or get a valve with less resistance. The valve I am using at the moment is good because its cheap and rated to high pressures but it has a few downsides. The torque required seems to vary greatly depending on the pretension on the ball and the pressure, so i might be able to reduce the torque required at a particular pressure. Alternatively I could get a valve with bearings. I would like to research the different types of valve available.

On another note I now have a engineering job which is keeping me busy. In someways having a job is good because I now have more money to put into rocketry, but the downside is I have less time to use the stuff I buy. I have so far avoided buying stuff I don't need and turning into one of those old men... but it is a struggle! At some stage I would like to purchase a CNC mill, but I really don't have any need for it at the moment (not to mention any place to put it). I have been considering moving into a dedicated workshop space for a while now and now that I have a income I am able to. Ariel and I are looking at something about 100m^2 which should provide plenty of room. We have inspected a few places in the inner suburbs, but they are all a bit pricey, so we will likely go a bit out of the city. Over the holidays I will be working full time so I just hope that I will have enough time to work on rocket stuff. I would also like to start building up a group of rocket enthusiasts to work on projects. There have been manny discussions about the best way to organize such a group.



Thursday, 15 September 2011

I have been quite busy with uni and work over the last two weeks but have tried to find the time to finnish off the things that need completing before the next test.

I had planned on conducting a test this weekend, but for a number of reasons it was postponed to next saturday. Although I am keen for another test it was probably the right decision to postpose the test, because although I could have probably got the electronics don't in time one of the things that was done poorly in the last test was rushing, and hopefully I can have everything done this weekend so I will have one week to double check everything is working (100% !)

In the way of electronics I have:
  1. Installed the new relay bank - Much much neater now. (diagnosing was a problem at the last site and I have a spare it can be swapped out with.
  2. Installed the speed controllers
  3. Made 12v and 5v regulator boards for the router and usb server
  4. Tested the trimpots and started making their breakout board
  5. Tested the pressure transducers and started making their board
  6. Allot of wiring in-between the new components
I still have to finish the sensor break out boards. Annoyingly the only precision trimpots I could for less than a bizillion dollars find were 10 turn. It didn't say that on the ebay listing but I should have known from how long they were. This means that I only have 1/4 of a volt between the half turn from full open to full close. If the trimpot is +- %5 this means there is 0.25v error (same as the resolution they have)! Although thats the absolute error over all the windings in the pot, and i suspect the actual error would be less (as it will stay roughly in the same position) its still not good. I might pick up a cheap one turn pot (10-20% error that will have less error and more range (1v error of its range @ 20%) which all be better than the 10 turn precision one. I am also having troube with the vregs overheating. I am not exactly sure what current I am drawing but they are rated to 3A and they are getting quite hot. I will have to fix a heat sink, and a big one. Heat could be an issue in the un-ventilated boxes. i also have to wire up the transducers so that the max output is 5v, where the default output is about 6.5.

I also bought two needle valves I would like to connect up after each main actuated valve. The reason for that is I am paranoid that too much propellant will go into the engine during start up with bad consequences. A needle valve will allow me to precisely calibrate the maximum flow.



Saturday, 3 September 2011

yesterday Buren and I worked for most of yesterday and finished the improved actuated valves (minus two shaft couplers I have to lathe). I also tested the pressure transducers and found them to be simple to use. We then started on a few modifications to the plumbing including adding a manual vent to the ox side plumbing. I was hopping to have the electrical components I ordered by now but they should arrive next week and won't take long to install. I also made a start on rewiring the relay box by removing all the old relays and mounting and wiring the new motor controller.


Hopefully  the new motor controllers combined with the feedback will mean good control over valve position, but I suspect that it won't be good enough for precise throttle control (like the kind that would be needed on a hovering vehicle). A ball valve is needed because its quick to actuate, but I was thinking why not use a actuated needle valve and a ball valve in series. A needle valve is not quick enough to be used as the main valve (would take a few seconds to open) but they are much more accurate at setting flow rates, and once the engine is going thrust won't need to change any after than this anyway. Just one possible mod.

Friday, 2 September 2011

I am still waiting for some of the electronics parts to arrive so haven't been able to do much work on electronics.

I also ordered new Nitrogen and Compressed air bottles from supagas (as they were much cheaper than BOC ) for the next test. Looking through the price list I was trying to decide what size to get, and decided to go for the 9.5m^3 over the 3.5m^ as it was only $10. I didn't consider the size of the bottles, and the G bottle is a bit larger than I was expecting. I will probably have to lie to down in the trailer (horizontally) but having lots of extra gas means I will be able to throughly pressure test without worrying about running out of gas.

We also did a wireless test of the new WIFI control system and found it worked excellently at 200m with the routers default antenna.

Thought I would post a few photos of Buren has taken of the last month.







Sunday, 28 August 2011

Buren and I worked yesterday on fixing up the oxidizer tank mounting. I was thinking the other day about the run tanks and concluded that their no different from the tanks used by commercial hybrid rockets (as the tank is of course vented to reduce the pressure inside).We decided to just bolt the tank to the test stand as we were having difficulty with the steel round system.

We also removed the actuated valves and mounted the valve hardware to a much thicker piece of c section as the valves had a bit of flex at the last test. Also at the last test Buren broke off the head of one of the bolts holding the valve plates on so we had to drill out the remaining pieces of bolt. They came out easily so the hole didn't need re-tapping. I also made the mounting plate to hold the potentiometers (for feedback).

I am just waiting for the electronics to come then I can start on upgrading the electronics.

Unfortunately the next test will have to be delayed by a week because Ariel and Rob will be busy during the planed test day.