Page 1 of 1

Another GG Re-coder for the DigiSpark and DRV8838

Posted: 28 Feb 2019, 21:59
by Phil_G
SEE Update June 2019: viewtopic.php?f=25&t=599&p=4343#p5660

This project has been on my bench for a while, some of us love the DigiSpark and here is a simple DIY ultra-basic "PIC replacement" re-coder.
I'm happy to carry on supplying the PIC Re-coder chips but this gives an alternative for true 'DIY'.
In no way does it compete with Martins - it does work, in exactly the same way as the existing PIC Recoder, but replaces the PIC with the DigiSpark PCB. The rudder & elevator channels from the receiver control the mark-space and rate respectively as the Tiny pulses the DRV8838 bridge to and fro. As with the PIC there is no specific GG throttle function, that is left to your conventional ESC or throttle servo for IC.
Again, just like the PIC, there is no facility to adjust anything within the recoder itself, the intention is that any adjustments are made using throw variations (ATV or whatever) on a programmable transmitter.
The sketch can be tweaked of course if preferred, but in use it has no adjustment, that intentionally has to be done via transmitter programming.

DigiSpark port connections are:
P0: rudder channel input from the rx
P1: is the digispark's on-board LED used to indicate pulsing
P2: output to the DRV8838 bridge
P3: elevator channel input from the rx
P4: unused
P5: unused


This way the actuator is powered from the receiver supply, but as with the PIC recoder, the actuator can optionally have a separate battery if required by chopping the receiver positive supply to pin 9, and providing a new pos from the separate battery. The negatives are common:



Re: GG Recoder for DigiSpark ATTiny85 and DRV8838

Posted: 01 Mar 2019, 05:33
by Tobe
Very well done Phil, I love it. This is exactly what I was looking for, simple and straight forward, you sure hit the spot. Just happen to have a couple of Digispark here on my desk...
It's the simplicity that is hard to create but once again you have outdone yourself

Re: GG Recoder for DigiSpark ATTiny85 and DRV8838

Posted: 01 Mar 2019, 11:32
by Wayne_H
Thanks Phil, yet again elegant simplicity - well done ;) Does the DigiSpark need the diodes removed?

I've added your version to my GG project list to compliment Martin's "custom" design. (Just have to sort out my damn serial port problems so I can once again program arduinos, thanks Bill :evil: :twisted: :x )

Re: GG Recoder for DigiSpark ATTiny85 and DRV8838

Posted: 01 Mar 2019, 17:44
by Phil_G
Thanks chaps, the diodes - I've just got into the habit of 'preparing' the DigiSparks as soon as a batch arrive,
that is sawing off the USB thing and flicking the diodes away with a tiny jewelers screwdriver.

EDIT: Seeupdate June 2019: viewtopic.php?f=25&t=599&p=4343#p5660 no defluffing necessary, runs on a standard DigiSpark, as supplied, no mods.

The diodes are on P3 and P4, but P4 isnt used here and P3 is used as the elevator channel input so it will be fine with the diodes left in place. Its just habit that I get rid of them, and the USB tab.
Here's a link to the DigiSpark thread: viewtopic.php?f=41&t=60

Here's the finished recoder in heatshrink. Tobe's build of the PIC recoder is minute in comparison, but its still small enough to hide (under 1" square by 1/4" deep) and the larger size makes it much easier to assemble. Its slightly smaller than the 'easy' veroboard PIC layout:


Here's a video of the recoder in action:

The PIC and the Digispark recoders use completely different methods of producing GG so I suppose its inevitable that there could have been slight timing differences. To try to maintain some accurate benchmark 'standards' I connected two of the old PIC recoders and two Digispark recoders to a common rudder & elevator signal source and compared the timings with a lab-quality precision counter, and I've tweaked the timings of the sketch so that they match the original PIC recoders exactly. This means that in theory you could unplug one of the original PIC recoders and replace it with a Digispark and not notice any difference at all Image
Tobe has confirmed that in practise there is no noticeable difference.
I dont know if thats an advantage but as the PIC/Tobe combo is well established it seems logical to use that as a timing benchmark. The sketch in post #1 has the "PIC equivalent" timings.


Re: GG Recoder for DigiSpark ATTiny85 and DRV8838

Posted: 02 Mar 2019, 08:39
by Tobe
Here are mine first 2 DigiSparks Recoder connected to some of my projects. In one of the pictures I show the DigiSparks together with the PnP Recoder with Phils PIC circuit, both uses the same DVR8838 Poluolu driver

Re: Another GG Re-coder for a DigiSpark and DRV8838

Posted: 11 Jun 2019, 11:00
by Phil_G
I've re-arranged the connections so that no modifications to the DigiSpark board are necessary, no removal of diodes, no 'defluffing' at all. The new arrangement avoids any of the on-board USB circuitry which makes it a much easier DIY proposition.
The same recoder runs either rudder/elevator galloping-ghost or rudder-only ('RO' or Adams clone) without any changes, just omit the elevator connection. In the absence of an elevator input it defaults to the appropriate pulse-rate for rudder-only.

Here is the new document and sketch.