ATtiny85 Galloping Ghost decoder

Waggly tails
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

ATtiny85 Galloping Ghost decoder

Post by Martin »

As requested by Tobe, I've migrated my previous Arduino galloping ghost sketch to the smaller ATtiny85 chip.

I assume this would work okay on magnetic pulsing actuators as well as motor-driven ones, but I've not tried that yet.

As with the larger Arduino chip version, this uses one input channel for rudder, an optional second input for elevator, and an optional third input to switch the pulsing off and/or control what proportion of the time the motor is being actively driven.

The motor coasts when it's not being driven and this saves battery power, wear and tear on the motor brushes, and reduces any heat dissipated in the motor. The optional third channel allows exact control of this, but if no third channel is connected, the system defaults to about 50% drive which experiments have shown gives good results.

I'm thinking of getting some PCBs made using a tiny surface mount version of the ATtiny chip and with the H-driver (motor drive chip) also on the same board. This would give us a postage-stamp sized decoder driver, and I could pre-program the ATtiny chips as they are something of a hassle to program for people who are not used to them.

Is there any interest in me getting some PCBs made? If so, I assume the normal PCB header pins, as used on most radio receivers, would be the best way of connecting the incoming signal(s) from the receiver, but what would be your preference for the motor/actuator drive wires and the (optional if you don't want to run it off the receiver 5V) power input for driving the motor? These could also be PCB header pins, or permanently soldered wires, like an ESC, or some other connector. Ideas?

Attachments
pulserOSCCALcalibrate-UNO.zip
Speed calibration utility to be run on UNO (or NANO or similar) connected to pulser board.
(1.95 KiB) Downloaded 237 times
pulserATtiny85.zip
Now supports optional alternative configurations - PWM mode, and pot control of speed. Default configuration is still as original.
(6.68 KiB) Downloaded 258 times
ATtiny85PulserManual.pdf
V1.2 Minor typo fixes. Added link to Mode Zero.
(1.24 MiB) Downloaded 302 times
Last edited by Martin on 13 Apr 2019, 11:31, edited 8 times in total.
Tobe
Posts: 665
Joined: 16 Feb 2018, 06:19
Location: Varberg or Stockholm, Sweden

Re: ATtiny85 Galloping Ghost decoder

Post by Tobe »

Looks really nice, my thought was however to utilize one of the available ATTiny85 boards ready made with a USB port to make it as simple as possible and size is not really an issue here.

The reason of my request is that I would like/have the ambition in the nearest future to share one of my actuators designs as DIY and I thought that an Arduino based controller would allow the most "tinkering". Can't say much about it for the time being but it will be a "cageless" actuator
Cheers,

Tobe
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: ATtiny85 Galloping Ghost decoder

Post by Martin »

Those small ATtiny85 USB boards use the Digispark bootloader to allow upload to the chip via USB. I've never used the Digispark system myself - on ATtiny85 projects I program using USBASP.

I don't know if the bootloader start-up delay that Phil has described for the ATmega chips applies to the Digispark bootloader. That might cause problems. I suppose the simplest way to find out is to try it and see what happens.
User avatar
tiptipflyer
Posts: 393
Joined: 16 Feb 2018, 22:49
Location: Germany

Re: ATtiny85 Galloping Ghost decoder

Post by tiptipflyer »

Thanks Martin for this project,
I will give it a try for sure in the future with a surface mounted Attiny 85.

Frank
User avatar
Wayne_H
Posts: 808
Joined: 17 Feb 2018, 05:26
Location: Temora, NSW. Australia
Contact:

Re: ATtiny85 Galloping Ghost decoder

Post by Wayne_H »

Hi Martin,

Looks like another great project - thanks :) ;)
Martin wrote: 03 Feb 2019, 10:32 .........I'm thinking of getting some PCBs made using a tiny surface mount version of the ATtiny chip and with the H-driver (motor drive chip) also on the same board. This would give us a postage-stamp sized decoder driver, and I could pre-program the ATtiny chips as they are something of a hassle to program for people who are not used to them.
Sounds like a great idea, I'd better get in early :lol:
Martin wrote: 03 Feb 2019, 10:32 .............Is there any interest in me getting some PCBs made? If so, I assume the normal PCB header pins, as used on most radio receivers, would be the best way of connecting the incoming signal(s) from the receiver, but what would be your preference for the motor/actuator drive wires and the (optional if you don't want to run it off the receiver 5V) power input for driving the motor? These could also be PCB header pins, or permanently soldered wires, like an ESC, or some other connector. Ideas?
Martin, put me down for 4 (initially) please. My suggestions, since you did ask :P
- Pads for an input header for servo signal(s), or direct soldering if that's what others may choose.
- I prefer to power the motor separately (gives me more potential motor options) through a small 3A switch mode regulator, so pads or header pins for the common connections
- I'm happy to do necessary soldering to reduce your level of effort, others may be less comfortable.

Thanks again ;)
Cheers,

Wayne
Once a Retrobate, always a Retrobate............ ;)
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: ATtiny85 Galloping Ghost decoder

Post by Martin »

Hi Wayne,

Thanks for the interest. I'll layout a PCB (probably using KiCad). I'll post some images of the PCB design here so that you, and anyone else who's interested, can make corrections and suggestions before I press the button to get some boards manufactured.
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: ATtiny85 Galloping Ghost decoder

Post by Martin »

Here's the schematic. I decided to go with the TB6612FNG H-bridge, which is a little more capable and has lower on-resistance than most of the other cheap options. It has two channels (which I've connected in parallel) each capable of handling 1.2A average (3.2 A peak) at up to 15V. The DRV8838 was very tempting, but it's too small for home production - at least for me.

Schematic.png
Click for bigger view.

I've put a USBASP connector on board to make (re)programming easier, but I expect for most units we won't fit a connector there - just leave it as six holes in which some male header pins can be jammed in if needed.

The main connector is 5 sets of 3 pins - like a 5-channel radio receiver would have. The first one/two/three positions are connected to the one/two/three radio channels as required. Two pins are for connection to the motor, and two pins for the (optional) motor battery. The connector is laid out so a female jumper can be connected between two pins when you want to use the receiver battery (ESC) to also power the motor. I think the usual arrangement will be to fit a right-angled 5x3 header so the 'servo' connectors exit in line with the board - as is often done on compact receivers. Of course, an option will be to not fit a connector and solder direct to the pads.

I've not bothered with any reverse-voltage protection components - if you connect the battery backwards, you will destroy the board!

PCB layout and mock-up images of the finished board to follow soon.

Corrections/suggestions/comments welcome.
User avatar
tiptipflyer
Posts: 393
Joined: 16 Feb 2018, 22:49
Location: Germany

Re: ATtiny85 Galloping Ghost decoder

Post by tiptipflyer »

Sounds great Martin.
I would prefer a solder connection instead of the header. It is neater and more reliable.
Thank you for another great project.
Frank
Tobe
Posts: 665
Joined: 16 Feb 2018, 06:19
Location: Varberg or Stockholm, Sweden

Re: ATtiny85 Galloping Ghost decoder

Post by Tobe »

You know guys when I brought this up for a ATtiny85/USB based recoder for the GG-Tobe or similar actuator as an option, my ambition was to obtain/see a very simple based set up that an average modeler could have/make to connect with a simple actuator in the pure DIY-spirit with a few items available over the counter or easily manufactured...
Why..because it's my intention to publish a simple actuator, cage free, in the nearest future that everyone with the access to a 3D-printer could build and enjoy the thrill of GG-flying!
MY AMBITION WAS AND STILL IS SIMPLICITY! It doesn't need to be a perfect project, just to be a simple and rewarding project.
Cheers,

Tobe
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: ATtiny85 Galloping Ghost decoder

Post by Martin »

No worries Tobe. I uploaded the Arduino sketch, so you and anyone else who wants to make one using a readily available ATtiny85 board, or just a DIL-package ATtiny85 soldered to a bit of stripboard, already has everything they need. :D

Other people might want a small board with the surface mount version of the ATtiny, and a surface mount H-driver chip, capacitors etc. already soldered in place.

With a different sketch, the same board will also work as a reversible speed controller for a small low power DC motor - might be interesting to try it in a boat or car or even a small plane if you want to experiment with reverse thrust!
Post Reply