News:


Advertise Here

  • October 25, 2020, 06:54:52 PM

Login with username, password and session length

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

Offline CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 201
    • 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

Offline Dane Martin

  • 2017
  • Trade Count: (0)
  • Admiral
  • *
  • Posts: 2731
  • 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)
  • Ensign
  • **
  • Posts: 43
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
I know that you believe you understand what you think I said, but I am not sure you realize that what you thought you heard was not what I meant.

Offline CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 201
    • 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

Online AMV

  • Trade Count: (0)
  • Ensign
  • **
  • Posts: 43
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
I know that you believe you understand what you think I said, but I am not sure you realize that what you thought you heard was not what I meant.

Offline CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 201
    • 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

Online AMV

  • Trade Count: (0)
  • Ensign
  • **
  • Posts: 43
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
I know that you believe you understand what you think I said, but I am not sure you realize that what you thought you heard was not what I meant.

Offline CircuitFlyer

  • Trade Count: (0)
  • Commander
  • ****
  • Posts: 201
    • 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

 


Advertise Here