Repackaged R/C + Arduino KAP Controller

135678

Comments

  • edited February 2015
    OpenSCAD was very interesting to work with. The text-based design was easy for me to learn and seemed expressive and powerful. However, the language also has quirks that seemed odd. Variables can only be assigned once, for instance, they can't be modified at runtime as I would expect.

    Also, OpenSCAD seemed to suffer from stability problems. Sometimes I would make a trivial change to the source code that would result in the whole OpenSCAD app crashing when I tried to compile. I tried researching the issue (found it was blamed on a gcc bug), upgrading my OpenSCAD (didn't resolve it), upgrading my Ubuntu distribution to 14.10 (even worse instability!), reverting back to 14.04 (cursing!). In the end I just learned to simplify my model and tweak my source to avoid the crash problem. So my overall impression was that OpenSCAD is a great concept but the implementation isn't quite ready for prime-time.

    To learn OpenSCAD, I worked through this great tutorial: http://www.makerbot.com/tutorials/openscad-tutorials/ The documentation with the program itself wasn't very helpful for a complete novice such as myself.

    P.S. The source files for producing the graphics icons are on github now, too.
  • Wheee! My Sparkfun order rolled in this morning. I'll start pulling my old T6A v.1 apart tonight and add the bits to the parts box.

    Looking forward to this!

    Tom
  • Dave Mitchell brought to my attention a couple errors in table 15 of the design document. So I've fixed those now and pushed an update to https://github.com/howtokap/kap-tx1. (Much appreciated, Dave.)

    There have also been some minor code changes to fix bugs in the cluster shooting mode.

    So for anyone who may be tracking this project, updates are available. Get 'em while they're hot.


  • Hello Dave-

    I am new to, and clueless about, Github. Re: " Design documentation can be found in doc/KAP RC Arduino.pdf ".
    Where to look to find the documentation ? Your creation appears to be a dream-come-true for many of us. I am
    pretty good with assembly, soldering and most things in the physical realm.

    In the fields of scripting, coding and such, I am totally ignorant, thus: not much use. Do you reckon this project
    is something I'd be able to see through - maybe with a little help from my friends .... ???

    Thanks for your efforts,
    Paul
  • edited March 2015
    Paul - just click on the link in Dave Wheeler's last post and you'll see the various files on GitHub. You can then download them all as a zip file.

    As to what skills are needed to complete it - you (or a friend) will definitely need to do some fiddling with Dave's code to make it work with whatever servos you end up using, but you will only need to be able to read the code, not write any. The arduino development tool is pretty easy to install and use for anyone who's ever used any sort of IDE (Integrated Development Environment) such as Visual Basic, C/C++, Xcode, Eclipse, etc (easier than all of those I'd say).

    The other two major tasks are soldering the components together - something I'm not looking forward to - and making the case. I have access to a laser cutter so I'm making my case out of ply and to a 3D printer, so I can print the bezel that covers the LCD and joystick.

    I now have all the components and hope to start soldering over the next week. I'll be posting pictures as I go along.
  • Paul,

    Dave's got it exactly right. If you want to make one of these, your main challenge is acquiring all the parts, including scavenging a Hobby King R/C unit, then assembling them into a usable package. The software side of it is basically done for you but you may need to change some values in the code to match your rig's servos and gearing. I can help with that.

    I started writing instructions in this comment telling you how to download the Arduino software and compile the project software. You would see it's pretty easy, then you could decide whether to proceed to spending money and time on the assembly phase. But I realized there's a couple extra steps to install some third party libraries, etc.... So give me a day or two. I'll write up the whole software build process and put it on the web. [This is something I've been meaning to do anyway.]

    Dave Wheeler
  • Thank you both ... I am on stand-by; no rush. I have a Hobby King unit that I started to re-package some time ago....
    glad that endeavor got delayed. I know that you are a man who likes a challenge, Dave Mitchell ( actually you both do...),
    but is there another reason you chose to cut your own case?
    Paul
  • With access to a laser cutter, Dave will probably have an easier time fabricating a case from ply than I had drilling, cutting and filing that plastic case from Sparkfun. What a pain that was! The dremel tool's cutter was half-cutting, half-melting the plastic and skipping around barely under control. I was afraid every cut would ruin the thing and I'd have to start over. Fortunately I was able to clean up the bad cuts with a file and it turned out well.
  • Well the components are not as cheap in the UK as they are in the US and with postage, the case costs about £10 here. Since access to the laser cutter in the local FabLab is free and I had some ply I thought I'd have a go.
  • I can feel the un-easiness... and hear the scream of the Dremel .... and if I had access to a laser cutter....
    it's all making sense men.......
  • edited March 2015
    As we were discussing earlier, the point of providing this project's code online is that you don't need to have any programming skills to make your own version of this transmitter. In practice, though, you do need to install the Arduino IDE and set it up to compile and download the code. And that can be a major hurdle if you aren't familiar with programming.

    So I've written some instructions to guide a beginner through the Arduino setup process for this project:

    https://github.com/howtokap/kap-tx1/wiki/Arduino-Installation-and-Setup-for-kap-tx1

    Hopefully anyone can follow these instructions to download and install the free software components. You don't even need any Arduino hardware modules until the last step. So try it out if you're curious. If you make it to the last step, you can decide then whether to invest in the Arduino hardware.

    And, as always, feedback on these directions would be most welcome. So if you try it, let me know how it goes.


  • My progress has been slow, but just a few words on what I've been up to.

    1. after making a mockup box I realised that Dave's box layout (specifically having the LCD on the left and the joystick on the right) is designed for those who hold a kite reel in their left hand and a KAP controller in their right (as you can see Dave doing in a recent photo on Flickr). I do the reverse, so I've swopped the two around.
    2. as a result, the joystick is the other way round (terminals on the left, not the right) so I've had to make a very small change to Dave's code to reverse the joystick x and y values.
    3. I've moved the Arduino so the USB port is accessible from the bottom of the case. This lets me use a 4xAAA battery box and avoid the need for a step-up regulator
    4. Unable to get a wire-wrap tool cheaply, I'll be soldering everything.

    Dave
  • Dave W.
    That's great to hear. I will get to git.hub as soon as I get a chance and give it a try.
    Thanks,
    Paul
  • Reading through the Arduino code I've only just noticed that there's an extra feature that Dave's video doesn't mention (and the KAP rig in the video does not support). If you move the joystick to bottom right (i.e. South-East) the controller lets you switch between horizontal and vertical camera orientation (i.e. it has a HoVer switch). Nice touch Dave!
  • Thanks. Actually I had that in the video originally. I wanted to show it off even though my rig doesn't do it. But Flickr has a 3 minute limit on videos and I had to cut the HoVer demo to make it fit.

    So the main switches are:
    NW corner - Auto vs Manual.
    NE corner - Multi-shot pattern.
    SE corner - HoVer switch.
    SW corner - nothing yet, but I plan to have setup menus accessed through this quadrant.

    And the display is arranged in the same manner so there's a constant reminder of which control is in which corner.


  • Over the weekend I encountered a bug with the controller where the screen was inexplicably rotated 180 degrees!

    I tracked it down and found it originated in changes to the AdaFruit SHARP LCD driver made after my original code development phase. Anyway, I made a small change to my own code to work around the issue and have pushed the fix to the github repository.

    Dave, or anyone else who may be following along, you'll want to pull this change to avoid the inverted display problem in your own projects.

    Dave Wheeler
  • Thanks Dave

    been (and will be) busy with family matters. Hope to get back to the arduino in a couple of weeks.
  • This is a very interesting discussion/project. You've done a great job Dave.

    Makes me want to upgrade my remote control. I might do it once I'm done building my rig #5 and cleanup the design files to share on the web. So much to do, so little time to do it. ;-)

    How is your LCD in direct sunlight?


  • What gear ratio is assumed for the pan axis? I made an unfaithful copy of your design and can't seem to get the screen to represent anything like the physical rotation for pan or tilt. Tilt may be a power,servo or timer issue. Pan has me stumped.

  • Myles,

    I used a 4:1 ratio on my pan axis. 5:1 would have been better, as I recommended to Dave Mitchell.

    More to the point, though, servos vary from one model to the next. So what this project needs is a way to tune or calibrate the servo outputs to match the display. At the moment the only way to do this is for you to modify the values in the tables named panTable and tiltTable. Let me suggest an approach that should work.

    First, understand that these tables are a list of angles followed by PWM timing offsets. The angle values range from 0 to 23 and represent steps of 15 degrees. For pan, 0 points to the right, 6 is away from you, 12 is left, 18 towards you, etc. For tilt, 0 is horizontal. 1 and 2 are 15 and 30 degrees UP. Going down, the angles are 23, 22, ..., 18 (straight down), 17 ... 15. Tilt angles 3 through 14 aren't reachable.

    And the PWM offsets are in the range -1600 to 1600. Zero represents the center of the servo's range. Positive offsets move the servo one way, negative move the other way.

    So a panTable entry of { 12, 800}, for example, means when the user selects pan of "12" (aiming left), make the pan servo PWM pulse 800uS longer than the center value.

    To figure out all the values you need for your rig, try this:
    * First change ALL the PWM values in panTable to 0.
    * Run the code and let it aim the rig.
    * Is it pointing away from you? Can you adjust the servo mount to make it so?
    * Try changing all the panTable values from 0 to something else in the -1600 to 1600 range until the camera faces straight away.
    * Lets call that value PAN6 for the sake of discussion.
    * Now change all the pan values to something that will let the camera aim right.
    * Lets call this value PAN0.
    * Now your pan increment will be PAN_INC = (PAN6-PAN0)/6
    * Construct a new panTable. 6 should correspond to PAN6, 0 should correspond to PAN0 and the pwm offsets should change by PAN_INC for each entry.

    A similar method can be used for tilt. Dial in the horizontal (0), then the vertical (18), then fill in the other table entries.

    Confused? Yeah, this isn't the best way to tune the servos. I'm planning to rewrite some of the code to eliminate these tables, replacing them with simple offset and scaling parameters. If you wait a day or two, I should have that change done and checked in. Eventually I want to have the whole servo tuning process supported from the user interface but that's a longer development.

    Good luck! Let me know how it goes.

    Dave
  • Myles,

    I've pushed some updated software to the github site. If you pull the latest stuff, you'll find the panTable and tiltTable are no longer used. Instead there are parameters called PWM_FACTOR_PAN, PWM_FACTOR_TILT, PWM_OFFSET_PAN and PWM_OFFSET_TILT. At the top of the code there are instructions on how to find the right values for your own rig.

    Dave
  • Good job Dave, though I can't see the "instructions on how to find the right values for your own rig" at the top of the code.
  • Oops, that last edit didn't make it to Github somehow. I'll fix it this evening. Thanks for the heads-up.
  • OK, It's up now with the instructions.
  • Ping!

    Just wanted to ask if anyone needs support on their builds. I've heard of two or three people starting down this road but all have stalled apparently? No surprise here. :-) That's how all my projects go, too.

    Our community pool is opening in two weeks, which means I get crazy busy with swim team involvement until late July. So if anyone would like help, now is a good time for me. Later on I may not be checking in as often. (Of course, emailing me is always a good option.)

    Dave Wheeler
  • edited May 2015
    I've had other (family) matters to deal with Dave, but I have done some work. I've made the (laser-cut ply) case and 3D-printed bezel, fixed the PCB layout and done some preliminary soldering (Arduino and Joystick to headers, wires to the LCD). I'm currently waiting for new soldering iron tips to arrive - the current tip has deteriorated to the point that solder won't plate it at all.

    I've also been working on a step-by-step document with photos - I've put a PDF of the current version up on my web site even though it's very incomplete.

    PDF updated - I've now started soldering (new tips arrived).
  • Following a complete tear-down and rebuild, it's now alive!

    image
  • @Dave Mitchell: that looks really useful- I'm inspired to have a go at one of these!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion