Monday, October 13, 2014

Restoring/Recharging Over-discharged LiPo (Lithium Polymer) Batteries!

By Gabriel Staples
Written: 5 March 2014
Posted Here: 13 Oct. 2014
Last Updated: 13 Oct. 2014

Related Articles:
Though I first posted this article on my Instructables page, I decided to update it and repost it on my main website here in order to keep my articles more consolidated and easily maintained by myself.  From this point on, I will keep the most up-to-date version of this article right here, instead of on my Instructables page, so if you want the latest info, read here.  Don't forget to subscribe to receive an email whenever I post something new by clicking the subscribe link at the top-right of this page!  I will never use your email addresses for spam.

A LiPo that self-discharged, while in my plane, hanging overnight in a tree. :(


LiPo batteries should never be discharged below 3.0V/cell, or they may be permanently damaged.  Many chargers don't even allow you to charge a LiPo battery that is below 2.5V/cell.  So, if you accidentally run your plane/car too long, you don't have your low voltage cutoff set properly in the ESC (Electronic Speed Controller), or you leave the power switch on, forget to unplug the LiPo, get your plane stuck overnight in a tree (the same tree, three separate times, for foolishly flying in areas too small because you are too excited to fly and it's almost dark), etc. etc., you may find yourself in a situation where you've discharged your LiPo down well below 3.0V/cell.  What do you do?

Many people toss the LiPos in the trash.  I don't.  I restore them.  Here's how.

Sunday, August 3, 2014

Recommended Soldering Kit & Tutorials (for Arduino, Electronics, & Radio Control)

By Gabriel Staples
Written: 14 June 2014
Posted to blog: 3 Aug. 2014
Last Updated: 8 Oct. 2014
-20141008: added an advanced "drag soldering" link at bottom
-20140905: added more soldering iron links, & solder tip tinner/cleaner link, as well as quite a bit more info.
-20140830: added more info about soldering irons "for Radio Control" use; also added "intermediate" links to the soldering tutorials section at the end

Related Articles:
Here is a list I put together to help people get into soldering & electronics.

Keep reading below for more info.

Saturday, May 31, 2014

eRCaGuy_ButtonReader Library for Arduino - Debounce and read the current button state, & most recent action ("just pressed" or "just released") easily!

By Gabriel Staples
Written: 31 May 2014
Last Updated: 31 Oct. 2014

Other Articles to Check Out:
This Article:

History (newest on top):

20141031: major bug fix; added multi-button support with a new 5-button-reader example!
20140531: I just released this library to GitHub!


I wanted a simple and universal, yet very powerful & reliable library to read a button or switch in such a way that I can easily implement toggled actions and momentary actions, know the true, debounced state of a button or switch at any given time, and specify whether I want an action to take place when the button is *pressed* or *released.* This library makes implementing all of these things easy for me, and I now use it on all of my projects that require reading a button or switch, so I wanted to share it with others. Hopefully you find it useful too. Check out the included examples.  

This code is an elaboration of, and library form of, the main Arduino-sponsored "Debounce" example found here.  Thanks to David A. Mellis, Limor Fried (LadyAda), and Mike Walters for writing that excellent and well-thought-out example code.

Download the eRCaGuy_ButtonReader Library here --> then go to "Download ZIP" at the bottom of the right-hand pane.  See the Readme file right here too if you need help installing Arduino libraries.

Tuesday, May 13, 2014

Using the Arduino Uno’s built-in 10-bit to 21-bit ADC (Analog to Digital Converter)

By Gabriel Staples Written: 13 May 2014
Last Updated: 24 Jan 2015 - added link to Version 2.0 alpha below...allows sampling rates of ~50+ kHz, and fixed bug to allow >16-bit samples to not have computation errors

A Few Other Articles to Check Out:

This Article:

Using the Arduino Uno’s built-in 10-bit to 21-bit ADC (Analog to Digital Converter)???
--Wait, what did you say!? I thought that Arduinos only had a 10-bit ADC!  How can you get, for example, 16-bit resolution out of a 10-bit ADC?  Well, the answer is oversampling.  Atmel has written a really good article about it called "AVR121 Enhancing ADC resolution by oversampling."

Before I continue, I'd like to give a very special thanks to user "fat16lib," on the Adafruit Forums, who first made this technique known unto me by his post right here, thereby inspiring me to write this, my first ever, library.

Now on to the library:

27 May 2014: Update: With a ton of help from Ray Benitez, of Hackscribble, I am still evaluating the practicality & legitimacy of oversampling, via experimental data collection & analysis, in order to see if it really is increasing the precision to the degree I am claiming/hoping.

Update: 11 July 2014: I still plan on doing much more testing with my library, when I get the chance, and working on it to refine and validate it a lot more.  I want to know for myself, with certainty, how well it really is or isn't working, and what its limitations are.  One of the refinements I will make, for instance, will be to speed up the Arduino ADC from ~8kHz max sample rate to ~54kHz max sample rate, by changing the ADCSRA register to have an ADC prescaler of 16 instead of 128 (thanks to Simon Monk, pg. 82 of "Going Further with Sketches" for teaching me about this).  This way, I can see if reading the ADC faster affects the results produced by oversampling.  It will also be nice to just not have to wait so long for high-bit ADC reads that require tons of 10-bit samples to get one high-bit sample.  Meanwhile, if you are concerned about whether or not my library truly produces higher-precision ADC reads, you might just consider buying a 12 or 16-bit ADC from Adafruit.  They look really nice.  I will be using these myself to test my library eventually, in conjunction with an LTC1650CN 16-bit DAC to produce a signal to test.  As part of my test, I will vary the reference pin source from a noisy voltage regulator to a clean, dedicated reference IC chip.  This way, I can see how the noise affects the results.  Also, as part of my testing, I'll modify my library to introduce random noise (via software) to the analog readings, to see how that affects oversampling (It's possible that introducing just the right magnitude of random noise will increase precision of the oversampling process).  
Anyway, here's the Adafruit ADCs!  
12-bit ($10):
16-bit ($15): 

Download my Library (eRCaGuy_analogReadXXbit) on GitHub by clicking here --> then click the "Download Zip" link at the bottom of the right-hand pane.  Using my library, you can actually choose any precision you want between 10 and 21 bits, when using the analogReadXXbit() function!

UPDATE 24 JAN 2015: Version 2.0 alpha available here.  Major overhaul of library. You now have the option to sample at ~50+khz. This version is still in the works.  Need to make thorough examples still.

Keep reading below:

Sunday, April 20, 2014

TED Talk - Massimo Banzi: How Arduino is open-sourcing imagination

By Gabriel Staples
Written: 20 April 2014
Last Updated: 20 April 2014

Related Articles:

This Article:

Watch the talk!

Enough said. :)

Sunday, April 13, 2014

Propeller Static & Dynamic Thrust Calculation - Part 2 of 2 - How Did I Come Up With This Equation?

By Gabriel Staples Written: 12 April 2014
Last Updated: 4 May 2014
-made some minor additions & formatting changes, incl. adding more info. about future work & possibly considering some blade element theory techniques - 13 Apr. 2014
-minor units correction - 16 Apr. 2014
-minor addition to section describing prop helical twist - 29 Apr. 2014
-additions & corrections to the bold portions of the "Application & Conjecturing" section - 4 May 2014

Related Articles:

This Article:

Since posting my initial "Propeller Static & Dynamic Thrust Calculation" post, I have had many questions about where this equation comes from, and several requests to explain more.  I have even had college students ask me about the equation.  Additionally, this is my most popular post at the moment and is getting over 700 views per month, with the bulk of those hits being from Google Search results about propeller thrust.  So, I think it's time I explain more about the background of the equation.  Here goes.

First off, here's the nomenclature I will use:

Friday, April 11, 2014

Aim High

Aim high!  Shoot for the stars and you’ll land on the moon; shoot for the moon and you’ll land on the roof; shoot for the roof and you’ll land in the dumpster. Aim high!

I've heard quotes similar to this, and the other day (22 March 2014) I thought about this and wrote it on the top of a to-do list I had which pertains to Unmanned Aerial Systems-related projects I'm working on.  These are the types of things I try to remind myself regularly.  Aim high.

~Gabriel Staples

Related Article: