A few years ago, I made a one of a kind device to wiggle the guns on Darrell Sprayberry's Cobra. He few years went by, and he wanted another. And then a few more folks wanted one, too. Well, that was OK, but I didn't have the hardware to make those any longer. That part of me that is crazy for a good challenging, small project, liked the idea of making a new one, that like The Bionic Man, would be better than the original that it replaced.
The basic criteria was to build a device that would wiggle the guns on an Apache, and try to randomize it in some way so that it would look realistic. After some thought, I finally settled on a basic algorithm that would do a good job simulating these movements. Russell Stockhausen turned me on to a few good Apache videos for inspiration! So after studying them, I came up with some solid ideas and implemented those.
The device is a 3-axis controller, which means it can control up to 3 independent servos. Each servo has a dedicated enable channel. When enabled, that servo will move. When disabled, it will seek neutral and park itself there. You can setup it up so that one input channel controls all three outputs if you wish. Using some Windows software that connects to the Wiggler over USB, you configure the endpoints and neutral for each servo, the speed range for each servo, and a delay range for each servo.
The Wiggler then, chooses an end point on the opposite side of where it is now, randomly choosing a location that crosses the midpoint, but doesn't go over the max end point. It chooses a duration of travel, randomly, between the min and max travel times (1/2 second to 10s), and then chooses a random delay between the min and max delay times, so that it pauses motion and sits there for a moment at the end of its stroke.
The device itself looks like this:
The Windows software looks like this:
And here's a short YouTube video that shows the Wiggler in action on my work bench. I don't have it installed in an Apache, unfortunately. But I did connect 2 servos together and some plastic to simulate the gun, to give you an idea of what it might look like.
That video is here. You just have to use your imagination as if it were on a helicopter.
There are three people who have them so far, Darrell, Joe B, and Russell. Hopefully, they will install them into their Apache's soon and show us what it all looks like.
As some of you may know, Darrell is now producing the Indy Heli's Apache... Darrell will be selling these Gun Wiggler's soon. You can contact either of us for details if you are interested in purchasing one.
Joel I'm as slow as a wet week getting stuff done - I've working on how mount the servo's to get the various movements - slaving the gunners head to the gun etc Hopefully I'll get a "wiggle on" to anyone whos interested I can confirm these are very well made and the program appears simple cover all the functions I'll need I'd suggest there are many other applications it would be applicable for other than just an Apache gun wiggler Cheers Joe
On the J Curve of all things Heli I'm Still heading down hill fast
Joel cant thank you enough for developing the gun wiggler, who would have thought the monster we all thought up at IRCHA would finally be realized in such a neat package. its the finishing touch my Apache needed
Very cool Joel! For my upcoming Cobra I was thinking of needing something like that. Not knowing of your design on the matter I started to play and program similar functionality with the Arduino board and it was amazing! I just got it to do several servos random with the right end points and speed. I loved what the Arduino can do too.
Thanks Jack. I feel like I am in good company with many amazing people here.
To Gonzalo's point, yes absolutely, someone can make their own custom device with an Arduino or any other microcontroller they wish to use. To make a custom device requires skill, time and interest that not everyone has.
If you want something ready to go, then getting a ready made device makes sense. If you want to design and build something yourself, then starting from scratch and doing that makes sense.
Clearly, with all our friends at IRCHA asking me to make such a device, it's clear that not everyone wants to develop the software and hardware for their own. This is for them. :)
My Blog quin?by, verb, 'kwin-bE: 1 a: To crash (your helicopter) on the maiden flight. 2 a: To roll (your helicopter) over, destroying the main blades. e.g. I quinbied my helicopter yesterday. Don't quinby the helicopter. He who quinbies often, has a good relationship with the UPS driver. If you're not quinbying, you're not flying hard enough.
For unconnected projects to do with my design and prototype buisness's ive developed a couple of things that need an interface. Ive tried to get my head around various programming languages getting the most joy from vb but ive found its a bit too basic (lol) for my needs. Are you coding from scratch or are there programs out there that do for programming like dreamweaver does for websites?
Love this unit and the light flasher, both on my wish list for the future.
Going through a fpv multi rotor phase at the moment.
For unconnected projects to do with my design and prototype buisness's ive developed a couple of things that need an interface. Ive tried to get my head around various programming languages getting the most joy from vb but ive found its a bit too basic (lol) for my needs.
There are two components to the software, 1) the firmware which runs on the device, and, 2) the Windows Application Software that lets you configure the device. The firmware that runs on the device is written in a a language called SPIN. It's a language designed by the chip manufacturer that's specific to their multicore CPU. It has similarities between C and Basic, but is not quite either of them. But it's perfectly suited for taking advantage of the capabilities of the chip, which is great. The Windows Application Software, in this case, was something I wrote in Visual Basic. It would have been just as easy to write it in Visual C++. I happened to have started prototyping the UI in Visual Basic because I wanted to experiment with it. I kept it that way, because converting it to C++ offered me no advantages at that point for this application.
Are you coding from scratch or are there programs out there that do for programming like dreamweaver does for websites?
The firmware core logic is all from scratch. There are libraries available that I use for certain things, such as storing and retrieving data from the EEPROM, a good random number generator, and serial I/O routines. No need to re-invent that sort of thing. But sometimes, they need to be tweaked to behave exactly the way I need them to in order to perform their job to my requirements. Fortunately, the source is provided so that developers can do exactly that.
The Application software is written using VB, and leverages the User Interface controls from the Visual Basic GUI builder toolset. Visual Basic will give you tools to make controls that show up on screen. The logic to make them do something useful is my own.
Visual Basic can do a whole lot, but it doesn't know your "business rules", so it can't do everything for you. It's really good at letting you build a "what you see is what you get" user interface, but it doesn't know anything about you are trying to do with it, or how it should behave. As the developer, I have to fill in all those details. So, all mistakes are my own. :-)
There are libraries of code available in many languages that can accomplish a great number of things. Of course, the skill is knowing what you want, and how to use what you have effectively. Sometimes, the best solution is writing a piece from scratch, and sometimes, you want to leverage an existing piece of code. It all depends on what you're doing.
Thanks for your reply Joel. I think i need to keep looking for that snippet i need in vb, i do like its ease of use but im stuck on one part of it. Ill get it sorted and ill have a look at SPIN for the chips, ive not heard of that. Thanks again.
Going through a fpv multi rotor phase at the moment.
Very nicely done. Why not use something like Java/python/perl/tcl or some other language that is cross platform so user of linux/mac can also run your software? I realize that most people have windows over other platforms but still sucks if you don't have one and want to run the software. I guess there is always something virtual box, vmware or parallels.
Never used the parallax stuff but looks pretty nice. My micro of choice for years has always been picmicro but like you said that takes time. Sadly time to build everything from scratch just isn't there anymore. I just recently picked up a few Arduino boards but have yet to actually play with them.
I do most of my development on a Mac and run VMWare to run Windows and the associated developer tools. I understand your concern about application portability. My choice of development environment was based on my familiarity with the tools. I'm relatively efficient developing applications in C, and Visual Basic, but much less so in languages such as Java. My hope is that most people who are interested in the Wiggler have access to either a machine that runs Windows natively, or, can run Windows in a virtual machine, or, can bring the Wiggler over to a friends house for the few minutes it takes to setup the Wiggler. :-)
If you, or anyone else wants to create a Java program for the UI, I'll happily provide details on how to communicate with it.