Tuesday, 21 June 2016

Flamethrower footage

Bound to be the most entertaining flamethrower post to date, all the footage I have so far of me firing the flamethrower. Enough squirting water and pressure testing, lets get to the real deal! 
First if you are impatient, here are a couple short GIFs:

Those GIFs and the next couple of videos are of version 1 of the flamethrower, with the longer hose and primitive nozzle. This video is the same as the first GIF but a bit better quality if you want to see the flame better:
The next two are fairly short, first in slow mo, second in non slow mo. Shot during the same tank of fuel as the first one:

And if you are a bit more patient, here is one continuous clip of the whole tank being shot off, taken at the same time as the other shots, but with slow mo in different places and as one continuous shot:
This next one is footage taken with the camera mounted to the wand during the daytime, with the upgraded tip. Im shooting a bit into the wind on this one. (A screenshot of one part of this video is where I got the picture for the top of my blog) 
And then these last three are different perspectives of the same night shot. First, one taken from a ways away (Probably my least favourite)
One taken from the POV cam on the wand:
And my favourite, mostly because of the dialogue, one shot from up close by a friend:
Well there it is! All the footage I have of the flamethrower being fired. I probably won't get anymore till it cools down again and we get some rain due to the high forest fire risk, but when that time comes, I can't wait to test out the shorter wand hose and shorter propellant tank mount. Hope you enjoyed it!

Monday, 20 June 2016

Flamethrower details

In a previous post, I mentioned that I had been building a flamethrower on and off over the last year or so, and at the time of the post I had not completed it yet. I was also a little sparse on the details and pictures. Well anyways I have long since gotten it finished and actually revised the design slightly. So here are a few more details and pictures and whatnot of it all.
First off is this one. This shows most of the components of the flamethrower before it was assembled:
A quick picture of the tank as it is holding its very first pressure test:
And a closeup of the bottom showing where I drilled and tapped the bulkhead fitting into the tank.
Getting that hole was no easy task. I think I ended up turning a floor mounted drill presses table 90 degrees to what it normally is and using about 7 ratchet straps to secure it to the table at the right spot. But I got it made. You can see where I spent a bit of time with a sander, smoothing out any inconsistancies in the metal and removing all the paint where the o-ring seals.
Here you can see detail of both the torch mount, custom made from some scrap sheet metal, and the device that I made to prevent the fitting from turning in the bottom of the tank or coming loose. Hydraulic hose does not have any torsion at all to it. If you twist one end, the other one is twisting as well. I was worried that if I accidentally twisted the gun handle or whatever, my fitting would start to spin out of the tank or rub the o ring or any number of other bad things. So I took a piece of nice thick aluminum I had laying around, roughtly cut it to fit the bottom of the tank and extend out one side. Then I painstaikingly drilled and filed and drilled and filed and drilled and filed some more until I had a perfect hexagon that fit right over the fitting. I drilled a hole just on the side of the tank and secured a bolt thru it. Then hose clamped the bolt to the tank in exactly that position, effectively eliminating any possible movement.
Heres a picture of the flamethrower all completed and waiting to be used. In this shot I have a HPA tank hooked up instead of a CO2 tank because I believe I was again doing some water testing.
And this is how I store it. The barrel unthreads from the gun handle for ease of storage, the valve unthreads from the the top of the tank and the paintball remote line has a quick disconnect on it. 
I mentioned in my previous post that the spray coming from the wand was dissapointing in range, and so before I even tested it with fuel instead of water, I went to the hardware store and purchased several 1/4" caps to thread on the end of the barrel and drill different sized holes in to see which was the most effective.
I ended up using one with a hole this size:
It did work fairly well, I have some video that I will post later showing the flamethrower firing using this tip, but I found that as it shot out, the harsh reduction in size caused the water or fuel to spray out and atomize more quickly rather than coming out in a stream as is more beneficial to a flamethrower. Nonetheless it did work and produced some impressive flame, it just needed to be improved.
Princess Auto came to the rescue with a 1/4"x1/8" reducing coupling and a 1/8" small nipple. Both designed to be used in hydraulic systems and therefore rated to 5000PSI or so. The 1/8" nipple is a fair amount smaller inside due to the thick walls needed to contain such pressure and has nicely beveled ends on both ends that cause a much smoother transition for the fluid and therefore more stream and less spray. The smaller ID means less fuel flowing thru, and therefore perhaps slightly smaller flame but longer lasting. I can always drill it out if I find myself needing more flow. Here are a couple of pictures of the upgraded nozzle:
Gotta have the first person camera to capture all the fire coming out of this thing, so I cobbled together a mount from PVC and pipe clamps. This is the only piece on this whole build that is just kludged together without much care. Its a non critical part, and I wanted it to be easily customizable.
Here's what the buisness end looks like. I think it looks kinda threatening personally :)
And for the final picture of the day, here it is as it is sitting right now. The other two modifications that you can see are the shorter line running from the tank to the gun handle and the shorter propellant tank assembly.
When I was first designing and building my flamethrower I wasn't totally sure how long of a hose I would need between the backpack tank and the gun handle, and because I didn't want to come up short, I bought and used a 6' hose. Which did indeed work, as you will be able to see from the videos of it in action, but it was not optimal. First of all, I am a tall guy and the hose hung down and almost dragged on the ground, not very practical. But more importantly, the longer the hose the more line pressure loss you have due to friction and other things. I'm sure if you asked an engineer, they would be able to tell you exactly why. I just know that as short as possible is better. So having some practical experence under my belt, I settled on a length of 3' for my new hose. Its just about the perfect mix of length for manuverability, without being too long and having too much line loss. Also hangs to a much more reasonable height above the ground. The second mod also has to do with simplification and  line loss. The paintball remote line was quite long, and had the quick disconnect fitting on it. I already covered line loss, and the QD was a little finnicky. Needed to be presurized and then wiggled around to seal properly. And having to hose clamp the tank to the fuel tank and undo it every time you needed to change tanks got old fast. All those problems were solved by just buying a paintball ASA (the thing you screw onto the top of a paintball tank and just connecting it directly to the CGA346 adapter that threads into the valve. Less line loss, no finnicky o rings, and easy bottle changes.

To end this post off, here are the videos that I took while pressure testing once all the upgrades had been made. First one is pressuring it up and describing the modifications, second is from the first person camera showing the upgraded spray pattern. Enjoy!

Wheelchair hacking part 2 (running under RC now)

Got home from work yesterday and promptly drove the wheelchair over beside the kitchen table and loaded it up with my laptop, oscilloscope, couple multimeters, notepad and all the other random stuff you need for a bit of hardware hacking:
I don't have any proper oscilloscope probes, so I just cut a BNC patch cable in half and then soldered a couple twisted pairs from a CAT5 cable to the ends. I'm not using them for any really sensitive low voltage applications or high frequency stuff so no sheilding and whatnot is totally fine.
In my previous research I found a couple of sites that have the pinout and some other data on either the joystick that came with the wheelchair, so figuring out which wires are what was pretty easy. (Ill post a list of the links I found helpful in my wanderings at the end of this post)  I hooked one of the two outputs from both the X and Y axes to the oscilloscope and flicked her on:
Everything seemed in order, it was working just as expected. I also realized that my oscilloscope can use the two channels as an X/Y plotter. Here is a video of what that looks like. Note that the joystick has a circular range of motion:
With that done, I turned my attention to the Arduino. Got some really basic code up and running that takes the signals from an RC transmitter and maps them to values that the DACs accept and then sends it to them. The DACs output a voltage in proportion to the transmitter's joystick. Heres a video of that one. Note that the Tx has a square range of motion. I wasn't sure how that was going to affect everything but it turned out fine:
Now that I knew the signals that I needed to emulate, I just spent a bit of time with the oscilloscope, one channel hooked up to the original joystick and one channel hooked up to the DAC's output, making sure I ended up always inside the original joystick's envelope for the X and Y axes. It would have been nice to have a 4 channel scope while I was doing that, but I made do. Once I had a good match from the RC stick to the original joystick, I shut everything off, disconnected the direction wires from the joystick (Left it with power and the center signal because the controller board needs to see that.) and connected them to the DACs.
I didn't want to just put both inputs from each channel together on the same output from the DAC because I assumed (and read elsewhere on the net) that the control board has some logic that detects that and locks out. So all I did was connect the DAC output to the anode of two diodes, and one channel to each of the cathode. Aside from the voltage drop across the diodes that made me run thru the whole process of connecting the scope up and matching the signals again, this has been working perfectly and only requires me use one DAC for steering and one for throttle.
Here it is all connected and spread out on the table:
And transfered over to the top of the chair:
Because I didn't want over a hundred pounds of metal and plastic putting a hole in my house from going haywire, I gave it a quick test with the clutches disengaged on the chair:
That went so well I engaged the clutches and drove it around the kitchen a little:
But wheelchairs, and this whole project, were designed to be driven outside not inside! So I drove it down the sidewalk to the local park (by now it was past midnight, so the lighting was not so great, fortunately the park has some streetlamps in the parking lot.) and put it thru its paces:
Once I got back home I just started cleaning the wiring up a bit. I routed the joystick connector outside the joystick case, made a little cover for the hole out of some sheet metal and hot glued in all in place. Hot glue is great cause its pretty strong and is waterproof. So once I got the control box screwed back together, it regained its water resistant status:
Tidied the wiring sitting on the top of the wheelchair up a bit:
And heres a closeup of the electronics that make it run. The UNO clone provides power is connected over I2C to the two DACs on the right side of the breadboard. Those provide the voltage out, which is fed over the brown and white twisted pair to the other side of the board, thru the diodes and to the wheelchair control box. The ribbon cable out the bottom goes to the wheelchair box and the wires coming out the top go to the joystick.
Since I got it all working and controlled by an RC transmitter, the next logical thing to do was tie down strap my snowboard onto the top of the chair and go for a rip around the neighbourhood.

I got more than one strange look but I had a lot of fun. Anyways thats all Ive got for now, next up is building a failsafe/joystick isolation board for a bit of safety and allowing me to seperate the added electronics from the original wheelchair electronics.

Realized after I published this post I said I would post all the useful links that I have found. Well here they are:
This one to a Stackexchange page asking pretty well what I want to know
This 2 page forum post that the Stackexchange post gets its info from
This interesting instructables post
This page from the manufacter of the joystick that shows you how to enter calibration mode
Product page for the DACs that I am using
And last but not least Adafruit's awesome tutorial with library for the DACs

One last thing. Here is a copy and paste of the code I have running right now on the arduino:

#include <Wire.h>
#include <Adafruit_MCP4725.h>

Adafruit_MCP4725 steeringout;
Adafruit_MCP4725 speedout;

int speedin;
int steeringin;

void setup(void)
  pinMode(5, INPUT);
  pinMode(6, INPUT);

void loop(void)
  steeringin = pulseIn(5, HIGH, 25000);
  speedin = pulseIn(6, HIGH, 25000);

  speedin = map(speedin,1035,1875,1310,3522);
  steeringin = map(steeringin,1035,1875,1310,3522);

  Serial.print("    ");
  speedout.setVoltage(speedin, false);
  steeringout.setVoltage(steeringin, false);


Thats it, thats all folks!

Thursday, 16 June 2016

Hacking a power wheelchair

Awhile back I purchased a Quickie Explore electric wheelchair with the intentions of turning it into a large outdoor robot platform to continue my explorations with GPS and mounting such things as a paintball marker to it. An electric wheelchair is the next logical progression in the series of outdoor robots that I have started and never ultimately finished. I keep getting near completion of at least a basic functioning base when something better comes along. Anyways, I think and hope that along with Raven (Which I have made some more progress on, or had anyways until the rear differential stripped out on the savage flux RC car base) this will be the final outdoor robot for a while. I have always dreamed of having an electric wheelchair with which to hack into an outdoor base because they are close to an ideal large outdoor base. Lots of battery life and payload capacity, like LOTS, very good motor controls built in, and very stable. I consider this and Raven to be parallel developments, as while they are both outdoor bots, they have quite different properties, raven being reletively small and very very quick and this one being much larger, slower and longer lasting. Perhaps in the future when I become a better programmer I will be able to make use of Raven's speed, but for now slow and stable are very good traits to have in an outdoor robot. Anyways, I had anticipated using the stock motor controller and joystick assembly, but taking the actual joystick out and emulating it with an arduino and some additional electronics. Before I opened it up, I thought that the joystick would use a couple of potentiometers as most joysticks do, and which I would be able to replace with a couple of Digital Potentiometers that sparkfun sells.
Well when I opened it up that was not the case at all. There was a large circuit board holding a bunch of electronics and an 8 wire ribbon cable attaching to a very scary looking joystick. After doing a bunch of research on the net, I found out that in fact it is a sealed unit that contains not 2 but 4 hall effect sensors which it uses as outputs. Each direction (X and Y) have two hall effect sensors that output similar but not identical signals as a sort of failsafe. The controller looks for the signals to be slightly different within a tollerance but mostly the same and if either signal strays too much from its partner, the controller detects this change and locks out. So in order to emulate the joystick's outputs I need true analogue voltage fed into the control board. I am not sure yet, time and some testing will tell, but I may be able to feed the same voltage into both of the pins that the board expects to see slightly varrying signals from the two hall effect sensors and recalibrate the control board to think that is normal. If I can then I can get away with only needing two analogue signals instead of the 4 the joystick currently feeds the board. Time shall tell. 

Enough of the boring postulating and onto the pictures of what I have got going right now!
Last night I was able to work some on the practical hacking of the joystick assembly. 
I cut the ribbon connector connnecting the joystick to the control board and soldered some 0.1" male pin headers to both the control board and joystick ends so that I can easily attach them to a breadboard and mess around with the connections and listen in with an osciliscope or multimeter to whats going on over the various connections. I was able to actually find a pinout (I think anyways) of the joystick online so I should be able to see whats going with relitive ease. Note hot glue as a very effective strain relief.
That done, I started working on the arduino/emulation electronics. Because a true analogue voltage and not a messy PWM quazi-analogue signal like the arduino's analogueOut function provides is needed to emulate the joystick, I chose the mcp4725 12 bit I2C DAC to provide that. I tried to find a 4 channel digital to analogue converter that I could use with the Arduino to no avail. The mcp4725 is an I2C device, but unfortunately it only comes in assignable to two I2C addresses. (Not entirely true, Adafruit makes a breakout board that has the addresses of 0x62 and 0x63 and sparkfun makes a breakout board that has addresses of 0x60 and 0x61 but I am cheap and impaitent. So I just got some clones of the sparkfun boards from some Chinese vendor on amazon.com, meaning that I will only end up with two possible assignable addresses). So if it proves that I do need to provide all 4 signals to the control board instead of just two, I will end up having to use two arduinos, each driving two mcp4725s to get all of the signals.
I downloaded Adafruit's mcp4725 library and uploaded the triangle wave demo sketch to the arduino, connected up a mcp4725 and.... Nothing. I had changed the I2C address to 0x60 in the example because the amazon clones of the breakout boards were clones of the sparkfun boards so I foolishly thought that they would have the same addresses as the sparkfun ones. A friend of mine with more paitence than me read a bit of the datasheet and rewrote the program to initialize 6 mcp4725 on all six (apparently the maker of the chip actually allows 6 addresses depending on the version, tho only 4 are commonly availible. Sparkfun's and Adafruit's) availible addresses and give a constant voltage instead of a triangle wave, and this time we had some action! Turns out the clones I have have the adafruit addresses of 0x62 and 0x63!
To change the address on the breakout boards, you have to cut two jumper wires on the underside of the board and change one solder blob on the topside. I did that and wired up the two boards to the arduino, wired the outputs to two multimeters (Thats where those bare wires sticking up go when everything is all connected up) and uploaded this sketch to the arduino:

#include <Wire.h>
#include <Adafruit_MCP4725.h>

Adafruit_MCP4725 dac62;
Adafruit_MCP4725 dac63;

void setup(void)

void loop(void)
      dac62.setVoltage(4095, false);
      dac63.setVoltage(1024, false);

Thats about as simple as it gets. The values are based on a formula you can find in the datasheet, but pretty well 4095 is 100% of the supply voltage and 1024 is about 25%. In this case it spat out 4.96v and 1.24v. Pretty freaking decent. Unfortunately I don't have any pictures or video of that part happening, but it all worked out perfectly. Thats as far as that part has gotten, it will probably stay in about that state on the breadboard until some more testing with the wheelchair is complete.

Speaking of wheelchair testing, before I got too carried away, I wanted to make sure all my solder connections were all good and some extra length of wire between the joystick and controller was going to be OK so I got everything all together and hooked up on the wheelchair and tried it all out.
The batteries are just sitting behind the battery bay because they are a huge pain to get in there and I wasn't planning on driving it around anyways.
Controller plugged into the actual motor control box at the front (You can't really see it that well in the pic. Normally it is covered by a nice protective metal cover as well.
And the hacked up joystick controller sitting on top connected to the joystick by a nice ribbon cable I had sitting around.
Annnnnnddddd heres the video of the quick test I did to make sure everything is still running tip top. 
Next steps are to drive it over to where I can set up my computer, osciliscope, a couple multimeters and all the arduino stuff and get sniffing on what I need to emulate and see if the joystick controller will take the signals from my mcp4725s like they are the joystick. Hopefully it all works!