# How is this CD4013 application supposed to work?

I'm trying to troubleshoot an issue in a synthesizer I have, an early 80s synthesizer from Roland called RS-09. I'm just starting to study logic and am perplexed by what's going on. In this synthesizer, a 4013 is being used as a frequency divider to divide or not divide a trigger signal from a master oscillator based on whether the user has selected a feature called "Octave down" via a switch. The output Q of the 4013 then passes to a "top octave generator" that uses it to generate the 12 notes of a chromatic scale from which all the other notes are then made. Right now it is only working in "Octave down" mode; without "Octave down" selected, all keys just produce noise. Here's a closeup of this part of the schematic. The vertical line labeled with "10" connects to the switch, and the horizontal line with the indicator that the square wave should be there connects to the octave generator:

The 4013 is set up so that the "high" voltage is 0V and the "low" voltage is -10V (down arrow is -10V supply). When the "Octave down" is selected and the 4013 is supposed to divide, the switch applies -10V which sends a little less than that -10V to SET (pin 8) via the 15kohm resistor; when "Octave down" is not selected, 0V is connected to that path. In Octave down mode, that -10V is also able to pass through the diode D206 to RESET (pin 10) (less 0.6-0.7V from the diode drop) and with reset and set held in the low state, the flip flop is in clocked mode, responding to the trigger signal from the master oscillator. This seems to be working just fine. With Q/ connected to D as it is, the flip flop also "binary divides" and Q outputs a square wave at 1/2 the frequency of the trigger.

My problem is that I don't understand what's supposed to be happening when "Octave down" is not selected. I don't see how it could possibly work, and it doesn't. This is what my understanding is, but something must be wrong:

The ~0V at SET holds it in the high state but cannot pass through D206 to RESET, leaving the reset open to receiving its "instructions" from the oscillator (direct mode). The trigger oscillator starts out oscillating between +5 and -10V but the diode clamps it at 0V to cut off the positive portion and is then sent to RESET [edit: this is not quite what is actually happening-- see oscilloscope images below]. But with the Set held high, the only possible outcomes for Q are the high state when the oscillator is at its low point sending ~-10V to Reset, when Q is high and Q/ is 0, and the "disallowed state" of both Set and Reset being high, leading to both Q and Q/ being high, when the oscillator is at its high point. Therefore, Q just sends out a constant "high voltage" (0V in this case) with a little bit of noise. That is what I'd expect and what I'm seeing it do. My meter and oscilloscope measurements confirm that this is what is happening.

How is this supposed to work? Something is clearly wrong both in my interpretation of how it should work and in the way the circuit is actually working, but I've looked it over so many times and still can't figure it out.

Your help is very much appreciated!

Edit: I am adding these shots of the oscilloscope showing different inputs and outputs in the setting that is not working (higher octave). I left the vertical position where center is 0V to show their relative positions. I am on 0.5V/div. I was surprised to see how far negative the waveform at Reset is and how small the amplitude is. This is a little different from what I thought I observed before and more apparently "incorrect".

The output of the master oscillator (where it arrives at CLOCK) is not a great-looking trigger waveform either, and my understanding was that 4013 requires a good trigger, but it seems to be working in clocked mode so maybe that's not an issue.

• Yes that table is correct. S/R are intended to be used exclusively and when both are on (1) both outputs are on (1) while Qbar to D generates the lower octave.(=/2), something is wrong in bias to disable that – Tony Stewart Sunnyskyguy EE75 Jan 2 '17 at 0:39
• Would it seem like the 15kohm resistor and the .01uf capacitor connected between "Set" and ground would likely be to blame? Should they be holding Set lower? How low does Set have to be to be considered "low state" by the 4013 (e.g. what if it was -4V, -6V or -7V)? – soupertime Jan 2 '17 at 1:15
• Perhaps unused set, clock, and data (3, 5 and 6) should be tied to Vss (-10V)? It's not in the original design but I know it's best practice. – soupertime Jan 2 '17 at 1:36
• 0.5V/div x 4 div = 2V x10:1=-20V not -10V ?? – Tony Stewart Sunnyskyguy EE75 Jan 2 '17 at 15:53
• The schematic shows only one input of the unused F/F terminated, but is this the actual circuit? Trace the wiring to all 4013 pins to make sure (floating inputs at 10V are bad news, but if that part of the circuit is wrong then perhaps some others parts are too!). What was the horizontal scale on the scope, and did you use a x10 probe? – Bruce Abbott Jan 2 '17 at 18:17

I know this thread has gone dormant, but I thought it would be a good idea to post anyways in the event that it would be useful to someone working on an old Roland synth with 4013-based issues.

Specifically, I've been working the internal arpeggiator clock on the key-assigner board of a Roland Jupiter-4 (the Jupiter-4 was released the same year as the RS-09). The circuit in question is below:

Initially, it would appear that, with the Set line (pin 6) of the first flip-flop tied high, there would be no way that the 1Q (pin 1) would be anything other than high, so that the signal at CP5 would be fixed high, decidedly not the pulse wave shown in the diagram. And this is indeed what happens if one uses in the circuit a modern CD4013 with the conventional Set/Reset behavior (i.e., when both Set and Reset are high, both Q and Q/ are high). However, it seems that not all 4013s behave this way.

To wit, later in the Jupiter-4 service manual, Roland specifies that Toshiba's TC4013 is to be used (specifically, the TC4013BP, according to the bill of materials):

Even later in the service manual, Roland provides the pin-out and truth table for the TC4013, and, lo and behold, the TC4013 uses a Set/Reset functionality that differs from the conventional CD4013. Specifically, the TC4013 behaves such that, when both Set and Reset are high, Q is low and Q/ is high; that is, Reset takes precedence over Set, as this table from the service manual indicates:

It is this odd Set/Reset behavior that is critical to producing the pulse wave at CP5 in the Jupiter-4 circuit above. I believe that 4013-based problems in Roland synths of this era - like the RS-09 in this thread as well as the "compatibility" problems identified elsewhere for the SH-101 - probably stem from this divergence from the conventional CD4013 Set/Reset behavior. Roland apparently made the dubious design decision to rely on what the chip manufacturers probably thought of as a "disallowed" Set/Reset configuration...

In any event, Toshiba still makes the TC4013BP in a 14-pin DIP package, but it appears from the current datasheet that Toshiba has adopted the conventional CD4013 Set/Reset behavior, without changing the part suffix. I cannot find any documentation for when this change occurred, but, judging from datasheets I've seen on the web, it appears that this change in behavior was implemented sometime prior to the late 1990s. This means that, while older TC4013s might be available on, say, eBay, I don't know how you would know if they would be old enough to predate this change in functionality. You would probably need to test the chip out on a breadboard - tying the Set and Reset lines high and seeing how the Q output reacts - to be able to determine whether an old TC4013BP is usable in a Roland synth. And, as far as I know, no modern 4013 chips exhibit this odd Set/Reset behavior required by Roland synths of this era.

Anyways, I hope this helps better understand what's going on with your RS-09...!

• There is no shame in necromancy here :) Great first post, and welcome to EE.SE! – ThreePhaseEel Aug 28 '19 at 1:09

Here's a simulation of how it should work. Explanation below.

Note that IC204, the TC4013BP master clock divider, is known to fail on the Roland RS-09. Here's a recording during which it failed.

If careful resoldering of IC204 with flux (to ensure it's not just a cold solder joint) doesn't fix the issue you can get a replacement IC here.

The RESET pin of IC204 is pulled up via resistor R215 and driven from the clock line through diode D205.

When the clock goes low, diode D205 conducts and pulls RESET low. When the clock goes high, the diode stops conducting and R215 slowly charges up the capacitance of the RESET pin. After a while the voltage on RESET reaches the logic high threshold voltage and the Q output is reset. The ouput remains low until the next rising clock edge. The net effect is that the output toggles at the same frequency as the clock.

When the Octave-Down switch is closed, RESET is held low via diode D206. With RESET low, the output toggles at half the clock frequency because the $\overline Q$ output is tied to the D-input.

• That's a very expensive CD4013 compared to most places. – Andrew Morton Apr 13 '17 at 21:26
• The point is really that a sythesizer spare parts vendor is stocking the '4013 as a replacement part for the RS-09. They will confirm that it's a popular item :) – neonzeon Apr 13 '17 at 22:34
• I should have mentioned that even before I posted my question originally I had already replaced the 4013, at first with a new one and then also for a second time after sourcing an NOS 1980s Harris one, just in case the very slight differences between modern and older CMOS ICs might make a difference in this application. Neither affected the circuit's behavior. Still haven't figured this out. – soupertime Sep 5 '17 at 23:56
• @soupertime take a careful look at the capacitor voltage in the simulation. You should see a similar waveform on your 'scope. – neonzeon Sep 6 '17 at 21:48
• @soupertime As you can see from the simulation, the waveforms you captured on your 'scope are as expected. Specifically, the Q¯ ouput toggles at the clock frequency when Reset is not held down by the Octave-Down switch. Could you also show the Q ouput (Pin 13) on the o'scope with the switch open? – neonzeon Sep 6 '17 at 22:47

OK, I'm not sure if this counts as an "answer" because I don't feel like I understand why this happened, but I solved my synthesizer's problem at least.

I finally got the RS-09 in question to work by replacing the 4013 with one I pulled from another RS-09 (I'll call it RS-09-2 for the sake of this explanation). When I put a new 4013 in RS-09-2, it ALSO didn't work. By switching them back (and back again) and putting another brand new 4013 in each just in case the first one I tested with was bad, I confirmed that both RS-09s will only work with a very old CD4013 in them. I would assume all RS-09s are this way. I've seen this happen one other time, where a circuit designed in the 1980s won't work with a new CMOS IC. In neither case was there anything about the circuit that offered an explanation as to why. Looking at the schematic in 2017 or 1982, a person would have the same reaction: Yes, that should work. But if you put in a CMOS IC made in 1982 it works, and if you put in a CMOS IC made in 2017, it doesn't.

I'm not really happy with the outcome because the question of "Why?!" still remains, but there it is.

I'd like to offer my thanks to everyone who tried to help me figure this out!