closedsink's blog View Details
Posted by closedsink | Feb 13, 2020 @ 12:41 PM | 5,767 Views
Recently I purchased one of these amazing balancing robots, from jjrobots:

It balances *extremely* well, and is a whole lot of fun. It's controlled via wifi from an app on your phone.

Almost perfect. But, naturally I wanted radio control.

The code is open source from the good folks at jjrobots, so I took a look at it. The balancing is accomplished with a fairly tight real-time loop. I needed to figure out how to get data out of an RC receiver without disturbing the timing of this loop too much.

I decided to use a receiver with a PPM output (also called CPPM), for the following reasons:

- PPM/CPPM is available on multiple different protocol receivers
- Only one signal pin is needed for the interface
- I felt I could use a interrupt routine to read the PPM stream so as not to affect the main timing loop of the robot

I had a Frsky XSR receiver laying around, so I used this for my development of the software modifications. Writing the PPM decoder turned out to be straightforward using interrupts. For reference, the PPM stream looks like this:
Sync - high for > 10ms
Low - .4ms
High - .6-1.6ms (ch1)
Low - .4ms
High - .6-1.6ms (ch2)
Low - .4ms
High - .6-1.6ms (ch3)
Low - .4ms
High - .6-1.6ms (ch4)
Low - .4ms
High - .6-1.6ms (ch5)
Low - .4ms
High - .6-1.6ms (ch6)
Low - .4ms
High - .6-1.6ms (ch7)
Low - .4ms
High - .6-1.6ms (ch8)
Low - .4ms
Sync - high
This repeats every 27ms.

The above shows an 8-channel stream, but it...Continue Reading
Posted by closedsink | Jun 02, 2019 @ 01:41 PM | 5,210 Views
Some years ago, I wanted to make a LiPo ESR (Effective Series Resistance) tester for keeping track of the health of my LiPos. The tester would work by measuring cell voltage, with and without a load, to calculate the effective cell resistance. This is a measure of the battery quality, and also a way to monitor the health of the battery, by watching for cells going bad (resistance goes up when this happens).

At the time, 3S were the biggest batteries I was using, and so I designed my tester to work with up to 3-cell LiPos. The tester used an LCD display, and indicated ESR readings for all cells at once, along with overall pack ESR. By using cell ESR along with Pack ESR, the cable/connector resistance could be computed, which is useful as well.

My original prototype got a lot of use, but it was bulky, as it was wired on a breadboard, using through-hole components. But it served its purpose, and there was nothing on the market that did what it did (multi-cell measurements at once).

Here’s a picture of the guts my original prototype (what’s left of it):
Name: V1_pic.jpg
Views: 16
Size: 2.86 MB

More recently, I was exploring ways to make the design more compact, as well as to support up to 6-cell batteries. I designed a PCB this time. This allowed me to make the design a lot more compact, as well as to add the additional circuitry needed for 6-cell batteries.

“V2”, as I called it, was a success. It displayed cell ESR for up to 6-cell batteries, and displayed all 6 values at once. Here’s a picture of the...Continue Reading
Posted by closedsink | Mar 11, 2015 @ 06:05 PM | 138,795 Views
A lot of work has been done trying to get the awesome CX-10 to work with other transmitters, since its stock TX leaves much to be desired. I have a Taranis transmitter, which has a JR-type module for other protocol support, and so my goal was to build a JR module, based on an Arduino, that would do the protocol conversion between the PPM output of the Taranis, and the SPI input of the CX-10 RF chip. My focus was to support the version of CX-10 that has a GREEN PCB for both transmitter and quadcopter.

I did some research, and came across a thread with a lot of good info on the CX-10 protocol:

Great stuff. I did some research of my own as well. I saw that a few folks tried to get the CX-10 working using an NRF24L01 RF chip, but it seems like no one was successful, as the register set appeared not to be 100% compatible with the chip used in the CX-10 controller (XN297). I decided that the only way to go was to use the XN297 itself, so I carefully removed just the small PCB area that contains the XN297 and its associated components. I had to remove the left joystick first, which was a challenge due to the number of pins, and in particular those tied to the ground plane. Once the joystick was removed, I carefully cut out the PCB section. I used a coping saw for the vertical cuts, and a dremel for the horizontal cuts. The dremel caused enough vibration that the crystal connected to the RF chip broke off due to metal fatigue...Continue Reading
Posted by closedsink | Apr 20, 2011 @ 10:11 PM | 8,264 Views
HK-450GT kit
Turnigy Typhoon 2215H Brushless 450-Size Heli Motor 3550kv
12T pinion (~2900RPM headspeed)
Mystery 40A Brushless Speed Controller (Blue Series)
EXI D213F servos for cyclic
D922MG Digital Metal Gear Servo for tail
Hobbyking Orange DSM2 receiver with Satellite receiver
Leaderhobby GY520 MEMS Gyro
Carbon Fiber Main Blade 335mm (CF335-3D)
Turnigy 2200mAh 3S 25C Lipo (T2200.3S.25)

Some Pictures:
Posted by closedsink | Apr 10, 2011 @ 10:56 PM | 8,487 Views
Here's my latest HBFP configuration:
Emax HL2010-4050KV brushless main motor
Rhino Gear Ultra Hardened Steel Pinion 9T 0.5M 2.3mm
18-11 2000kv tail motor, with 4530 prop
Mystery 20A ESC for main motor
TURNIGY Plush 6A ESC for tail
Assan GA250 MEMS gyro
HobbyKing Orange DSM2 receiver
3S 1000mA battery
Xtreme Wooden blade 225mm-10 deg
Xtreme CNC Paddle Control Frame
CB180 CF tail fin
Epoxy tube from Tap Plastics for tail boom (VERY strong and same weight as stock tube)
Posted by closedsink | Feb 14, 2011 @ 03:21 PM | 8,936 Views
Here's a diagram I put together showing my separates connections. I had to put the switch for the tail ESC to get it to arm properly:
1 - Plug in battery with tail ESC power off
2 - Let Gyro, main ESC initialize
3 - Move rudder stick to left, turn on tail ESC