News:



  • March 28, 2024, 01:37:57 PM

Login with username, password and session length

Author Topic: UPDATE v1.1: Low Cost Open Source Timer  (Read 2898 times)

Online CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 301
    • www.circuitflyer.com
UPDATE v1.1: Low Cost Open Source Timer
« on: September 20, 2020, 03:44:36 PM »
FYI - I have made some revisions and updated the code and instructions for my open source DIY low cost timer.  Here is the link to the project - https://circuitflyer.com  The button to download the files is at the top of the web page and the link to the instructions is at the bottom.

The update fixes the debounce for the sometimes overly sensitive, glitchy touch sensor pin.  The instructions were revised to simplify the programming steps and the download now includes an older version of CircuitPython (version 4.1.2).  I found that the latest versions of CircuitPython can cause memory allocation errors.

If you have previously built one of these you may want to replace your current version 1.0 main.py with the newer 1.1 version.  Remember to touch and hold the sensor pin for about 4 seconds during boot up when you connect the USB cable.  This is required to permit write access to the board memory from your computer so you can overwrite and save the new main.py file.

Paul

Paul Emmerson
Spinning electrons in circles in Mississauga, Ontario, Canada DIY Control Line Timers - www.circuitflyer.com

Offline Dane Martin

  • 21 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 2804
  • heli pilot BHOR
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #1 on: September 24, 2020, 07:22:53 AM »
Awesome, thank you for the update

Online AMV

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 152
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #2 on: October 17, 2020, 03:32:33 PM »
Nice job, Paul!

I agree that the touch pin is a bit sensitive in v1.0.  I found that it false-triggered for me A LOT, making it unreliable and difficult even to adjust RPM.
It annoyed me, so I forked the project and modified it to work with a pushbutton.
It works great.  It proved itself during a number of practice flights, and then I flew it in competition at the meet in Philly a few weeks ago.  No issues.

Then Adafruit came out with an even cheaper and smaller board, the QT Py: https://www.adafruit.com/product/4600
Only $6 and super tiny !!!
Availability is currently spotty.  As soon as they arrive in stock, they're sold out.  Give it some time, I guess... I was able to get two of them back in September.
The board uses the same brains, so I figured why not port the code to it?  And it works!

If anyone is brave enough to try it, my v2.0 is here:
https://github.com/basil96/Touch_and_Go/releases/tag/v-2.0

That download ZIP file includes a "media" folder with my photos of the soldering steps and physical arrangement of the pushbutton and ESC leadout wiring.
Only the physical pinouts are different.  Everything else configuration-wise remains the same per Paul's current instructions.

If the photos and the pinout comments in code are not clear enough, I'm available here to explain.

Cheers,
-Andrey
Spice is the variety of life.

Online CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 301
    • www.circuitflyer.com
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #3 on: October 17, 2020, 07:13:36 PM »
Andrey,

Awesome!  I like it.  Great to see someone port the code to the QT Py.  I was wondering how well that would work myself.  Thanks for the pushbutton version.  I like the way you squeezed that little switch onto the board.

In photo #3 it looks like you have the 5v input from the ESC (red wire) connected to the 3.3v output of the onboard voltage regulator.  It works OK that way?  I would think connecting the red wire to the 5v input pin would be better.  As per Adafruit:

Power Pins
•   3V - this is the regulated output from the onboard regulator. You can draw 500mA
•   5V - This is 5v out from the USB port. You can also use this as a voltage input but you must have some sort of diode (schottky, signal, power, really anything) between your external power source and this pin with anode to battery, cathode to 5V pin

Take a look at my latest code to see how I corrected the switch debounce. You may want to do the same.

I see you added the 2Mb SPI flash memory chip on the back.  Are you using the Haxpress version of Circuitpython to take full advantage of the extra memory?

I have been recently testing a version of the timer that adds an analog accelerometer to boost the power in the vertical climb.  Based on the initial test flights this looks like a big improvement.  On the QT Py it would be super easy, no soldering, just plug in an I2C accelerometer breakout board.

Paul
Paul Emmerson
Spinning electrons in circles in Mississauga, Ontario, Canada DIY Control Line Timers - www.circuitflyer.com

Online AMV

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 152
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #4 on: October 19, 2020, 08:20:08 AM »
In photo #3 it looks like you have the 5v input from the ESC (red wire) connected to the 3.3v output of the onboard voltage regulator.  It works OK that way?  I would think connecting the red wire to the 5v input pin would be better.
When I read this and realized what I had done, my initial panic gave way to curiosity since the board is still somehow working as expected.  Yesterday I scoped the 3.3V line and the signal line.  It's 5V on the 3.3V bus and the PWM signal is 5V P-P.  Basically I'm backfeeding 5V into the poor voltage regulator's output.  More importantly, according to Adafruit's schematic of the QT Py, that 3.3V bus directly supplies VDD to the SAMD21.  How have I not blown up the board's brains all this time? ~^
You're right, supplying ESC power onto the 5V bus is probably safer LL~
In that case do we forgo the recommended protection diode due to the enforcement of polarity by the ESC connector itself?  S?P

Quote
I see you added the 2Mb SPI flash memory chip on the back.  Are you using the Haxpress version of Circuitpython to take full advantage of the extra memory?
I intend to, but the usual CIRCUITPY drive doesn't show up after I load the Haxpress firmware.  Given the 5V goof above, I now suspect the Flash chip did not fare as well as the SAMD...so back to the soldering table I go :-[ But at least the memory chips are cheap and I bought a handful of spares.
The Flash chips I got are actually the bigger 16MB ones because I expect to store a little over 2MB per session.  I figured, why not get the largest possible one?  According to Adafruit >2MB chips are supported, they just decided to make the pads in the smaller footprint. It remains to be seen whether it works.  The pin pitch is exactly the same, the body is just a bit wider.  I carefully manipulated all eight pins so they land perfectly on the pads.

Their team is busy with daily firmware updates...when I first programmed this, it was in beta.  Then I noticed a Release Candidate 0 on Friday.  Looks like they're close to releasing mature firmware soon.

Quote
I have been recently testing a version of the timer that adds an analog accelerometer to boost the power in the vertical climb.  Based on the initial test flights this looks like a big improvement.  On the QT Py it would be super easy, no soldering, just plug in an I2C accelerometer breakout board.
I agree! I have some ideas on that front as well, just haven't had the chance to return to executing them.  VD~

Cheers,
-Andrey
Spice is the variety of life.

Online CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 301
    • www.circuitflyer.com
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #5 on: October 19, 2020, 10:55:11 AM »
Quote
In that case do we forgo the recommended protection diode due to the enforcement of polarity by the ESC connector itself?

The Trinket has schottky diodes on both the 5v and Bat connections.  The QT Py doesn't.  The problem occurs when you power up the board via the ESC and then plug in the USB cable.  At that point the 5v (up to 5.5v sometimes more) supply from the ESC is connected directly to the 5v supply in your computer.  Not the best situation.  To help protect your computer it may be best to use the diode as suggested.

Paul
Paul Emmerson
Spinning electrons in circles in Mississauga, Ontario, Canada DIY Control Line Timers - www.circuitflyer.com

Online AMV

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 152
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #6 on: October 19, 2020, 12:14:54 PM »
Paul, isn't the protection for the computer side already included? See here:



-Andrey
Spice is the variety of life.

Online CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 301
    • www.circuitflyer.com
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #7 on: October 19, 2020, 01:55:51 PM »
Your right, sorry I missed that.  It may be OK then.  I guess Adafruit is more concerned about using batteries to power the board.  If you used a single cell lipo it could be overcharge by the computers USB power supply.

Paul
Paul Emmerson
Spinning electrons in circles in Mississauga, Ontario, Canada DIY Control Line Timers - www.circuitflyer.com

Offline jerryCashman

  • Trade Count: (0)
  • New Pilot
  • *
  • Posts: 2
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #8 on: November 14, 2020, 11:22:30 PM »
Hey Paul,

Just wanted to drop a note to say HI and Thanks! I got all inspired by your timer and have downloaded it and it all just worked first time!

Haven't built the airframe yet (think I'll build a Baby Ringmaster to play with eC/L - but the drive train is all tested and goes like a bought one!

Many thanks for putting this fine work out there in the public domain.

cheers. Jerry

Jerry Cashman
Canberra, Australia

Online CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 301
    • www.circuitflyer.com
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #9 on: November 15, 2020, 07:28:31 AM »
Your very welcome.  It's neat to hear from folks all over the world getting into eCL with my little timer.

These guys sell the coolest motor mounts for 1/2a electric - https://willynillies.com/shop/ols/products/cox-golden-bee-brushless-motor-mount

Paul
Paul Emmerson
Spinning electrons in circles in Mississauga, Ontario, Canada DIY Control Line Timers - www.circuitflyer.com

Offline Dennis Adamisin

  • 2019 supporter
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 4338
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #10 on: November 16, 2020, 08:00:07 AM »
Your very welcome.  It's neat to hear from folks all over the world getting into eCL with my little timer.

These guys sell the coolest motor mounts for 1/2a electric - https://willynillies.com/shop/ols/products/cox-golden-bee-brushless-motor-mount

Paul

Now THAT is really cool!
Denny Adamisin
Fort Wayne, IN

As I've grown older, I've learned that pleasing everyone is impossible, but pissing everyone off is a piece of cake!

Offline jerryCashman

  • Trade Count: (0)
  • New Pilot
  • *
  • Posts: 2
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #11 on: November 16, 2020, 04:25:31 PM »

These guys sell the coolest motor mounts for 1/2a electric - https://willynillies.com/shop/ols/products/cox-golden-bee-brushless-motor-mount


Hey thanks for the link Paul! These guys have some great gear :-)

cheers. Jerry

Offline RogerGreene

  • 21 supporter
  • Trade Count: (0)
  • Commander
  • *
  • Posts: 365
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #12 on: April 06, 2021, 07:07:58 PM »
Hi Paul,
 
This is my first attempt at using electric power for an airplane. I am building a 54" span original design.

I have purchased the Adafruit Trinket MO and a D3548 Outrunner Brushless Motor and RC Electric Parts 80A ESC. After reading through your instructions on page 6 about the ESC not working that requires the transmitter stick at full throttle to initialize the ESC etc. will not work. Do you know if my ESC will work with the Trinket MO?

Thanks,

Roger Greene
Fly Stunt <><
AMA 435R
USAF Veteran 1962-66 SAC
Life is 10% what happens to you and 90% of how you react to it. FAA #FA3RFLPAN7

Offline RogerGreene

  • 21 supporter
  • Trade Count: (0)
  • Commander
  • *
  • Posts: 365
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #13 on: April 08, 2021, 01:28:11 PM »
I have received an email from RC Electric Parts and in their instructions, it is the type that will not work with the touch_and _Go.

Does anyone know of an ESC that will work?

Thanks
Roger
Fly Stunt <><
AMA 435R
USAF Veteran 1962-66 SAC
Life is 10% what happens to you and 90% of how you react to it. FAA #FA3RFLPAN7

Online CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 301
    • www.circuitflyer.com
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #14 on: April 08, 2021, 01:57:27 PM »
Roger,

I just read through the user manual they have online and as far as I can tell it should work OK.  What did they say in the email?  All else fails just give it a try, no harm done.  Let me know if you need any help.

FYI - I updated the Touch_and_Go instructions last week to add more information based on some helpful feedback from different users.  Some ESC's resist arming at power-up, adding a resistor to the circuit can help it to arm properly.

Paul
Paul Emmerson
Spinning electrons in circles in Mississauga, Ontario, Canada DIY Control Line Timers - www.circuitflyer.com

Offline RogerGreene

  • 21 supporter
  • Trade Count: (0)
  • Commander
  • *
  • Posts: 365
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #15 on: April 08, 2021, 06:28:20 PM »
Thanks, Paul for the news.

Their email was to go to their site and look at the manual for the ESC.
The plane is for a fox 35 so the engine beams must be modified a lot to allow the electric items. (It's almost finished just need to get the electric set-up and make the top and bottom blocks. The plane is just like the one in the little photo with me holding it in the avatar)

I will keep you informed on my progress. I am excited to go electric.

What ohm size resister and wattage.

Thanks,

Roger
Fly Stunt <><
AMA 435R
USAF Veteran 1962-66 SAC
Life is 10% what happens to you and 90% of how you react to it. FAA #FA3RFLPAN7

Online CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 301
    • www.circuitflyer.com
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #16 on: April 09, 2021, 08:16:27 AM »
4.7K ohm should do, up to 10K will work.  Wattage, we're talking milliwatts so it doesn't matter.  The resistor is installed between the ground and the output signal wires.  If you want to solder it to the Trinket then I'd suggest a small resistor, 1/8W.  I had a 1/4W resistor on hand and just jammed it in the backside of the ESC servo connector.  Whatever works for you.

The output pins on the Trinket are "floating" at a high voltage logic level for the first three seconds after connecting the battery, during the board boot up process.  After the board boots up it outputs the correct PWM signal for the ESC.  The resistor "pulls down" the output pin to ground level during the boot process which makes the ESC happier.  The resistor has little effect on the operation of the timer.
Paul Emmerson
Spinning electrons in circles in Mississauga, Ontario, Canada DIY Control Line Timers - www.circuitflyer.com

Offline RogerGreene

  • 21 supporter
  • Trade Count: (0)
  • Commander
  • *
  • Posts: 365
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #17 on: April 25, 2021, 02:31:37 PM »
Hi Paul,

The RC Electric Parts 80A ESC would not work even with the resistor, 10-Kohm from Radio Shack, (from a long time ago) wired. My son gave me an E-Flite 60A Pro SB and that worked, so we traded, he flyes RC. My plane is not finished, I need to make balsa coverings for the top and bottom of the nose of the plane and secure the battery and ESC. Then spray the bare wood with polyurethane because this is a test airplane for my adventure into electric power.

In the programing procedure:

The flashing for Start Delay and Flight Time is continuous until you remove your finger from the Capacitive Touch Pin, Correct? Counting each flash to the desired amount of flashing for each discipline.

Thanks,

Roger

The resistor is brown, black, orange, with gold
Fly Stunt <><
AMA 435R
USAF Veteran 1962-66 SAC
Life is 10% what happens to you and 90% of how you react to it. FAA #FA3RFLPAN7

Online CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 301
    • www.circuitflyer.com
Re: UPDATE v1.1: Low Cost Open Source Timer
« Reply #18 on: April 26, 2021, 09:14:04 AM »
Roger,

Your programming procedure is correct and your resistor is the right size.

As I get feedback from from other users I have made some more tweeks to the code.  When I get some time to sit down and refresh my Github knowledge I'll be posting my latest version to fix some minor issues.  One of these is the minimum throttle signal.  I found in some cases it's a little too low.

Welcome to the dark side.

Paul
Paul Emmerson
Spinning electrons in circles in Mississauga, Ontario, Canada DIY Control Line Timers - www.circuitflyer.com


Advertise Here
 


Advertise Here