PDA

View Full Version : OT - Electronics questions



tony ennis
05-02-2009, 06:28 PM
Q1: What is a decent programmed logic/gate array for home use? I have several hare-brained projects cooking and such a device could help a lot.

Q2: I have no QCGB and no CNC. If I were going to build a 'virtual QCGB', would I need a closed-loop system to control a leadscrew? Of course the input signal is from the leadscrew itself so if it bogs down somehow the leadscrew would slow down proportionally. There wouldn't be any thought of repeatability beyond using the thread indicator.

Bmyers
05-02-2009, 06:41 PM
Q1: What is a decent programmed logic/gate array for home use? I have several hare-brained projects cooking and such a device could help a lot.

http://tinyurl.com/c4ubo6
neat little PLC type controller you can program via the front screen or free software. These are on ebay all the time

tony ennis
05-02-2009, 06:50 PM
The electronic device I am talking about is an IC chip. It has a *lot* of standard 'and', 'not', and 'or' gates inside of it. By putting the IC in a certain mode, you can define the interconnections between the input pins, logic gates, and output pins.

Here's an example of what I mean. (http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Comb/pla.html)

Paul Alciatore
05-02-2009, 07:09 PM
Programmed logic arrays are out. Microcontrollers like the Basic Stamp, the Propeller, PicAxe, and others are in. These are one chip computers that are programmed via a serial connection (one pin). They come in different sizes with different numbers of In and Out pins and memory. They are programmable in a high level language, usually a simple form of Basic. My favorite is the PicAxe group because they have the simplest serial interface for programming. It only requires a couple of resistors and a connector. Others need $50 and higher devices. The PicAxe devices are also a lot cheaper. But they are somewhat slower than others. This may or may not be a problem for a given application.

Some sites:

http://www.parallax.com

http://world-educational-services.info/product_info.html

http://www.phanderson.com/picaxe/

The above devices are more advanced versions of PICs or Peripheral Interface Controller which are a more basic device and harder to program. The above devices are PICs with built in operation systems to allow the use of higher level languages. PICs also usually require more expensive programming devices.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=64

http://en.wikipedia.org/wiki/PIC_microcontroller

I am currently working with some Pic devices for a couple of projects. They are very useful devices.

nheng
05-02-2009, 07:13 PM
You can get a variety of devices from Digikey from companies like Lattice Semi, Xilinx, Altera and others. You can usually get entry level (recent generation) tools for free but they are limited to perhaps a third of the way up their "food chain".

I'd suggest Lattice Semi as a starting point, then Xilinx. Altera has had their heads up their butts for a long time regarding tools.

You may want to Google the "Frog" CNC, which is no longer available but was based on a PIC processor. It would do threading using a single pickup sensor on your spindle. Likewise, it would do longitudinal feed, repeat operations, etc. Perhaps you could pick up some ideas from it. I ran one for a while and some results are here (along with the valuable comments of others): http://bbs.homeshopmachinist.net/showthread.php?t=3949&highlight=kermit%27s

Which reminds me, Mach3 may be where you'd like to be. It will support lathe or mill and I believe it supports threading now. Only needs a parallel port and stepper driver.

You don't necessarily need closed loop but as you already are aware, if it bogs down, a stepper will lose steps. One solution is to gear it down ... after oiling and adjusting the gibs ;)

Den

lazlo
05-02-2009, 08:04 PM
You can get a variety of devices from Digikey from companies like Lattice Semi, Xilinx, Altera and others. You can usually get entry level (recent generation) tools for free but they are limited to perhaps a third of the way up their "food chain".

I'd suggest Lattice Semi as a starting point, then Xilinx. Altera has had their heads up their butts for a long time regarding tools.

Den's got a good list. Xilinx is the high-end, with the largest logic array sizes: the Virtex-5 series have 330,000 logic cells (about 16 Million gates), and are big enough to synthesize a multi-core microprocessor. But the problem is the tools. The pro's design in Verilog or VHDL and use Synopsis Design Compiler or Synplify for logic synthesis, but that's $30,000 and up.

I would look into the developer's kits and/or educational packages that Xilinx et al provide. Xilinx has the Spartan developer's kit for $189, which includes a good sized FPGA (about 700,000 gates -- more than enough to synthesize an entire microprocessor :)) mounted on a proto board with an LCD display and a variety of peripheral ports

http://www.xilinx.com/products/devkits/HW-SPAR3A-SK-UNI-G.htm

By the way, synthesizeable logic arrays are not "out" -- they're used by high-end applications every day. It's just a question of whether you want/need your solution in hardware (FPGA's) or software (a microprocessor or a microcontroller). Synthesizable logic is vastly faster than a software solution, but it's a lot harder to develop. The CNC Brain uses Xilinx FPGA's, for example, to synthesize an array of PID-specific controllers.

tony ennis
05-02-2009, 08:21 PM
I'll certainly be looking into all these things, but it's the proverbial ant-and-sledgehammer.

I could implement my application with about 100 and/not/or gates. That's plenty of ICs to solder, so I'm not so excited by the thought of it. But the chips listed above have *millions* of gates, lol. I need some 1970s technology! :D

lazlo
05-02-2009, 08:38 PM
I could implement my application with about 100 and/not/or gates. But the chips listed above have *millions* of gates, lol. I need some 1970s technology! :D

Lattice (and Altera, I think) still sell classical PAL's and CPLD's with a couple of hundred gates. I think they have proprietary Sum of Products (ABEL or PALASM) equivalents.

nheng
05-02-2009, 08:43 PM
Tony, At the low end of the CPLD families such as Lattice's offerings, you'll find your logic :)

For instance: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=122-1571-ND

This part has 34 I/O cells and is flash programmable (in circuit). It's $1.50 and in stock at Digikey.

The software is probably free but you'd have to check Xilinx web site.

Many of the software packages will let you enter Boolean equations for all resources (gates, flip-flops, I/O), macro functions (such as 7400 series parts, counters, muxes, etc.), or if you choose, schematic entry (which I despise) or a higher level language like VHDL (easy enough to use if you pattern on a simple sample circuit, not so easy otherwise.

One of the nicer features of today's logic is the in-circuit programmability. You essentially can avoid soldering when a change is required.

Looking at the Xilinx, this is the smallest package, a 44 PLCC. Nice size but not fine pitch so there are numerous ways of breadboarding it.

You can also run a simulation of your logic design, although the simulators generally need to be fed with state information.

If speed is not that critical, you can throw the thing together and it should work. For more speed, a synchronously clocked design will easily get you to 50MHz, 100MHz or more. The part I linked to has a 5ns propogation delay. Even for the low end device it is, it blows away the discrete logic.

Lazlo and other electronics types, breadboarding BGAs is now pretty easy with a proto board from Schmart board (SP??). You can lay down a BGA device with your big old Weller soldering tip. They have many other board types also available. The BGA boards are not cheap ($50) but the idea seems really schmart :) We just picked up some of the BGA boards and they are nicely made.

Den

Ryobiguy
05-03-2009, 01:26 AM
If you want a virtual quick change gearbox, and are not hellbent on have a PLD single chip hardware solution, here's what I did with an old PC running a plugin I wrote for EMC:

http://www.fricktion.net/~mfrick/lathe/els/ElsDoc_v0_1.pdf


The stepper motor output is tightly interpolated against the spindle encoder pulses such that (basically) the stepper motor speed is updated on each encoder pulse to closely match the required speed ratios. This is accomplished by assuming the spindle is at a constant speed in-between encoder pulse events, and outputting the step pulses after the required percentage of time between spindle encoder pulses has occurred.


It's kind of like a CNC version of a manual lathe - it tightly gears the stepper from the spindle at whatever feed/pitch you like.
It also can work around not having a threading dial, if instead you've got a carriage stop.

The algorithm is pretty simple and could be implemented in programmable logic. That would give good performance, so you'd be able to use a much higher resolution encoder.

-Matt

Evan
05-03-2009, 05:34 AM
For what you want to do just use an eprom(s) as a PAL device. Easy to reprogram and thousands of virtual gates.

tony ennis
05-03-2009, 09:59 AM
That's a neat thing Ryobiguy. At this point, I'm looking to keep external computers out of the shop. The basement floods and is dusty to begin with. And I program for a living...

Otherwise I'm not hell-bent on using any particular solution.

I like the EPROM idea. I think of traditional computer memory when I think of using EPROMs - you have some need for a piece of data at a certain location and you calculate the address and go fetch it. In this application, the address lines aren't used in such a coherent fashion. Instead, If you drew a box around your schematic of discrete components, the address lines would be any line drawn through that box. Some inputs could be from other ICs, some could be from a mechanical switch! Then for every possible combination of the inputs, you calculate the result you want and slam it into the EPROM. The schematic has now been converted to a 'truth table' and you're off to the races. This use of an EPROM had never occurred to me. Of course I am not an EE sort of guy either.

Den, that IC you linked is remarkable. In the simple arrays I have seen, you get one layer of 'and' gates and one layer of 'or' gates. While you can do a lot with that, it pales to the later evolutions of the idea. The example you linked clearly supports state memory (flip flops) given your comment about using a counter IC macro. It also says a lot about the order and depth of the operations. For example, the counter is a flip-flip (itself likely a macro) followed by an 'and' gate at the very least. It feels like you can string together whatever gates you like in whatever order. Remarkable.

Weston Bye
05-03-2009, 10:03 AM
My article, "A Semi-Automatic Coil Winder" in the current and next issues of Digital Machinist deals with this for coil winding. An encoder built into the spindle pulley is directly connected to the stepper motor that advances the wire guide nozzle to evenly distribute the wire on the bobbin, with automatic reversing. I dealt with varying the winding pitch by using a "programmable" encoder. The spindle pulley was equipped with 20 bonded nitrile ferrite permanent magnets mounted in holes around the spindle pulley that I could push forward to trip a hall sensor, or push back to miss the sensor. This provided 20 different ratios, usable over a number of wire gauges. I used 74LS00 TTL logic gates in 3 ICs for direction changing and for a homing function when the spindle was not turning.

http://img.photobucket.com/albums/0803/Weston/LeadPhoto.jpg

Though unusable for threading, the principle is demonstrated. For a threading application, I would use a high-count encoder, counters and magnitude comparators to perform the division to drive the stepper motor. An EPROM as Evan mentioned, along with thumbwheels would be useful in presetting the comparators to produce common threading pitches, otherwise a table of codes and the thumbwheels would serve. A second zero-degrees encoder or sensor on the stepper leadscrew would be necessary, along with (maybe) a threading dial type sensor. Add an oscillator to return the carriage to a starting position switch, maybe an ending position switch and some miscellaneous logic. Perhaps a dozen chips or therabouts.

Why not a Microchip or Basic Stamp-type solution? Very doable, but I think I would spend more time puzzling through the programming than I would need to figure out the logic and wire up the hardware.

lazlo
05-03-2009, 10:17 AM
Den, that IC you linked is remarkable. In the simple arrays I have seen, you get one layer of 'and' gates and one layer of 'or' gates. While you can do a lot with that, it pales to the later evolutions of the idea. The example you linked clearly supports state memory (flip flops)

That's the difference between an Old-School PAL (Programmable Array Logic) and an FPGA: an FPGA is comprised of logic cells: a flip-flop, a cluster of logic, and a 4-input lookup table. The logic cells are routed through a variety of mechanisms, usually by RAM-based. I hate to say this Tony, but FPGA's have been constructed like this for 20 years :) The only thing that's changed is that there are lots more logic cells now (up to 330,000 of them).

If you're going to implement a synchronous design, a logic cell-based PLD from Xilinx or Altera is much simpler to design than a static logic based Sum of Products device. But the simplest form of an electronic leadscrew is just a divider circuit, which can easily be done in combinational logic.

tony ennis
05-03-2009, 10:51 AM
I hate to say this Tony, but FPGA's have been constructed like this for 20 years

lol. I had never heard of any of this until yesterday. I'm a programmer, and not the normal kind that got weeded out of EE school. I pre-washed :D and started in computer science directly.

I was fiddling with all I knew about, just the basic gates ("oh look here's a counter chip, how cool!"), noted the number of ICs I would need, and said to myself, "This is nuts. I haven't seen that many gates on a board in a long time. There has got to be an easier way..." So I consulted the university of Google... then I came here.

I am leaning towards a modern device because they're more fun and will reduce my chip count. I'd need to learn more to decide, including the cost of various solutions and available programming tools. Great hardware with crappy support tools is useless, especially for a beginner.

That being said, I got an "a-ha!" moment by figuring out what Evan meant so it's all good.

Keep it coming, this is great!

Evan
05-03-2009, 11:17 AM
Another thing to consider on the use of an eprom is what happens when you feed back an output or two to the address lines.

Also, an eprom or three combined with a counter can be used to synthesize arbitrary waveforms from a clock pulse including poly phase sine waves. Feed the outputs to an R2R ladder for D to A conversion. It's somewhat of a sledgehammer approach but eproms are cheap like dirt.

J Tiers
05-03-2009, 11:24 AM
You may want to select your target device at least partly based on the cost of the programmer or other ancillary equipment needed.

A general purpose programmer capable of uPs, EPROMS, EEPROMS, etc, may be rather expensive, as you may know. That may not be justified.

of course, if you already have such a device, the incremental cost is limited to any required software upgrade, and an adapter plug, if needed.

The cost of a simple development board for a suitable uP may be a lot less than the entry cost for a more general programmer. If you do uP stuff now, you may be able to get one from your rep as an "evaluation".......... they may be fairly hungry now.

vincemulhollon
05-03-2009, 12:28 PM
Q1: What is a decent programmed logic/gate array for home use?

I guess you're looking at something like the Xilinx Spartan-3 starter kit for around $180? Works for me.

http://www.xilinx.com/products/devkits/HW-SPAR3A-SK-UNI-G.htm

It comes with a nice CDrom of outdated software... Better off downloading the most recent version off xilinx's site. I recall having to register before they sent me the download link. If I recall, the free software limits the number of gates or logic cells or whatever to somewhere around the maximum one typical human could produce. In other words, if you do something big enough that you're on a team at work, you'll need to pay, but for anything simpler, its free.

Probably, before doing something complex, you'll be starting with typical projects from fpga4fun, like "display some words on the LCD", or blink an LED, etc. W/ regards to FPGAs that is right about where I am. It's pretty cool to do this stuff since I was brought up that this whole area of experimentation was impossible for people at home. Guess thats not the case anymore.

http://www.fpga4fun.com/

The general trend is to use a free soft-processor core like the picoblaze to do the mundane stuff like UI that would be tedious at best to do in hardware, or really complicated processing, but do as much I/O processing grunt work as possible in hardware. Sort of, if it would use an "if" statement you probably write picoblaze code, but if you'd think of doing it using TTL chips then write FPGA code. So, the picoblaze CPU just reads in a simple integer for the X axis in "software", but all the debouncing and counting and counter overflow and limit detecting is done in "hardware". Do your I2C in hardware instead of bothering the CPU, etc.

Ryobiguy
05-03-2009, 03:44 PM
Tony - I'm in the same boat: my shop space is dusty, it sometimes floods (well, just the floor,) and I program for a living too.
To avoid a PC setup, I think it would be a good solution to use CPLD or FPGA for the high speed portion, and use some simple 8-bit microcontroller for the user interface to configure the parameters and settings.

I'm glad someone mentioned the FPGA-for-fun website, I've had my eye on the parallel port model for awhile. However, that requires a PC to load the program, and set the parameters.


Why not a Microchip or Basic Stamp-type solution? Very doable, but I think I would spend more time puzzling through the programming than I would need to figure out the logic and wire up the hardware.

Hey Wes, that is neat!
I built a coil winder, kind of a special case one, for guitar pickups. The wire is advanced not continuously, but in discrete bursts after each half-winding, that is, after the wire wraps around one end of the rectangular pickup bobbin.
I used a $25 AVR Butterfly board, which runs at 8mhz and has a minimally crude user interface all ready to go: 6 character LCD, and a 5 button "joystick". Encoder setup is just a 2 pulse/rev gear sensor sensing the ends of a bar that I threaded on the spindle - nice and simple.

The wire in this application is super light (42+ gauge,) so I decided to back away from the complexity of turning a stepper into a real linear actuator, and instead just made a teflon screw thread as a sleeve that fits on the stepper shaft, where the wire sits in the (specially deep) thread groove and the rotation of the shaft guides the wire back and forth directly.
Aside from simplicity, the big payoff with this design is that there is such little mass/rotational inertia, and there is zero friction, so the stepper is not loaded and can accel/decel super fast for the short quick bursts of movement that it needs to do.

Anyways, back to lathe application - an 8 bit microcontroller is going to be a bit underpowered. This has been done, but it may be limited at interpolating one encoder pulse per revolution, which may work just as well in many cases.

Going with the most clever logic-gate/EPROM trick (it's all magic to me at that level,) I think you'd need a super-super high resolution encoder, because it's just dividing. Using a more sophisticated approach (software on decent processor or better yet CPLD/FPGA,) you can track the current speed, crunch the numbers, and interpolate. This way you don't have to be limited to feeds/pitches that have a certain mathematical relationship to the lathe setup's fundamental numbers of encoder pulses/rev and steps/inch.

Well, I probably shouldn't assume -- I don't know if there is some logic-gate magic/EPROM truth table trick that can be used to have a simple way of tracking the speed and interpolating (ie.) more than 1 step output per encoder input event. Maybe that approach assumes you just need an encoder with a high enough resolution to avoid that case.

-Matt

Weston Bye
05-03-2009, 04:17 PM
...I built a coil winder, kind of a special case one, for guitar pickups. The wire is advanced not continuously, but in discrete bursts after each half-winding, that is, after the wire wraps around one end of the rectangular pickup bobbin...
-Matt

This winder should be able to do that in a limited sense. Just advance a couple of the encoder magnets in clusters in line with with the ends of the bobbin. Each step of the encoder (1 magnet) represents .0005" of linear movement of the wire guide nozzle.

Evan
05-03-2009, 05:24 PM
Going with the most clever logic-gate/EPROM trick (it's all magic to me at that level,) I think you'd need a super-super high resolution encoder, because it's just dividing.

High encoder resolution isn't required no matter what approach is used. What we need to know is if the spindle is changing speed and by how much. A resolution of perhaps 10 pulses per rev is plenty since the mass of the spindle and chuck won't allow it to change much in 1/10 of a rev. If it changes faster than that you are screwed anyway. If we use an accurate time base (crystal oscillator) to create an unvarying pulse train we can use the pulses from the encoder to gate the time base train to a counter. This will produce an accurate count that reflects the current spindle rotation velocity for that tenth of a rev to nearly any desired degree of accuracy. That value can then be used as the address input to an eprom with the output being a decoded drive signal value based on the input.

In most cases a single encoder pulse per rev will be sufficient.

sansbury
05-03-2009, 06:12 PM
Another option for microcontrollers is the "Arduino" which is a Linux-style open source hardware and software platform. You can buy manufactured boards for about $30 and they can be programmed from your PC via USB.

http://www.sparkfun.com/commerce/product_info.php?products_id=666

lazlo
05-03-2009, 06:47 PM
Another option for microcontrollers is the "Arduino" which is a Linux-style open source hardware and software platform. You can buy manufactured boards for about $30 and they can be programmed from your PC via USB.

Arduino is just training wheels for the AVR. :) Seriously, I have a couple of AVR development boards, including the Butterfly, and one of the Arduinos, and the only difference is that the Arduino hides the bootloader from you.

You can run WinAVR/GCC bootloader directly on the Arduino, when you get more comfortable with the system.

Ryobiguy
05-03-2009, 06:52 PM
I see, Evan... pretty clever. Would you need "change-chips" (a different EPROM) for each feed rate you wanted?

Just thinking out loud:
How would you encode/decode the output pulse train information that's stored at each address? My first guess is maybe the number of clock ticks between steps, fed into a down-counter that steps when it rolls over.
I guess the number of counter pins/EEPROM address lines and the EPROM size would be worked out to give a useful working range of feeds, given the minimum encoder pulse rate and clock/counter rate.

But, the scheme of using the number of clock ticks between steps doesn't scale up and down very well. At slow feed rates and slow spindle rates, this could be a very large number of clock ticks, so you might need a LOT of data bits stored in each address. At fast feed/spindle rates, you might lose step speed resolution. For example there is for big difference in speed between 6->7 clock ticks per step vs. 240->239 clock ticks per step, and steppers sure don't like abrupt speed changes when they're going fast.

So maybe the obvious way of storing the number of clock ticks isn't the greatest way of encoding the step rate data, it feels too "linear".

Maybe half of the EPROM data bits could contain a divide by n value, which scales the clock for the step-counter, whose value is set by the second half of the data bits. I think something like this might work better that the plain vanilla clocks-per-step EPROM value scheme.

So what's the most clever way of encoding the step pulse train? I bet I'm going to slap my forehead when I find out! :)

-Matt

Evan
05-03-2009, 08:19 PM
Would you need "change-chips" (a different EPROM) for each feed rate you wanted?
Heck no.
Use a large capacity eprom like a 27C010. It has 17 address lines. That's more than enough to take care of over 100 threading pitches and give sufficient resolution to maintain and correct stepping rates. A complete description of how it works is pretty lengthy and I don't have one already written out. It's something I have thought of implementing and it isn't all that difficult. I will be using a variation on this technique to speed control the spindle on my mill in the near future. When I build that I will document it. That will be a servo system instead of a stepper based system and could also be used for threading since what is really needed is a correct leadscrew rate in relation to the spindle rate. Because of the amount of friction and working load in the system this can also be done with a very simple encoder on the leadscrew to close the loop if we use a good stiff leadscrew drive.

A single eprom can decode over 100 different thread pitches with a maximum deviation from nominal of around .0005 per thread pitch, non accumulating.

For many purposes it isn't very critical as the specs for thread fit allow enough room for small deviations. I sometimes will cut threads off hand when the engagement is short or non critical. It isn't that hard.

Weston Bye
05-03-2009, 08:48 PM
I once had an application where I had to program Allegro Hall sensors in production. The sensor sensitivity was adjustable over a 32 step range. the 2-wire device required a programming code that required 3 different voltages and up to 128 discrete programming steps. Also, there were 2 different programming modes so the programming was doubled. I needed something that could be easily controlled by a PLC and Allegro didn't make such a thing. I ended up using a 27C256 EPROM, some counters, gates and an oscillator.

6 of the EPROM inputs were driven by the PLC (I used DIP switches during development) and the rest of the EPROM inputs were driven by counters. The 8 outputs drove 4 set/reset flip-flops that selected the 3 programming voltages and enabled/disabled the sensor read circuit during programming. the EPROM programming was easy but boring as it was very repetitive. Once done though, copies were easy.

I mentioned flip-flops on the outputs; bear in mind that the output of the EPROM can be "glitchy" when changing addresses.

nheng
05-03-2009, 09:48 PM
Wes1 is correct that Eprom will have glitches between address changes (undefined data outputs).

The way to deal with this is to synchronize the Eprom outputs with a system clock before using them. For instance, instead of using an Eprom output directly, you would pass it thru a D flip-flop (or an octal or 16 bit wide version if needed). The D flip-flop can be clocked by the opposite edge of the clock (that is advancing the address). The Eprom data will be stable before it is clocked to the D output.

The D flip-flop output gives you a glitch free version of what you want. With an FPGA or CPLD design, you normally wouldn't need to do this if you create a synchronous design.

Den

tony ennis
05-03-2009, 09:54 PM
Would you need "change-chips" (a different EPROM) for each feed rate you wanted?

I'll put my head on the block. My decapitation will be instructive for all involved :D

In an Atlas QCGB there are 2 stages. The left side is a divide-by-n, where n is a power of 2 between 0 and 5. The right side has a stack of 9 gears from 16 to 30 teeth. They are driven by a gear with 16 teeth. (hmmm maybe it's a 32 tooth driver, and there's a divide-by-two somewhere else in the gear train. Whatever, doesn't matter...I'll stick with 16.)

So here's how the right side could work.

Our two input sources are:

1. a series of pulses from the QCGB's left side which is nothing more than the spindle pulses divided as mentioned previously.
2. a switch setting from 1 to 9 which selects the cone gear.

#1 serves as the clock for a counter. The counter's 5 lower ordered bits are all we need since our largest cone gear has 30 teeth. These 5 lines are connected to A0-A4 in the EPROM. Now, the switch has 1 line per setting. While I believe they could be muxed into 4 lines, let's assume we use 9 lines for simplicity's sake. They are A5-A13.

We've now synthesized a memory address lookup that looks like

000000100000xxxxx

Where the 1 is A10 and the xxxxx's are the A0-A4 (the clock's input.)

Now, the idea is to emit a 1 each time the selected cone gear's tooth count comes up on the counter. Let's say the cone gear connected to A10 has 26 teeth. So, 26 teeth, starting at 0, is 25, and in binary that's 11001. The address looks something like:

00000010000011001

So we program the EPROM so the pattern above emits a 1, and everything else (for those low order bits) emits a 0. (Depending on the EPROM, there could be 8 bits available for output data, or maybe just 1. YMMV. I am assuming there is 1 bit.)

So as the clock ticks the EPROM produces a string of 0's. That is, until the pattern above is seen. Then it emits the 1.

For added fun, we want the counter to count modulo 26 (because the 26 tooth gear is selected.) To accomplish this, the value emitted is also fed back into the counter's RESET pin (choose a counter chip for the task) so when a 1 is emitted the counter is reset. So the counter counts to 26 in this case and resets to 0. (I may have an off-by-one error here, but the gist is correct.)

Finally, a QCGB's right size isn't just a divisor, it is a fractional ratio with 16 in the numerator. So run the output through a multiply-by-16. In our case, we really want a ratio of 16/26. If 104 pulses came in, only 4 are emitted by the EPROM but we then multiply this back up to 64 pulses.

While I pretty confident this is correct in principle there are probably a lot more elegant ways to handle it.