Replies: 23 comments 5 replies
-
These are very good ideas. Optionally an adapter for 16V8 could be used in the same way it is used for 20V8 (although an adapter is a worse solution compared to your idea IMO). I thought about other improvements as well (controlling the VPP programatically via digitally controllable resistor on I2C bus), but that would make the project a bit more complicated, possibly discouraging beginners to make it. Still, could be worth it - would you like to sketch a schematics for your new solution? Analogue pins A0 - A5: spot on. When I created afterburner I did not know that they could be used as a regular digital GPIO, and I discovered that just recently. So, yes this opens up more possibilities for improvements. |
Beta Was this translation helpful? Give feedback.
-
The schematic for the elm programmer http://elm-chan.org/works/pgal/pgal_e.png shows the commonised pin layout very well. |
Beta Was this translation helpful? Give feedback.
-
Amazingly, both the control code and the fusemap assembler are written in x86 assembler. I can read it, but I'd rather not :). |
Beta Was this translation helpful? Give feedback.
-
Although that pgal circuit registers all the gals towards the bottom of the socket, and that seems sensible because so many pins are similar there, it means it has to switch Vpp and Vcc to pins at the top of the socket. Placing the GAL at the top of the socket so Vcc and Edit are shared makes the other pins less similar .. but they're almost all just logic levels so are easy to steer. Gnd on the bottom corner needs a strong driver, but that could be actual ground on the 22v10/20v8 and a transistor linking the 16v8 to gnd when required. It's probably worth putting the 4k7 pulldowns everywhere, unless the AVR has a pulldown - I can't remember. It would be nice to use the 3608 even though it behaves badly at startup. It's very common and cheap. But the enable pin is awkward to get at. Maybe instead, remove the 2k2 resistor that acts as the bottom of the output voltage divider and let the FB pin go to output voltage. This should set it to 0.6V which is as good as off. Then have a couple of alternate resistors to switch in to give 12V and the adjustable value. Better still the digital pot. The only thing I've got against that is that I have every other part in my junkbox and only the pots would have to be ordered :). I don't know how typical my junkbox contents are. I do tend to have quite a few boost modules which are really the only special part in your existing design. |
Beta Was this translation helpful? Give feedback.
-
It is definitely tempting to throw in some new features to Afterburner, especially if they seem relatively easy to implement. But as we both agreed this extra complexity would probably discourage some beginners to build Afterburner in the first place. I would rather see the ATF16V8C supported and resolve the VCC stability during switch on. But maybe the only good solution for the VCC stability issue is to rework the circuit and keep the MT3608 module powered-on right from the start... |
Beta Was this translation helpful? Give feedback.
-
It might be worth checking the XL6009 converters. They also have to be modded for the enable pin but it may not be as fiddly. I don't know if they behave better but I think Ive got one or two to try. I also found a module on ebay with the enable pin brought out (not sure which converter). But they seem quite rare, probably not good to rely on them. The 6009 is as common as the 3608, but quite a lot bulkier. |
Beta Was this translation helpful? Give feedback.
-
What about removing the physical switch from the VCC side and adding it just between the ZIF GND pin and GND. Actually use 2 switches - one physical and one transistor in series that would be switched by Arduino just before and after interaction with the GAL. The MT3608 would stay always on. Arduino software would have to be modified to strictly switch all pins into Inputs (Z) during inactivity to prevent GAL accidents. |
Beta Was this translation helpful? Give feedback.
-
I checked XL6009 modules and they have even bigger caps and inductor values than MT3608. I suspect the voltage drop and overshoot - if pluged into current Afterburner design with the VCC switch - would cause even bigger voltage drop and overshoot. It's worth to try though. |
Beta Was this translation helpful? Give feedback.
-
It would certainly be good to avoid a physical switch. Very easy to forget to turn it off. |
Beta Was this translation helpful? Give feedback.
-
turnOn / turnOff() : I've just fixed that and pushed the fix to git. Hopefully there will be less accidents when inserting GAL into the socket now. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I'll use that version when I try this again with changes (resistor in line with pin 1). I may modify the Vpp too - perhaps leave the 3608 connected but isolate Vpp unless Vcc is present. |
Beta Was this translation helpful? Give feedback.
-
I found another programmer, also based on GALbalast and ATFblast. https://www.ythiee.com/2021/06/06/galmate-hardware/ edit: The control code is written in 'purebasic' which is a nuisance. It costs $79 for a personal licence. He does provide a windows binary but that's not very useful to me. |
Beta Was this translation helpful? Give feedback.
-
GALMate: thanks - I was not aware of that project. The author seems very knowledgeable about GALs, and his published findings might be useful. VPP rising slowly - yes I read that, so far it seems to affect ST brand of GALs if I understood it correctly. I checked the basic source code as well, also found it hard to read (because of the Basic syntax). But if needed, with a bit of effort it can be deciphered. What I'm interested about is how he drives ATF16V8C which is not supported by Afterburner. Good that you found the MCU source code (thanks to Yorck for publishing it in the first place) - I could not find it either, so I contacted him over email. The compiled basic code seems to run on Wine (on my Linux desktop), and there is a way how to redirect Wine's serial ports (COM1 etc) to physical serial ports (/dev/ttyUSB0 etc). Both mt3608 and XL6009 have a pin called SW (switch) which might be the solution. The afterburner's physical switch could either pull the SW pin high, or it could be controlled via Arduino's A0 pin programatically. This needs to be investigated how feasible it is and whether it improves the power rail dip during turn on. I bought the XL6009 module and so far I have better impression of it than mt3608. When the mt3608 is driven above 16V it produces buzzing sound, probably works harder to achieve that voltage. XL6009 seem to be OK deriving 24V from Arduino's 5V rail. Also - as you noted - the pins are easier to access for modding and soldering. |
Beta Was this translation helpful? Give feedback.
-
I will be interesting to see what you can do with it. I don't think pulling it high will work, but disconnecting it with a physical switch should do something similar to enable - stop the boost, leaving it at 5V. However I think it will also disable during power up and so be better behaved than 'enable' . Unfortunately we don't really want that operated by a physical switch and an electronic switch is awkward as it has to operate at Vpp. Might as well just put a switch in Vpp. I think tweaking the feedback has some promise, either a complete setting with a digital pot as you've suggested, or a couple of transistors switching alternative values of the 2k2 FB voltage-divider resistor to gnd. |
Beta Was this translation helpful? Give feedback.
-
I made a prototype of the programmable voltage based on resistor array connected to Arduino's analogue pins and the FB pin on MT3608. When I control 4 standard value resistors (6k8, 4k7, 4k (3k3 + 680R),3k3) I get these VPP values on the MT3608 output: The MT3608 must still be tuned by the Pot, but the tuning is done only once to set an appropriate wiper/resistance ratio. Because I'm able to set VPP value 4.8V by changing the resistor array connections (actually all are disconnected from ground and A pins are set as Input) I no longer need to do the EN pin mod on MT3608. MT3608 still needs a mod though, A 51k resistor has to be soldered on the bottom of the module, in between the wiper (FB) and one of the other Pot pin. That is an easier mod than the current mod because the POT terminals are bigger than the SMT pads. The resistor array also need additional 10k resistor in parallel leading to ground to achieve the above VPP values. With this arrangement I can detect presence of the VPP resistor array by reading the Analogue values on A pins and comparing the values with the expected values. Therefore the Arduino code can be common for current Afterburners design and the new one by doing the resistor array test early when the Arduino starts. By reading the analogue values I can even detect whether the Pot tuning is completely off and needs calibration. It is not super precise, but it's close enough to allow some sort of tuning gage as a visual aid So far I used only 4 pins to achieve the above values. I could probably add another resistor to have a bit more VPP values (like 10.5V, 11.5 etc) if needed. The measured values (by multimeter) vary a bit compared to calculated results, but that's because of the 1% resistor tolerances especially when used in combinations. The digital Pot variant is still not off the table, but the fact that most of the cheap ones have 20% variability might be an issue. Or perhaps not, because the resistance variability could possibly be corrected by tuning the Pot. Anyway, the resistor array solution does not need an external IC, so it is very convenient to build quickly without sourcing the extra IC. The advantage of digital Pot is that it saves at least 2 Arduino pins, which could be used for something else (single ZIF socket solution perhaps? :-) |
Beta Was this translation helpful? Give feedback.
-
What does setting some pins to +5 do ? It should reduce the output voltage and maybe reduce the step size of other pins. Might be a way to force 5V even though the other resistors are sized for 14V. |
Beta Was this translation helpful? Give feedback.
-
I have not tried that. 5V should not be an issue, when all A pins are set as input the voltage drops to 4.8V which is (and so far was) good enough for the GAL chip to function normally. That's how the switching between '5V' and 12V (and other) VPP voltages will be done. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Thanks. I'll give it a try when you're happy with it.
I built up the other design but it doesn't work yet. As well as needing a
paid-for version of the compiler to change anything, It has a nasty comms
method - it delineates data frames by forcing a break condition. This
doesn't work well on an arduino platform for a couple of reasons.
…On Sun, Mar 26, 2023 at 11:27 PM ole00 ***@***.***> wrote:
I made a progress with the new design. The new features include:
- unified socket for 20 pin and 24 devices (including GAL20V8)
- variable VPP via digi pot
- VPP measurement via A0 ADC (used for VPP calibration)
- DPDT switch to disconnect both EDIT (VPP) and 5V rail
- improved the 5V rail dips issue (used 220uF CAP as you suggested)
- single PCB with selectable SMT or TH footprints
- simpler connection to MT3608 module (no trace cuts required)
Extra components compared to the old design:
- MCP4131-103 digi pot (for variable VPP)
- 74HC595 (acts as a GPIO extender)
- MOSfet for 20-pin socket GND
- Trim Pot 2k for compensation of MCP4131 (in)tolerances, can be
replaced with fixed resistor
- more passives
The new software (unreleased yet) already works with all planned features
(I managed to destroy few GALs during the process..).
It is also backward compatible with the old board design (I can detect the
new design by probing the presence of MCP4131 digi pot).
I just need to validate the second revision of the new PCB and then
prepare some documentation and release it.
A teaser image: top - the first revision with the 595 SMT footprint badly
placed, bottom second revision with better placement.
[image: afterburner_wip_3 0]
<https://user-images.githubusercontent.com/13712137/227808302-2b8d51ef-d906-4201-9f05-47f2a522cf2b.jpg>
—
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFFOGKGS4JWCUVT6GERD2TW6DGFDANCNFSM6AAAAAAUCPCDKE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Yes, but the point of building it was to quickly compare another
implementation to rty to understand why I couldn't program 20V8s. I was
trying to avoid re-coding the PC end (and probably adding a few bugs :)
…On Mon, Mar 27, 2023 at 7:58 PM ole00 ***@***.***> wrote:
Ah, you mean GALmate? Its PC software does not seem that complicated- at
least for the GAL programming part. It sends a packet of bytes to Atmega,
to write or read fuses at certain row. It should be possible to reimplement
the core functionality in C reasonably quickly. I checked it when I was
implementing the ATF16V8C support, and after a while it become clear.
—
Reply to this email directly, view it on GitHub
<#25 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFFOGPUM2CBF5JMV4KJ6ULW6HPN5ANCNFSM6AAAAAAUCPCDKE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
… On Mon, Mar 27, 2023 at 8:07 PM Adrian Godwin ***@***.***> wrote:
Yes, but the point of building it was to quickly compare another
implementation to rty to understand why I couldn't program 20V8s. I was
trying to avoid re-coding the PC end (and probably adding a few bugs :)
On Mon, Mar 27, 2023 at 7:58 PM ole00 ***@***.***> wrote:
> Ah, you mean GALmate? Its PC software does not seem that complicated- at
> least for the GAL programming part. It sends a packet of bytes to Atmega,
> to write or read fuses at certain row. It should be possible to reimplement
> the core functionality in C reasonably quickly. I checked it when I was
> implementing the ATF16V8C support, and after a while it become clear.
>
> —
> Reply to this email directly, view it on GitHub
> <#25 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAFFOGPUM2CBF5JMV4KJ6ULW6HPN5ANCNFSM6AAAAAAUCPCDKE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
I see. The 20V8B's I bought from Aliexpress work OK on both old design (with adapter) and the new design (no adapter). I have one 20V8B that I somehow managed to erase the PES, but that was the only hiccup I had. I noticed GALmate supports rewriting the PES, so I'll try to implement that into Afterburner. The PES data on those GALs state to use 14.5VPP, but that usually does not work well with Afterburner, so it reports 2V less. I programmed it with VPP 12V (old design) and 12.5V new design. I also checked GALep's software which is free to download (I do not have GALep programmer though) which has a human readable definition of GALs it can program. It is a text file containing some configuration data. One of the field is VPP. For ATF16V8C the VPP they use is 11V , so it kind of confirms my finding that 12V for ATF's is too much. For Lattice 20V8 they use 12V - the same what I used. |
Beta Was this translation helpful? Give feedback.
-
Hello, someone want to sell one Afterburner already done? |
Beta Was this translation helpful? Give feedback.
-
When building this circuit up, I started to wonder if I could use just a single socket instead of at least 3 for different device types.
I decided not to do it immediately as I could only find one type of GAL in my stock (I thought I had some 22V10s too) but it doesn't look very difficult. Probably a transistor to give a good ground sink to pin 10 when 16V8 is present, a few pulldowns on inputs that are also RA pins, and drives for pins 11,13 and 14, and a lookup table in the code. That's with the GALs registered towards the top of the socket - it's a simpler translation with them at the bottom, but needs switching for EDIT supply between two pins. This could be a mechanical switch, though.
Most of the arduino's analog pins can also be used as digital out so I think there are just enough pins to do it. If a 32U4 is used the UART pins D0 and D1 are also freed up. I particularly like the Pro Micro (which is not an Arduino product) for this sort of thing, though they've got a lot more expensive recently.
Beta Was this translation helpful? Give feedback.
All reactions