DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: Kevin Mitchell on December 10, 2019, 09:55:12 AM

Title: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on December 10, 2019, 09:55:12 AM
This thread is for progressive experimentation and eventually an all-in-one BBD tester (for MN3XXX type BBDs). I'm mostly thinking out loud and hoping for some feedback from the folks to actually know what they are doing  :icon_lol:

After reviewing one of Armdnrdy's old schematics from when he was hashing out his own BBD tester I've concluded that it can be done very easily with just a microcontroller and a clock source.

For the first trial I'll use a V3102 clock and a mix of MN3204, V3207 & V3205 BBDs.
Here's the waveform the BBD is expecting from the clock (will verify with an oscilloscope)
(https://i.postimg.cc/GhQ3kFkG/bbd-clock.png)

We should be able to use one of those pulses and read them as a logic high/low signal. Each time it goes high, we add +1 to a counter.

So here would be the steps...

Start test
-MCU sends 5v DC signal to BBD
-Start counting each clock pulse

-Wait for signal to reappear...

-Freeze counter when signal appears at BBD output
End test

This will show BBD stages - plus or minus one I presume
And also verify that it is passing signal

Once I get this going on an arduino I'll have to work out the clock so it can be used universally with all common type BBDs that run off +9v and -15v. Perhaps the v3102 can handle this but the max VDD rating is 12v. Maybe that'll be enough for the MN300X or maybe I can push it a few volts higher.

Here's how I'll likely set up the zif socket. The power requirements for this method is a bit crazy - but ultimately it's more cost effective than using more than one zif socket - and we can run it off the standard 9v and a couple LT1054 ICs.
(https://i.postimg.cc/QCttCStX/ZIF-BBD.png)


Be back tonight with a breadboard video.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: DrAlx on December 10, 2019, 11:46:26 AM
320x series can run off 5V supply.  An Arduino runs off 5V.
Can't you drop the 3102 and just generate the clock signals as well as the I/O "data" for the BBD using an Arduino.  You would need to make sure that the clock pulses have an appropriate dead band (i.e. that they are not both high at the same time).
Could just boil down to a programming exercise.

Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on December 10, 2019, 11:57:40 AM
All very true! But the clock and VDD voltages would vary between the 320X and 300X type - the 300X is looking for -15v clock signals while the 320X is looking for +5. So I figured it would be best to keep the clock separate so I can switch between these requirements.

+9v VDD was appealing as it's easier to work with considering my method of power switching while using a single zif socket - see the diagram I've posted.

EDIT - I'm a little concerned about the V3205 having a max VDD rating of +8 while all the other coolaudio BBDs are +10v. So I may turn that +9V into +7.5V. This should also eliminate the need for a 15V regulator for the MN300X supply.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: PRR on December 10, 2019, 01:53:27 PM
> 300X is looking for -15v clock signals

AFAIK, the high voltage is needed for high clock rates and good S/N. If you are slow-clocking and don't look at hiss, they should all run with 8V power and clock.

And of course + and - come from the ancestral use as digital memory and the conventions of N or P technology. They can all be run with + hot, - common with appropriate re-labeling of pins and signals.
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Scruffie on December 10, 2019, 02:18:13 PM
That's the second time I've read about the v3205 having a max voltage rating of +8V in recent memory, I don't know where it's originated but they're no different than the other 320X series and have a terminal voltage rating of +11V.

The MN300X series will run off +5V as well, as Paul says, just not something you'd do in practice.
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on December 10, 2019, 02:45:08 PM
Quote from: Scruffie on December 10, 2019, 02:18:13 PM
That's the second time I've read about the v3205 having a max voltage rating of +8V in recent memory, I don't know where it's originated but they're no different than the other 320X series and have a terminal voltage rating of +11V.
I'm just noticing one coolaudio datasheet says 8 volts and another says 9.

Didn't think the MN300X type would run at low voltages since the min/max rating is -/+ 1V from -15V. But if I can find any form of the signal exiting the BBD then that's enough to work in this application - proving it's not a dead or counterfeit BBD.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Scruffie on December 10, 2019, 02:56:27 PM
You're quite right, I'd not spotted that, but if you go down to the "Absolute Maximum Ratings" table, it says 11V. They do run optimally at about 8V so perhaps that's why.

Noise and distortion will be high, gain will be low but it should pass a signal. If it turns out to be too fussy for your needs though, +9V will be fine for everything.
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on December 11, 2019, 10:28:31 AM
Last night I set up the breadboard and tested a couple of BBDs with an LED at the input and output - so one can visually see the delay happening. So far so good!

The mcu is reading the clock signals but I haven't finished the code to prove it's accuracy yet. I should have time to finish it up tonight. Waiting for my zif sockets and LED display to arrive then I'll draw up the board and see about getting a few fabricated. It's defiantly a neat project if you want a quick way to verify these BBDs.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on December 23, 2019, 08:49:39 AM
Was having trouble getting the output of the BBD to appear as a logic high. I have a few ideas in mind on how to get around this. Just need time.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: ElectricDruid on December 29, 2019, 03:42:48 PM
Quote from: Kevin Mitchell on December 23, 2019, 08:49:39 AM
Was having trouble getting the output of the BBD to appear as a logic high. I have a few ideas in mind on how to get around this. Just need time.

-KM

Does the Arduino chip have any on-board comparators? I've had success on PICs using internal comparators for stuff like that (autotuning of 3340 VCOs, for example). I'm not so familiar with the AVR chips, although I imagine they offer similar features.

Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 15, 2020, 12:08:20 PM
Sorry I let this one get away from me. Yes, Tom. There are comparators with the Arduino.

I have a load of devices coming in soon so I'm going to try and get this one fully functional by the weekend.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: FiveseveN on April 15, 2020, 04:53:45 PM
Looks like the threshold for input HIGH is 2.6V according to this experiment: https://www.radishlogic.com/arduino/arduino-uno-schmitt-trigger-voltage-levels/
Might as well use the ADC inputs to characterize the signal even further. Apparently "the ADC is rated up to 1 MHz", I'm sure there's useful resolution in the range you're interested in.
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 16, 2020, 12:03:01 AM
I am using the analog inputs. At least now I am  :icon_lol: Started from scratch today. Just working out a few small things.

It would be easier if I use the micro as a clock source as well. Going to try to work that out.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: ElectricDruid on April 16, 2020, 05:04:18 PM
Quote from: Kevin Mitchell on April 16, 2020, 12:03:01 AM
It would be easier if I use the micro as a clock source as well. Going to try to work that out.

*Far* easier to clock the BBD with the micro and then all you have to do is count the clock pulses and spot when your input signal appears at the output. Since you don't care about exactly how long the delay is, but instead only how many stages it is, you only really need some peripheral (anything!) that can produce a square wave

Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 17, 2020, 12:23:01 PM
Yup!

Right now I have the Arduino providing 2 pulses, one inverted, 50% duty cycle at 10kHz. Just need to play with the code to add a monitoring pin without interrupting the clock. Shouldn't be too hard.

(https://i.postimg.cc/k2rtSJwn/clock-examp.png) (https://postimg.cc/k2rtSJwn)

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 21, 2020, 12:07:12 PM
Eyyy I'm almost there. Polishing it up, adding a 4 digit display and a clock speed pot.
I've worked out what I believe is the best way to go about switching connections for different devices. So far it seems to be good to test 15 different BBDs! Sadly it requires 3 switches - a 2P2T, 3P2T and 1P2T.
(https://i.postimg.cc/Z5868Q0b/BBD-CONVERSION.png)


Feel free to post some suggestions if you have any!
-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 22, 2020, 10:28:13 AM
Alright, guys. Before I go on showing my breadboard progress, any ideas why I'm having trouble with the MN300X devices? Simply swapping the power pins does not work for these in my circuit. I'll hit the datasheets again to see what could be the problem.

On the plus side, the program is working fairly well for the low voltage devices. I have to tighten things up to get an absolute stage count but it's very close. This is due to the input pulse being on longer than it needs to be (my programming skills are rusty as well as not so great to begin with  :icon_lol: Trial and error.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Scruffie on April 22, 2020, 10:58:00 AM
The source follower resistor, has to switch with the power & ground.
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: ElectricDruid on April 22, 2020, 01:33:42 PM
What no MN3011?!?  :P

Looks good so far, Kevin. Dealing with all those different pinouts looks like a nightmare. I'm not surprised it took all those switches.
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 22, 2020, 02:19:34 PM
Actually I have a MN3011 on the way. Could add it by adding another ziff and replacing the read out toggle with a 6 throw rotary. Yeah I've thought about it  :P
The alternative would be to use a few zif sockets instead of just one. That would eliminate the switches. But where the fun in that?

Scruffie - good catch! I might have to adjust the comparitor after the change. I'll scope the output to see if it's actually spitting out signals. Should have done that in the first place  ::)

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 22, 2020, 06:54:52 PM
Not getting anything with 3004, 3007 and 3005. I'm wondering if 5v isn't enough.
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: ElectricDruid on April 23, 2020, 04:18:50 PM
The datasheet I've got doesn't seem to make itself very clear on this point.

The "Operating conditions" section suggests a minimum of -14V for Vdd and a maximum of -16V, which is a way of saying "-15V or nothing". But we know the chip *works* outside that range.

Most of the graphs further on in the datasheet seem to plot lines lines down to 5V, but *that is where they stop*.

So, on balance, I think 5V is absolutely borderline for these chips. But I'm reading between the lines of what it doesn't say in the datasheet and then extrapolating from  that!
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 25, 2020, 01:02:02 PM
We're in business, boys  8)

The -15v devices aren't up to running on -5v. -9 volts is fine. I also had to tweek the input bias so each device works OKAY. That one slipped my mind as the MN320X devices don't seem to be as picky - probably because they're operating closer to their nominal voltage.

Just verified my MN3010 chips are the real deal.

I'm only left to pretty up the code, layout a PCB and get some made. I'll check interest and share progress throughout this weekend.

Thanks for sharing your wisdom, guys. Progress would be far slower without your guidance - always learning.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 26, 2020, 12:42:12 PM
Here's the schematic so far. Trying to work out a better way to switch between MN3X10 and the larger package singles (3205, 3008). Now factoring in VGG switching my previous plan for a 3P2T will not do. So for now I've included a 2nd socket.

(https://i.postimg.cc/k2GbL912/TESTER-SCHEM.png) (https://postimg.cc/k2GbL912)

I'll show a video of the breadboard later.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 26, 2020, 07:30:12 PM
PCB progress;
(https://i.postimg.cc/Px9222C1/tester-preview.png)

Instead of switches I've decided to see what a patch matrix would look like. This would be less stress on the PCB and make my life easier. I've also added 4 LEDs that should signal what the matrix is set to for testing.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on April 29, 2020, 12:15:45 PM
Some images to show what's going on with the power switching and bias level.
(https://i.postimg.cc/PCL15kN8/bias-chart.png) (https://postimg.cc/PCL15kN8)

(https://i.postimg.cc/c6jSzrr3/circuit-20200429-1208.png) (https://postimg.cc/c6jSzrr3)

(https://i.postimg.cc/rzzTgSFc/circuit-20200429-1208-1.png) (https://postimg.cc/rzzTgSFc)

Delayed on the video because I'm trying to tighten the program up enough to get a more definite stage count. Playing with my code a 1024 stage BBD shows around 1058 stages or so. Not a hard fix I'm just rusty and relearning c++ :icon_lol:

I know the bias doesn't look right but it's working like a charm for all my functional devices. I will add a trimpot for clock speed and bias level just to have it.

This will be my first project I'm not etching myself and also my first design with SMD. Much fun  8)

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: peterveneno on May 10, 2020, 10:46:21 AM
Hi Kevin,

Very intereting project and nice work you have done here so far.
I have an idea for your project that may help to reduce or eliminate the use of a switch to swap between the different BBD chips. This is only theorical and I am wondering if there is a way you can "scan" the pins of the chips placed through the Analog port of the microcontroller. I think this may be done using a multiplexor or and digitally controller analog switch IC. As I said this is only a theorical thought, maybe is impractical to do it, so let me know your impresions.
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on May 10, 2020, 11:13:34 AM
Hey thanks for the suggestion! Was just about to update this thread.

Before I go lighting any cigars I've decided to dig even deeper into the rabbit hole just to be sure everything is BBD friendly and accurate. I now have the microcontroller's pseudo clock signal going to a CD4049 that shares the BBD's power supply. So now the clock matches the BBDs supply voltage, 0-9v instead of 0-5v.

Regarding the switching - with some serious thought one could possibly automate it. But that may not be safe for the devices and is way too much work for me to consider  :P
But I have updated the switching to be done with a single button and a couple CD4053 chips! The 4 digit display will show what devices are set to be tested. Each button press will shift to the next option.

I've gone back through armdnrdy's work to consider what problems he has stumbled on and I'm finding myself in the same situation. As the BBDs have varying bias levels the output levels would change as well. This is a problem for the comparator as it's set up to check for a small voltage threshold. Instead of sending a high pulse signal to the BBDs I'm going to try to send a 40khz sine wave through it and then rectify the BBDs output and see what I can work with.

I'll be happy with it soon enough.

-KM
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on June 13, 2022, 09:43:00 AM
Hey everyone!
I blew the dust off of this for further development.

Writing code from scratch with a better perspective I'm getting better results with this circuit though still showing above the expected stage count, it is within the ballpark (MN3207 & MN3007 shows ~1060, MN3209 shows ~ 270, MN3204 shows ~580).

(https://i.postimg.cc/SnzhrDQV/Nano-BBD-Tester.png) (https://postimg.cc/SnzhrDQV)

I've got a steady 20kHz clock signal and tested many devices at the arduino's ~5v supply, relaying stage counts through the serial monitor.

For a more safe & user friendly version I'm going to do a proto PCB and further develop the code as I believe the circuit is good - though I may add in the appropriate power supplies (+9v & +15v with flipped polarity on the BBDs) instead of just flipping the 5v polarity.

Random-ish question, any good relays to recommend for swapping these power supply signals? Considering this as an alternative to toggles. Perhaps I could use simple logic switching with a chip or transistors for adequate current sinking abilities to power the BBDs.

I'll be back later! Putting a PCB order in soon so I don't kill any more BBDs on breadboard (RIP MN3007 tested as MN3207).

EDIT:
Forgot to mention how I got around my previous issue with a comparator. Instead of using a comparator I've set up the code to set the BBD's input low, pulse 5000 times, set the input HIGH and count how many clock clicks it takes before the output goes HIGH. So I'm using a single ADC pin to measure the output before the test when the input is low and waiting for a change within a threshold (a programable comparator using stored values - if you will).
This simplicity also means I can move the project onto an ATTINY85 for a standalone tester!
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: aviherman5 on June 16, 2022, 03:58:34 AM
Very cool! Please keep us updated! I'm a big fan of analog switch IC's.

Take a look at https://www.mouser.com/c/semiconductors/switch-ics/analog-switch-ics/ and sort for what exactly you need. They're typically really easy to use as I've had good luck with them in the past.

Do you, by any chance, have an idea if you're making this project open source?

Thanks!
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on June 16, 2022, 08:26:41 AM
Quote from: aviherman5 on June 16, 2022, 03:58:34 AM
Do you, by any chance, have an idea if you're making this project open source?
The final schematic and code will be public but my fabrication files will be private. So if anyone would like to put it on vero or bread board the code will likely need some slight tweaks to accommodate your wiring.
When I have PCBs and a final V1.0 of the code I will have PCBs,  pre-programmed chips & 14-pin ziff sockets available for purchase or trade.

Right now I'm bread boarding the *full* version of the circuit using an attiny85 & a couple shift registers to expand the outputs - mostly to drive 4 7-segment displays.
Ironing things out & writing the 16-bit lookup tables for the registers (which will change after I do the PCB routing). Much fun!

I've decided the polarity switching is best done with an on-off-on slide switch. I wanted something low profile and simple. Relays are still outside of my comfort zone and drives the build cost up needlessly.
I'm always overcomplicating things  :icon_lol:
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on June 16, 2022, 08:50:53 AM
Quote from: aviherman5 on June 16, 2022, 03:58:34 AM
Take a look at https://www.mouser.com/c/semiconductors/switch-ics/analog-switch-ics/ and sort for what exactly you need. They're typically really easy to use as I've had good luck with them in the past.
Thanks for the suggestion!
I've tried analog switching ICs before for this project (the CD4053) but wasn't able to power the BBDs and would require more work or specialized ICs. Those are designed for small signals and not power supplies - even though it would be relatively low current it still wasn't up to the task. I'm too lazy to *make something work* when there's more appropriate alternatives.
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on June 22, 2022, 11:28:11 AM
Still at it and hoping to light some cigars tonight!
I've successfully moved the standalone version of this project over to an ATTINY85 & two shift registers in series to drive 4 segment displays. I've got a few more lines to write but I'm exited to see what it yields later today.

For the passed year I've been dramatically improving my C++ skills. What this means is I've been converting my code to no longer use the basic arduino marcros and begun to get familiar with register & port manipulation routines to speed things up. I also finally took the plunge to learn how interrupts work which is totally needed for this project.

So there will be two versions of this project. One will be open source where you can use an Uno or Nano & accompanied breadboarded circuit without having to modify the code. The stage count will simply be displayed on the serial monitor.
The other will be the standalone ATTINY BBD Tester and will have it's own PCB and proprietary code.

Since this thread was for the development of this design I will start a new one once there is a final product to share. There I will include a writeup for details of the open source project as well as progress of the standalone PCB.
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: aviherman5 on June 22, 2022, 12:00:44 PM
This is so very cool! I've always had a thing for making really cool and proprietary test tools and this is the ultimate one! Thank you for deciding to make it open source!
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: cabintech on June 25, 2022, 08:56:53 AM
Some faults we have been seeing lately in MN3207 devices is what appears to be a VDD to GND short. As soon as power is applied they get hot and if you don't current limit the power supply things start smoking :-)

You might want to consider this in your design if such a device is plugged in for testing...
Title: Re: A super simple BBD tester concept - displaying stage counts
Post by: Kevin Mitchell on June 27, 2022, 09:13:28 AM
Quote from: cabintech on June 25, 2022, 08:56:53 AM
Some faults we have been seeing lately in MN3207 devices is what appears to be a VDD to GND short. As soon as power is applied they get hot and if you don't current limit the power supply things start smoking :-)

You might want to consider this in your design if such a device is plugged in for testing...
This is definitely something I had considered. One feature for my full version was means to detect shorts or reverse polarity so it automatically shuts down to prevent further damaging anything.

Also, I'm honored that my one-stop-shop for synth chips chimed in on this. You folks are great!


Onto an update, no cigars just yet. I believe the extra processing required for the analog read function (even in free running mode) is causing the displayed stage counts to be slightly above what it should be - in hand with the use of an uninterrupted clock while everything else also happens.

So I moved to using the pin change interrupt. What this also means is I can no longer use the window of the BBD's output straight into the arduino (or through a divider for 9-volt on the BBD). I had included an external comparator to get around this.

Before anyone calls me out - the integrated analog comparator (along with comparator interrupts) in the atmel chip was an afterthought even though Electric Druid suggested it a long time ago!! So now I'm in the process of implementing the function internally. Now with a comparator this also means we have a moving target of different BBD's output results. So I have to include a routine for the user to set the comparator threshold via a potentiometer before each test. The plus side of this approach is you can see if a BBD is passing signal before performing the stage counter test.

Things are slowly improving as I hash it all out. Since I'm using port manipulation commands from the datasheet I've been including notes and chapter references for every line so others can adapt the code however they please.
With the use of port manipulation, my open source code as-is will ONLY work with ATmega328P boards.

More development coming soon!