Repackaged R/C + Arduino KAP Controller

123468

Comments

  • Wonderful progress Cris!

    I can see a confluence of ideas....
    - Dave's compact and intuitive controller
    - Al's gimbal mount with video down links
    - Christian's Filalu pendulum rig suspension

    Add in a favorite kite and a gentle breeze.....smiles all around!

    KAP is a fun adventure!

    Keep the ideas flowing!

    WW
  • On the subject of packaging, I figured I'd share something that happend with my T6A transmitter:

    The older style had removable antennas, so when I snapped that little hinge on one I just replaced it with another. (Antennas from old wireless routers fit the older version of that radio just fine.) The new one has a built-in with no connector, as shown in Cris's photo. I managed to break mine.

    Rather than fix it I pulled the antenna out of the plastic housing (harder than it sounds, unfortunately, but possible), and ran it up inside the handle of my transmitter. This works fine for the ranges we use for KAP rigs (<500').

    When packaging your components, keep in mind if you're using a plastic or wood enclosure, you can likely position the antenna inside the enclosure without compromising the radio's range too much.

    Tom
  • Are those two 18650 in series?
  • edited March 2016
    Tom - I have been planning to give the internal antenna placement a go in my wood and plastic enclosure but I do not think I will strip any more of the plastic casing from the antenna lest I need to invoke Plan B (external placement). My principal concerns about internal placement are interference from the metal shield for the RF module and the batteries. I never adjust the external antenna on my current Spektrum-based transmitter and it seems to have ample range. I hope the internal placement of the antenna works as it would be quite tidy in use and storage.

    Did you resolder your little coax cable after it broke?

    jwlayton - Yes, those are Panasonic 18650s in series. I have been using these batteries in my LED flashlights and find them easy to live with. Spark Fun had a inexpensive holder with height and width dimensions that nicely align with my transmitter packaging dimensions. The principle negative is the batteries are very tight in the holder and I have to remove them to use my charger.
  • edited March 2016
    As you can see from the photo below (inside of a 2.4GHz Spektrum-compatible EFlite TX), the 'business end' of a 2.4GHz antenna consists of a brass tube soldered to the outer layer of the coax and a bare wire that's joined to the core of the coax. Each part is about 1" (25mm) long and together they form a 2" simple dipole. That's what needs to be outside any metal container but can certainly be enclosed in wood or plastic (as they are in the bendy rubber duck of most TX's).

    image

    You can also see that the Spektrum antenna has a connector that snaps onto the r/f board so it can be removed and replaced - unlike the T6A, which has a soldered joint.

    By the way, I think Tom meant he snapped the plastic of the casing, not the inner cable. I did one manage to resolder such a cable. It was a really badly botched job - the join would certainly have radiated a signal - but the TX still had a range of 300' or more.
  • Yep, I snapped the plastic on the casing. The wire was never compromised.... that time.

    I have had to solder those tiny little coax antenna wires. It can be done, but it helps that my eyes are already bad for close-up work, and that I'm used to soldering under a microscope. Use a regulated iron and treat it like a surface mount component, and it works ok.

    Tom
  • edited March 2016
    I had a bit of time at the workbench today and got things off the breadboard and all soldered up.

    Arduino TX board

    I also spent some time looking into low voltage protection for my Panasonic 18650 Li-Ion batteries. I have been using these in single cell flashlights where the flashlight circuit does the job of preventing excessive discharge. For the transmitter project I need low voltage protection and some sort of indicator when the batteries are getting low. I have been poking around today to find a circuit that will protect my two 18650s in series and this has raised questions about making sure the cells are balanced. I could hook up one of the little 2S - 8S voltage displays and keep an eye on it but that will not indicate whether the cells are contributing equally. Oh, bother.

    I was thinking about using the 18650s in part because the size fits intended controller package geometry and they have a relatively large capacity. I could use a 2S LiPo as does Al (skysnaps99) but I keep thinking about Bill Blake's cautionary tale involving LiPos and rapid combustion. I would be most upset to have a KAP gear bag conflagration.

    I have now started thinking about using a four-cell pack of innocent Sanyo NiMH Enerloops. I could charge them in place, which is a bonus, and they are stable in comparison to LiPos. Four Enerloop AA cells would be disagreeably bulky but a pack of AAAs is quite small. But is a 800 mAh pack sufficient? I need to check how much current the TX is drawing.

    For those of you who have built this project: what battery capacities are you using and how much working time do you get with the transmitter? I assume its current draw must be relatively constant.
  • I don't have any hard numbers for you, Cris. I can only say my transmitter, powered from 3 AAA lithium batteries, has had its batteries changed only two or three times. But my device sees most of its use on the test bench. I've only used it in the field 5 or 10 times.

    My gut feeling is that 4 AAA NiMH cells will run it all day.
  • I don't have numbers either Chris, but I'd guess that my TX has run for at least 4 hours on the original set of 4 non-rechargeable AAA's I put in months ago. And since the lid of the TX box is easy to open, I plan to just carry a spare set with me.

    I'll see if I can measure the current when it's on.
  • Great ideas and developments in this thread! Makes me want to resume my own unfinished projects... if I can remeber where I put the parts... ;-)

    @Chris: very nice clean setup! You could monitor the battery voltage by connecting in to an analog input of the Arduino (first divide the voltage with 2 resistors to bring it in range), and let the Arduino flash something on the display when the voltage is getting too low.

    A general tip: when everything is tested and working I like to put a hot glue on all incoming and outgoing wire connections. Before this I've had broken wires during KAP outings (very frustrating!)


  • A battery monitor using just a voltage divider could work. The drawback, though, is that the voltage divider itself draws a constant amount of current. So you'll want to use fairly large resistor values (over 100K total). And the Arduino needs an analog input of less than 5V (3.3V for the lower voltage versions). A simple divider network of two equal resistors might not be enough if your battery voltage is more than twice the Arduino's voltage.

    With all that in mind, I'd suggest a divide-by-four arrangement: Vbatt -- 150K -- Vout -- 50K -- Gnd.

    Just connect Vout to an analog input. Then, of course, you'll need to do some calibration to turn the a/d readings into accurate voltages. Don't depend on the resistors have the exact values they were specified for.
  • edited March 2016
    I measured current draw on my TX circuit this morning and got a steady 99 to 100 mA at ~5V. I have the TX running from a freshly charged 4-cell Eneloop AAA pack. After one hour the battery voltage has dropped to 5.12 V. Sparkfun's Arduino guide calls for a 7 to 12 V input so I am now thinking about a making an 8-cell, AAA TX battery pack, which should easily last a typical day of KAPping, which is all I really need. The advantage of going to 8 cells, beyond capacity, would be that I can continue using the chargers and cables I have for the house and van.

    TX current draw test

    Update: The transmitter continued to run for five hours on the 4-cell Eneloop AAA pack and it is an old pack. By the five hour mark Vin had dropped to 4.85 V and the current was a bit lower at 95 mAh. While this would get me through a typical KAP session I think the 8-cell option is the way to go.

    Dave and Hans - thanks for the voltage divider to analog input suggestion. I am starting to think a three-dollar battery voltage display on a momentary switch might be the way to go. I am less concerned about low voltage states with the NiMH packs.

    I thought this article was pretty interesting as it claims to read battery voltage "without using a precious analog pin to do so," or a voltage divider for that matter. But it looks like it is returning VCC rather than Vraw.

    Hans - good tip on the hot glue for strain relief on my circuit board's connecting wires. I will most certainly do that. I used to think hot glue was inelegant but then got a proper hot glue gun and a sample of various glue sticks. I am now a fan of several hot glue applications with potting being one of them.


  • Just another question, i am going to assume that this sketch was written using standard servos for both pan and tilt and not continuous 360 degree for pan. is this correct? What is hover?

    thanks John
  • John,

    You are correct. It assumes standard servos, not continuous rotating ones. Laurent Dupire has also asked about support for those. I have some ideas that might work but the jury is very much out on that.

    Hover is short for Horizontal/Vertical. It's an extra servo that switches the camera between landscape and portrait orientations. A few people use those for KAP. Not many.

    Dave
  • Well, i put my box together and everything seems to work, the servo's move a little when the thumb switch is moved left/right and up/down, but the thumb knob keeps coming off after time, may have to glue it on. I used the nokia 5510 LCD instead of the Sharp, (1/3rd the cost) so i have to figure out the code to make it work, the test program for the nokia works when loaded into the audrino, but i put a couple of the test program routines in the kaptx sketch veiw.cpp with the appropriate libraries and nothing comes up on the screen. just trying to get something to display on the screen when the kaptx sketch is loaded. I haven't coded with C in sometime, i do oracle pl/sql primarily. More work to do.

    John
  • Everyone,

    I've just pushed a set of changes to the Github repository. You can find the latest code here:

    https://github.com/howtokap/kap-tx1

    The main thing that changed with this release is that the broken shutter servo signal has been fixed.

    Additionally, I cleaned up some dead code and removed TODO comments that had already been done.

    Finally, I created a file, Tuning.h, that contains all the parameters people might need to change for their own rig and controller setups. So those servo PWM factors and offsets are now here. And the timing parameters for shooting sequences are here. There is also a set of definitions for reversing X/Y directions on the joystick since Dave and Cris both needed to do that. In the future this should make it easier to incorporate updates since all of your customization will be in this one file.

    For anyone who has downloaded a previous version and modified it, I recommend backing up that set of software before trying to get the new stuff.

    Dave Wheeler
  • Do you have any code for autokaping in it yet?

    John
  • edited March 2016
    Oh, yes!

    There's a shooting mode control that switches between single-shot, cluster, vertical panorama, horizontal panorama, quadrant (90 pan, zenith to horizon) or 360 panorama. Pressing the joystick in any of these modes queues up a sequence of shots and the controller automatically steps through them. You can watch the number of queued shots count down to see it's progress.

    Most of the shot sequences are modified by the current pan/tilt settings. So, for example, the cluster sequence will shoot in the aimed direction and then shoot 6 more shots around that spot. Another example would be the horizontal and vertical panoramas. They cover 90 degrees but are centered on the current pan or tilt setting.

    Additionally, there is a switch between manual and automatic mode. Normally the system is in manual mode and each shot sequence is triggered by the joystick button. But in automatic mode a new shot sequence is triggered as soon as the previous one ends. So you can set any combination of shot sequence with the auto switch for various autokap applications.

    On another topic, if you're going to use the Nokia 5510 LCD, be aware that it is 84x48 pixels vs the 96x96 size of the sharp display. My user interface code is entirely based on the 96x96 size. You would have to write new code and generate new graphical elements to get it to work on Nokia display. I know a few people would love to see that done, though, since the sharp display really drives the cost up.

    Dave
  • do you have images of the symbols you used already that i can modify, or just a list of the shapes?

    John
  • They are among the files on Github. The folder, graphics, contains ImageMagick scripts that I used to generate the shapes. And the subfolder, final, has the actual bitmaps in .xbm format.

  • With yesterday's software release still on my mind, I wanted to share a couple thoughts on testing and software bugs.

    The release prior to this one had a pretty serious bug: the shutter servo wouldn't work. That slipped by me because I didn't actually test it on my rig with a camera. The changes I'd made were seemingly minor and my rig was in a state of disrepair so I just checked the functions of the user interface and all seemed well.

    For this round I've been more careful, checking that the receiver physically moved the servos and triggered the actual camera. :-) I also checked the PPM signal with a logic analyzer and it looked good. Still, my rig isn't in flying condition and I didn't want to make everyone wait, so I've released this with zero actual flying time.

    The point is there's always the possibility that bugs exist and some of you will be the first to find them. So if something doesn't seem right, please feel free to post your experience here. Even if you think it may be your own mistake, I'd like to know how things are working and I think it helps if everyone knows about potential issues.

    I'm subscribed to this discussion thread so I get email whenever someone adds a message. That means posting here is a good way to get my attention even when I'm not following the forum closely. A I do appreciate all the feedback everyone's providing, good and bad.

    Dave

  • edited March 2016
    Hi Dave,

    Thanks for this code update. I loaded it this afternoon and everything went smoothly. I like the Tuning.h approach and am thankful for the #define JS_DIR_X (-1) parameter, which handily took care of my reversed servo issue.

    I am still puttering around with the case. I now have a ~9.6 V AAA battery pack (8 Eneloop Pro AAAs). This is agreeably compact and ran the circuit for 7 hours today while staying above 9.7 V. It was interesting to see that the current draw remained right at 100 mA, the same as current draw with a 5V battery pack. Perhaps not the most efficient of voltage regulators in the RF module, which accounts for 2/3 of the load.

    I am closing in on a case geometry that is 2-1/4" wide, 6-1/4" long and 1-3/8" deep. This should hold all components in a fairly tight fit. I cut out a wood block of this size and it fits the hand reasonably well. Display will be placed at top with the thumb joystick immediately below. I am attempting an internal antenna placement as suggested by Tom and hope this works.

    I ended up making a little pigtail that will allow me to attach an inexpensive, and frequently handy, LiPo voltage meter to the TX battery charging jack. I will just keep the voltmeter and cable in the small pouch with my backup batteries.

    voltmeter_dongle

  • I believe the RF module uses a simple LDO voltage regulator. Give it any voltage above 3.3V and it will produce the 100mA, 3.3V the transmitter needs. But any voltage above that just turns into heat. With a 9.6V battery, you have (9.6-3.3) volts times 100mA = 630mW of power that's just being wasted.

    I'd recommend sticking with just 4 cells for better efficiency. Or, if you like the weight of 8 cells and want longer running times, put 4 cells in parallel with another 4 cells.
  • edited March 2016
    Dave - that wasted energy is annoyingly inelegant.

    I guess I headed toward the 8-cell pack in part due to TX tradition and in part because the Sparkfun Arduino Pro Micro "graphical data sheet" calls for 6V - 16V input. Sparkfun's Arduino Buyer's Guide calls for 5-12V, When I did my first current draw test for the circuit the input voltage hovered around 5V and then drifted lower. I was concerned that voltages lower than 5V might lead to brownouts in the field.

    I think I might stay with the 9.6V pack and add one of Pololu's tiny switching regulators (5$, 85% - 90% efficient). I could get the 5V version and feed from there to the Arduino and RF module or get the 3.3V version and let the Arduino fend for itself. Does this sound like a reasonable approach?
  • edited March 2016
    David,

    I found the graphics in your folder, but there are a few that i didn't find, can you tell me what the
    bm_single_bits
    bm_cluster_bits
    bm_vpan_bits
    bm_hpan_bits
    bm_360_bits
    shutter_no_bits
    shutter_rdy_bits
    shutter_act_bits
    shutter_trig_bits

    thanks
  • Cris,

    It slipped my mind that we were dealing with a 5V Arduino when I wrote that last message. So now I see your concern about dropping below 5V.

    But I've done a little digging in the datasheets for the ATmega 16u4 and the voltage regulator on the Arduino Pro Micro, the Micrel MIC5219, and I think our design will work down to at least 4.6V.

    First, the processor is specified to work at 16MHz all the way down to 4.5V. Second, the MIC5219 will drop its input voltage by up to 500mV at peak load (500mA), which is why the Arduino board specifies 5V input. At lighter loads, though, the MIC5219 voltage drop is typically only 10mV. This means that if the Arduino board is not powering the transmitter directly, we only need to worry about keeping the Arduino input voltage above 4.6V. (Power consumption by the display and other components is quite low.)

    You could verify that the 4 cell setup is keeping the Arduino in spec by measuring the VCC output pin. As long as it's above 4.5V, the processor is good.

    So I still say a 4 cell, 4.8V solution will work. :-)

    On the other hand, regulating the 9.6V down to 3.3V with a Pololu regulator to feed the transmitter while letting the Arduino regulate its own 5V from the 9.6V input also seems like a perfectly fine solution. I've no efficiency concerns there since the Arduino's power draw is a small. And you'll get the benefit of the extra battery capacity with the Pololu regulator.

    Dave


  • John,

    I'll try to hunt those bitmaps down.

    Dave

  • Cris,

    Where do you source your Enerloop battery packs ? I have sought, but not found. Shop-built ?

    Great discussion here. Thanks all for a fascinating journey to follow !

    Paul
  • Paul - I bought my most recent battery packs, made from Eneloops with spot-welded tabs, from Batteries America:

    http://www.batteriesamerica.com/new_page_3.htm

    I'd previously sourced Eneloop packs from onlybatterypacks.com but that site seems to have changed and I cannot find them there. I am happy with the packs I've received from Batteries Anerica,

  • edited March 2016
    It has been a busy week but I have had time to add a tiny Pololu 3.3V, 500mA Step-Down Voltage Regulator D24V5F3 to my Arduino transmitter project circuit. This component converts the ~10 VDC Vraw supplied by the 8-cell Eneloop AAA battery pack to 3.3VDC for the RF module scavenged from a Hobby King T6A transmitter. The RF module already had a voltage regulator but it was inefficient. The Pololu claims 80-90% efficiency. From earlier tests it seems that the RF module is responsible for about 2/3 of the current draw in Dave Wheeler's transmitter design.

    3.3V Pololu voltage regulator

    Using Pololu's little voltage converter (~$5) reduced the transmitter circuit's current draw from 100 mAh to 58 mAh. A worthy addition methinks.
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