cgs programmer question

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, luketeaford, Joe.

Post Reply
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

cgs programmer question

Post by ketem13 »

Few month ago I build a 4 step cgs programmer .
as I am approach to build another one I discover a mistake of mine in the first I have build:

Instead of connecting the 1k resistor to +vcc after the 10k as in the schematics, I accidentally connected that 1k resistor before the 10k resistor (right after the opamp output).
the programmer was function great with no noticeable faulty even the fact my connection was wrong. How come my mistake was not changing the behavior of the circuit? or it did in a way I couldn't see/hear?
Should I dismantlement my previus build and change that mistake or I can leave it as it is?
Screen Shot 2022-01-07 at 13.57.17.png
Another question I have for my next build:
Can I replace the 820R resistor marked in red with 1k resistor? If doing so - shall I also change the 680R resistor to ground to some other value or I can leave the value as it is?
Screen Shot 2022-01-07 at 14.02.37.png
pjbulls
Wiggling with Experience
Posts: 425
Joined: Tue Feb 04, 2020 5:26 pm
Contact:

Re: cgs programmer question

Post by pjbulls »

Your mistaken wiring won't affect the functioning of the circuit, it'll still function as a pull-up just fine. The reason why you'd do it the other way is that now you'll be sinking current into the op-amp through that 1K resistor and not through the 11K that'd normally be there, so your current consumption is about 10-fold higher. We're talking about a few mA (per resistor) so it's not something I'd rip apart the build over.

You can replace the 820R resistor with a 1K, if you want to preserve the exact voltage divider there the bottom leg should ironically be ~820 ohms instead of 680. If you keep that as a 680 and only increase the top leg to 1K your module will output ~4.85V instead of ~5.45V disregarding any other loads, depending on what you're plugging it into that may or may not matter. In most cases it probably won't, I tend to consider a diode drop (~0.7V) enough of a trigger/gate threshold.
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

pjbulls wrote: Fri Jan 07, 2022 11:51 am Your mistaken wiring won't affect the functioning of the circuit, it'll still function as a pull-up just fine. The reason why you'd do it the other way is that now you'll be sinking current into the op-amp through that 1K resistor and not through the 11K that'd normally be there, so your current consumption is about 10-fold higher. We're talking about a few mA (per resistor) so it's not something I'd rip apart the build over.
Thanks for you answer.
pjbulls wrote: Fri Jan 07, 2022 11:51 am
You can replace the 820R resistor with a 1K, if you want to preserve the exact voltage divider there the bottom leg should ironically be ~820 ohms instead of 680. If you keep that as a 680 and only increase the top leg to 1K your module will output ~4.85V instead of ~5.45V disregarding any other loads, depending on what you're plugging it into that may or may not matter. In most cases it probably won't, I tend to consider a diode drop (~0.7V) enough of a trigger/gate threshold.

So basiclly that voltage divider will determine the pulse output voltage? In that case I guess that I should be fine with two 1k resistor and will have ~6V at the output ?
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

It probably will be over my understanding but I am trying to understand some of the flow or function of different stages in that circuit.

Assuming the push button at stage 1 is pressed: a +6V~ is flowing from point b (10k voltage divider) through the diode D1. That voltage is at the base of Q4 allowing a current to flow from the +Vcc through the 150k resistor to point "C" (what is the function of that transistor configuration at point c?) . The same current that flow through the 150k resistor is also at the base of Q3 and allow the voltage at Q3 Emitter to flow to the emitter both to send a pulse out of that stage lighting the LED) and also to the Row's out of that stage?
the same voltage at the Q3 collector is converting to a trigger via the 10nf capacitor (marked c1) going through D3 to the circuit of transistors Q7 and Q8 ? what is the point of the 100k resistor to ground (marked R1)
am I kind of seeing it right?

I think that I can look at some opamp configuration and know to some degree if it is a voltage follower, inverting or non inverting configuration or comparator configuration but I can't really see yet a forms of transistors configurations. Can someone explain the different function of those transistors configuration? (Q1 to Q9)
PXL_20220107_173411231.jpg
User avatar
guest
Super Deluxe Wiggler
Posts: 7119
Joined: Mon Aug 19, 2013 11:49 am

Re: cgs programmer question

Post by guest »

the 100k is there to discharge the cap so another pulse can happen in the future. otherwise whatever charge was placed on the cap would stay there permanently, and no new charges could enter.

this is a tricky circuit, and i would say the transistor configurations, although not novel, are not the ones you typically see. Q7-9 are the exception here. Q7,8 are both just inverting switches (or you can think of them as saturated common emitter amplifiers). so these just buffer those pulses coming from the diodes. a little input current allows a lot of out output current.

Q9 is a current source. its set up as an emitter follower (so the emitter voltage is just 0.6V below the base voltage, -4V here), and then there is just a resistor at the emitter. since all of these parts are fixed, the current through that emitter resistor is fixed, and therefore the current sourced from the collector is fixed.

Q3-6 are set up as latches (or you can think of them as weak SCRs, triacs, thyristers, etc). Q4 turning on, pulls current through Q3, which drives more current into Q4, and the whole thing latches on. once current is removed from Q4, it latches off until the next time. Q5,6 are similar, but there is a capacitor between the latching elements, so it only latches for a fixed amount of time. this is used to make a fixed pulse width, regardless of input pulse width (switch debounce in this case).

Q1,2 are also just inverting switches. the trick here, is that they can only supply current when their emitters have a positive voltage on them. you can see that the emitters are fed via a resistor, diode, and capacitor by their own latches. so if their latch is high, then they are enabled. if their latch is not high, then they are not enabled (unless a bit of charge is still on the cap). so pulses to the bases cause current to flow to the next latch in the sequence. they all get pulses, but only the latch that is on can do anything, and that latch Q1,2 are going to the next latch (well, one goes to the next latch, the other to the previous latch, depending upon the direction you are going). the next latch then turns on, arms its Q1,2, and the process can continue.

so, how does only one latch stay on at a time? in theory there is a state where they all can be on, but its very stable, and once one latch gets a bit more current than the others, it will saturate and shut the others off. all of the emitters of the latch Q4s are tied together. once one of the emitters goes high when that latch is on, it reverse biases all of the other latch emitters, so they go off. this gets over-ridden by the Q1,2 pulse which goes to 12V, pulling the new latch higher than the steady state level of 3V that is usually on Q4.
openmusiclabs.com
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

Thanks for your detailed replay!
guest wrote: Fri Jan 07, 2022 5:53 pm Q9 is a current source. its set up as an emitter follower (so the emitter voltage is just 0.6V below the base voltage, -4V here), and then there is just a resistor at the emitter. since all of these parts are fixed, the current through that emitter resistor is fixed, and therefore the current sourced from the collector is fixed.
I'm not sure I got it right. Q9 function is to give a path for the current to flow through the emitter of Q4 whenever the base of Q4 is high? the current can flow only through the collector to the emitter and not the other way around isn't it?



Regarding the output named "APO All Event Pulse"
Each stage pulse out is outputting 4.35V when the stage is active and the common pulse out are outputting around 3.45V as long a button is pressed.
The APO out will output only a trigger and not a pulse because of the capacitor at Q3 collector? if that so the trigger will be at is HIGH stage inly for a fraction of time regardless the a stage is active (by pressing a button or external gate)

edit: I also measure the output from the Row out and each pot is outputting a voltage between 0V and 5.35V. I I wanted to have a voltage that is double the voltage I have now 0V to 10.6V~ I need to either reduced R1 to 100k or to increase R2 to 220k ?
Screen Shot 2022-01-08 at 10.33.37.png
User avatar
guest
Super Deluxe Wiggler
Posts: 7119
Joined: Mon Aug 19, 2013 11:49 am

Re: cgs programmer question

Post by guest »

ketem13 wrote: Sat Jan 08, 2022 3:29 am I'm not sure I got it right. Q9 function is to give a path for the current to flow through the emitter of Q4 whenever the base of Q4 is high? the current can flow only through the collector to the emitter and not the other way around isn't it?
yes, thats correct. the emitter of Q9 is at -8V or so, so there is plenty of headroom there.
Regarding the output named "APO All Event Pulse"
Each stage pulse out is outputting 4.35V when the stage is active and the common pulse out are outputting around 3.45V as long a button is pressed.
The APO out will output only a trigger and not a pulse because of the capacitor at Q3 collector? if that so the trigger will be at is HIGH stage inly for a fraction of time regardless the a stage is active (by pressing a button or external gate)

edit: I also measure the output from the Row out and each pot is outputting a voltage between 0V and 5.35V. I I wanted to have a voltage that is double the voltage I have now 0V to 10.6V~ I need to either reduced R1 to 100k or to increase R2 to 220k ?
yes, the cap at Q3 makes APO just a pulse. and chaging R1 or R2 as described will double the output voltage. the opamps might saturate at 10V or so, though.
openmusiclabs.com
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

guest wrote: Sat Jan 08, 2022 2:41 pm yes, the cap at Q3 makes APO just a pulse. and chaging R1 or R2 as described will double the output voltage. the opamps might saturate at 10V or so, though.
When you said a pulse - it can also considering a trigger? an HIGH level signal only for a brief moment of time? as below:
PXL_20220109_080653643.jpg
User avatar
guest
Super Deluxe Wiggler
Posts: 7119
Joined: Mon Aug 19, 2013 11:49 am

Re: cgs programmer question

Post by guest »

yes, a trigger is pulse.
openmusiclabs.com
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

guest wrote: Sat Jan 08, 2022 2:41 pm
ketem13 wrote: Sat Jan 08, 2022 3:29 am I'm not sure I got it right. Q9 function is to give a path for the current to flow through the emitter of Q4 whenever the base of Q4 is high? the current can flow only through the collector to the emitter and not the other way around isn't it?
yes, thats correct. the emitter of Q9 is at -8V or so, so there is plenty of headroom there.
Why it is not enough to just connect the emitter of Q4 to ground? why is needed a path via the Q9 configuration?
User avatar
guest
Super Deluxe Wiggler
Posts: 7119
Joined: Mon Aug 19, 2013 11:49 am

Re: cgs programmer question

Post by guest »

the Q9 configuration allows the emitter of Q4 (and all the other emitters) to be able to move - so they can be raised above the base voltage of whichever one is on. if all of the emitters were at a fixed voltage, then when the new one tried to come on, the old one wouldnt turn off, it would just stay on, because its emitter wouldnt be lifted above its base voltage. it would just stay at ground.
openmusiclabs.com
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

Another thing I try to understand:
Screen Shot 2022-01-12 at 21.11.35.png
When the push button(point b) is pressed 6V are flowing into the base of Q4 and open a path between Q4 collector and emitter. Because that path is open - a current can flow through R1 to Q4 collector and also into Q3 base that in turn will open the path to current to flow from the emitter of Q3 back to Q4 base via R2? - it seems like a feedback loop between Q3 and Q4 isn't it? the same current from Q3 emitter is also flowing to node A to the potentiometers and also via D1 and R3 to the emitters of Q1 and Q2 that stays close until a clock from the up or down input will open their base, right? what is the function of R3 (1M resistor) and what is the function of C1(470pf cap)
R1 and R2 are current limiting resistors? their value is critical?

(I know, many questions :bang: )
User avatar
guest
Super Deluxe Wiggler
Posts: 7119
Joined: Mon Aug 19, 2013 11:49 am

Re: cgs programmer question

Post by guest »

correct, Q3,4 feedback into each other, latching them into the ON state. R1,2 are there to limit current flow. R2 also helps set the steady state ON voltage at Q4 base - this becomes the OFF threshold that has to be overcome to turn Q4 off. R3 and C1 are part of the circuit that allows the ON pulse to be passed to the next transistor in the chain. R3 limits the current, and C1 ensures that the charge continues to get passed to the next stage for a short bit of time after the first stage gets turned OFF. it ensures that the circuit doesnt cycle back and forth, as it prevents a middle state from happening where they might both be ON.
openmusiclabs.com
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

Thanks!
Got some extra thoughts/questions -
R6 is a pull-down resistor to keep the voltage at the external pulse input LOW when nothing is patched?
R5 is a path to the electrons to ground build on C2 whenever is discharging? C2 is also converting a gate signal to pulse/trigger signal? What the value of C2 is determine? the trigger ON time?
D2 preventing positive current to flow back to the external pulse?
what is the function of R4? is it forming a voltage divider together with R2 ?
Screen Shot 2022-01-12 at 21.11.35.png
User avatar
guest
Super Deluxe Wiggler
Posts: 7119
Joined: Mon Aug 19, 2013 11:49 am

Re: cgs programmer question

Post by guest »

yes, thats all correct. C4 and R5 determine pulse with via RC decay time (multiply the two together). D2 works with the diode above it to make an OR circuit, so either of those signals can trigger it, and if one is off, it doesnt hold the line low preventing the other from working. R4 holds that point to ground when OFF, and defines the threshold voltage when ON (with R2).
openmusiclabs.com
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

I try to understand the part of the circuit marked in orange more in depth -
What is the function of C3 and R7? C3 build a positive charge on its cap whenever the button is pressed and R7 is a path to discharged it? what for?

R9 and R10 forming a voltage divider at Q6 emitter putting it at +1V (?) if so, why?

R8 is limiting the current that goes to the base whenever the push button is pressed? as you said earlier those two transistor is much like Q1 and Q2, but I try and understand them more in depth.

you said earlier that C4 is acting like a de-bouncing? meaning no matter how long the button is pressed only a short amount of time Q9 will be open caused by the current passing via the collector of Q5?

R13 and R14 forming a voltage divider to reduce the CPO out from +12V to around 3.75V?
Screen Shot 2022-01-12 at 21.11.35.png
Last edited by ketem13 on Fri Jan 14, 2022 1:53 am, edited 1 time in total.
User avatar
guest
Super Deluxe Wiggler
Posts: 7119
Joined: Mon Aug 19, 2013 11:49 am

Re: cgs programmer question

Post by guest »

yes, most of that is correct. C3 holds a charge so Q6 is sure to turn on, no matter how short of a press on the button. this also keeps Q6 from going on and off repeatedly if there is some switch bouncing. this debouncing is aided by C4, which applies positive feedback and latches Q6 as soon as Q5 is turned on (for a brief period - then the latching is disabled when C4 drains). R9,10 set a threshold voltage for the turn on phase. Q6 essentiall acts as a comparator here. when its base is above its emitter, it turns on.
openmusiclabs.com
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

Thank you very much! Its all start to look much clearer for me.

At node A (Q3 collector) the voltage should be the power supply voltage, minus the diode power protection voltage drop, minus Q3 emitter to collector voltage drop?
so 12V - 0.6V - 0.6V = 10.8V ?
When I measured the pulse out I get 4.31V~ output. calculating voltage divider with the values of the 820R and 680R resistors I should have a Vs of 9.5V~ and not 10.8V. With that result I should assume that the LED I'm using have a voltage drop of 1.3V~ ? so the voltage at the LED Cathode is 10.8V (node A) ,minus LED voltage drop, right?
User avatar
guest
Super Deluxe Wiggler
Posts: 7119
Joined: Mon Aug 19, 2013 11:49 am

Re: cgs programmer question

Post by guest »

yes, thats correct.
openmusiclabs.com
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

looking at the 2N3906 datasheet -
the voltage drop of the transistor is the "Collector-Emitter Saturation Voltage" ?
Screen Shot 2022-01-14 at 9.49.42.png
User avatar
guest
Super Deluxe Wiggler
Posts: 7119
Joined: Mon Aug 19, 2013 11:49 am

Re: cgs programmer question

Post by guest »

yes, and that varies with collector current and base current.
openmusiclabs.com
User avatar
KSS
Super Deluxe Wiggler
Posts: 7627
Joined: Mon Jan 25, 2016 7:28 am

Re: cgs programmer question

Post by KSS »

Love this thread! And the others like it between you two. You are both such an asset to this forum! :tu:
Treat utility modules as stars instead of backup singers.
Treat power supplies like Rockstars instead of roadies!
Chase magic sound, not magic parts.
User avatar
guest
Super Deluxe Wiggler
Posts: 7119
Joined: Mon Aug 19, 2013 11:49 am

Re: cgs programmer question

Post by guest »

i have to say, im impressed with the amount of modules ketem13 is banging out!
openmusiclabs.com
User avatar
wackelpeter
Veteran Wiggler
Posts: 724
Joined: Fri Apr 17, 2015 5:56 pm
Location: Germany, MD

Re: cgs programmer question

Post by wackelpeter »

guest wrote: Sat Jan 15, 2022 12:24 am i have to say, im impressed with the amount of modules ketem13 is banging out!
Haha... You're not the only one. I always thought that i was doing much in my very active soldering times 2-3 years ago, but this is some next level shit that's astonishing and impressing. Also given the fact that he is doing most if not all on stripboard, which is quite time consuming and such an immense effort of work, which i can relate as i did the same. It's quite a lot more than just sticking the components into the holes and apply some solder.

You have to make every signal path, drill countless holes (beware you forgot to drill one, like i did recently on my EN129 TZVCO, which took me some hours of poking around and trying to troubleshoot and figuring out where i made a short between 0V and +15V, which i measured when i was ready with all the pots connected and IC's inserted before powering on. Scratched between all the traces with a sharp cutter knife, then cleaning with a tooth brush, inspecting with a mangnifier, until i remembered that i inbetween measured already and there it was okay and finally saw that i connected the PWM CV input on the same trace as the LM13700 positive supply, with the pot fully down, now making a cute short on that rail), make tons of connections and so on... Then also trouble shooting takes up a lot of time, as almost every time, you either connect some resistors to the wrong input of an op amp or you forget to cut the trace where it should be interrupted.

But yeah it works now, even if i have some questions or thoughts i will possibly adress in another thread.

P.S. Maybe time to add a signature to Ketem's profile in good old fashioned wild west style: The fastest soldering iron in France. :hihi:
ketem13
Super Deluxe Wiggler
Posts: 1065
Joined: Tue Jan 16, 2018 2:02 pm

Re: cgs programmer question

Post by ketem13 »

Haha thanks guys! I could do almost nothing without the endless help I got from this forum members! It is such a great place with so much knowledge.
Sometimes I think I ask too many questions but then I also think it might be helping future members having the same issues I'm facing with in my builds..So I guess it is fine.
btw @KSS I just received the book "Understanding Basic Electronics" by Arrl you were recommended in few threads in the past.
Post Reply

Return to “Music Tech DIY”