Another GG Re-coder for the DigiSpark and DRV8838

Waggly tails
Post Reply
User avatar
Phil_G
Posts: 299
Joined: 15 Feb 2018, 23:32
Contact:

Another GG Re-coder for the DigiSpark and DRV8838

Post by Phil_G » 28 Feb 2019, 21:59

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

digispark_recoder.jpg

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:

digispark_recoder_sep_batt.jpg

Cheers
Phil
Attachments
gg_for_digispark.ino
(3.11 KiB) Downloaded 48 times

Tobe
Posts: 148
Joined: 16 Feb 2018, 06:19
Location: Varberg or Stockholm, Sweden

Re: GG Recoder for DigiSpark ATTiny85 and DRV8838

Post by Tobe » 01 Mar 2019, 05:33

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

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

Re: GG Recoder for DigiSpark ATTiny85 and DRV8838

Post by Wayne_H » 01 Mar 2019, 11:32

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 )
Cheers,

Wayne
Once a Retrobate, always a Retrobate............ :roll:

User avatar
Phil_G
Posts: 299
Joined: 15 Feb 2018, 23:32
Contact:

Re: GG Recoder for DigiSpark ATTiny85 and DRV8838

Post by Phil_G » 01 Mar 2019, 17:44

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:

digispark_recoder_heatshrink.jpg

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.

Cheers
Phil

Tobe
Posts: 148
Joined: 16 Feb 2018, 06:19
Location: Varberg or Stockholm, Sweden

Re: GG Recoder for DigiSpark ATTiny85 and DRV8838

Post by Tobe » 02 Mar 2019, 08:39

20190302_085025_resized.jpg
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
Attachments
20190308_072234_resized.jpg
20190302_084910_resized.jpg
20190302_085400_resized.jpg

User avatar
Phil_G
Posts: 299
Joined: 15 Feb 2018, 23:32
Contact:

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

Post by Phil_G » 11 Jun 2019, 11:00

Update:
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.

Cheers
Phil
Attachments
digispark_recoder2.pdf
(524.67 KiB) Downloaded 36 times
digispark_gg_v2.ino
(3.23 KiB) Downloaded 29 times

Post Reply