Bluetooth Express

Had an idea for a product so I did a little research (almost not enough because I initially ordered something that would not have worked) and picked out a Bluetooth module that should suit my needs.  Well after soldering it to the breakout board and hooking everything up on the breadboard, I got a blinky light and I could see it on my phone’s pairing screen but could not get it to pair.  I knew there was a utility to talk to the module via the UART interface and I had also purchased the Sparkfun FTDI Basic to take advantage of this.  Actually, I bought it to talk to the Arduino Pro Mini that I thought I needed to talk with the original Bluetooth module I almost ordered initially and then didn’t because it would not have done what I needed.  Unfortunately, the FTDI Basic changes the !RTS pin to a DTR pin in order to automatically reset the Arduino when loading sketches.  Not a big deal though because I happen to have a USB to FTDI cable that is used for talking with PIC microcontrollers.  Disaster averted.

So I hook up the Rx, Tx, !CTS, !RTS, and ground pins.  I initially had the Rx and Tx reversed because I assumed that the label on the cable meant Rx and Tx of the computer so Rx of computer goes to Tx of Bluetooth module and vice versa but alas, it was labeled for the TTL side so Rx goes to Rx and Tx to Tx.  I’ve made this mistake in the past but in reverse order.  So much for learning from the past.

I installed the KC Terminal app that is used to talk to the module and got it to recognize the TTL cable and open a virtual com port without any driver issues.  It should work with Windows out of the box (I’m using Windows 10).  Now I’m ready to see what’s going on inside the sleek little metal box.  Nothing… Can’t get anything output when the unit boots even though it should be giving me the version, status, and other info.  Nothing.  I try to throw some commands at it (AT Version, AT Status, …) and still nothing.  Obviously something is not right.  I check all the solder connections on the board, check the connections on the bread board, check power.  Nothing.

Luckily I have a handy dandy oscilloscope that I can slap on the Rx and Tx lines and see if there’s anything happening.  This should at least tell me if the module is attempting to talk and maybe I have a bad cable.  I get some noisy BS that doesn’t make much sense but definitely no TTL signals that I can readily see.  Maybe I have a bad cable.  Still, I should see SOMETHING coming out of the module that looks like TTL unless I have something wrong with the module or the wiring between the module and the TTL cable.  If the problem is the module then I should see SOMETHING coming from the computer that looks like TTL.  I see neither of those things so I feel like I have a fundamental problem with my setup.  I go ahead and reread the manuals but don’t find any clues so I go back over the whole circuit, wire by wire.  The only thing I see that might seem out of place is I don’t have the TTL cable’s power wire hooked up.  I’m powering the circuit externally so I don’t know why I would need 5V from the computer’s USB port but I figure it can’t hurt.  OF COURSE THAT’S THE PROBLEM… and I immediately see TTL signals on the Oscope and KC Terminal lights up and talks to me.  I’m disgusted but happy that the problem is behind me!  Now I can send and receive AT commands to my heart’s delight.

I still can’t get it to pair to anything though and there isn’t a word in the documentation about the pairing process or troubleshooting problems.  I’m going to get in touch with the company and see if they have anything for me.

Update: Got everything working. Didn’t change anything, just started working.  I’m not sure whether to be ecstatic or pull out my hair.  Whatever, it works.

Clipping Reverb

I’ve been working on a guitar pedal.  It’s a reverb and I’m attempting to add an overdrive stage into the reverb signal but it’s proving to be much more difficult than expected.  For some reason when the drive potentiometer gets to a certain spot it seems to bring out a pre-delay before the reverb starts and the reverb drowns out the dry signal as well.  Changing the diodes has improved the problem but more improvement is necessary.  I’ve had to reduce the drive gain so much that the diodes are clipping fully due to the voltage not getting high enough.  If I increase the gain any more, the pre-delay becomes very pronounced and too loud.  I’m hoping that I can find another diode that has a lower forward voltage so that it begins clipping earlier and gives the desired overdrive without the delay.  I haven’t been able to find a list of diodes and their corresponding forward voltages so I guess I’ll have to make one.  I’ve noticed the Germanium diodes bias much lower and they also have a softer clipping which guitar tone aficionados prefer.  I like the softer clipping because I’m not looking for hard distortion, just some edginess for the reverb.

Update:
Moving the clipping stage in front of the reverb unit and increasing the gain in front of the clipping stage seems to have given enough edge and gain for a satisfactory overdrive though the problem still arises when the drive pot is larger than about 15k Ohms.

Update:
Removed R6.  I don’t see that it is necessary if R12 is there, although every other Belton brick circuit I’ve seen leaves it in there.  Added R17 to keep the bypassed input from being sucked by the always-on output.  I didn’t have the problem with the early iterations so I considered it solved and quit using the footswitch  Now that I’ve put the switching back into the circuit there’s a massive drain.  I’ve added another capacitor from the output to ground to cut high-frequency noise that was seeping through the wet signal.  There’s still a trace of noise when I crank the gain on my amp but I’ve compared it to other reverbs (even a digital one) and I’m getting no more noise than those so I consider that solid.  Another problem has arisen, and I think it has been there but not as prominently as now.  I’m getting footswitch pop at the input.  I know it’s at the input because it echoes in the wet signal.  When I measure the input pin of the circuit while the input is bypassed, I’m getting over 2V.  On the other side of my capacitor I get just over 4V, which is approximately the expected reference voltage being fed from Vref but the cap should be blocking all DC from coming back across.  Turns out the cap was bad. Now all the DC is being blocked but still getting some switch pop that can be heard when the amp is cranked pretty hard.  Hearing it pop when switching into and out of the circuit but it’s more noticeable when switching it on because I get an echo of the noise.

 

Update:
Made more changes.  Added output buffer and removed R17.

 

Footswitch POP

I’m getting some footswitch pop on my reverb now that I have most of the other problems licked.  I’m using a “half” true-bypass to allow the reverb to trail off naturally instead of cutting off abruptly with the footswitch.  I’ve not seen much on the Google about achieving “trails” (or “tails”) with reverb or echo units.  I see where people are attempting to implement it, claim it works, then take it out because it’s not working.  Of all the schematics I’ve found, none are too clear about the switching circuit itself.  Most schematics leave the switching out completely so it’s hard to know exactly what’s happening.  But I’ll leave that to another post.  What follows is a (mostly) comprehensive discussion of why switch pop happens and how to prevent it.

First and easiest thing to do, add a 1MΩ.  Tie the resistor across the input and output of the pedal  The theory is that any DC bias that tries to feed the input will be leaked to ground through this resistor.  There is also a capacitor in series with the input buffer that blocks DC.  Leaky capacitors can cause switch pop sense all of the DC is not blocked.  Electrolytic caps tend to be leaky so always use film caps at the input and output of your circuits.

Another cause of pop can be the LED that tells the user the effects circuit is on.  This happens because of the rapid current inrush.  A wire (or PCB trace) with a large change in current causes a magnetic field that induces a change in surrounding wires (traces) which can result in popping.  Be sure to use an appropriate resistor in line with the LED to limit current.

Leaky capacitors can also cause a voltage potential difference that gives pop.

Power supply noise and ground noise is what the “LED tick” is doing. The LED current is suddenly changing either the power supply or ground voltage at the amplifier’s sensitive points by suddenly changing. It’s usually a wiring or wire routing problem.

Any sudden change in current in a current loop also broadcasts itself as either a magnetic pulse to be picked up by another current loop, or a radio pulse.

In the image below, you can see R1 is the input resistor to ground that drains any C1 capacitor voltage that leaks across.

input buffer

Input Impedance of Op Amp Buffers

I learned a few things about input impedances of op amp input buffers.  Different op amp arrangements are measured differently so I’ll walk you through the different types.

 

Image result for non inverting buffer op amp

Image result for non inverting op amp

Non-inverting buffers are the quintessential setup for a buffer.  Bring the signal in on the non-inverting (+) input and tie the output to the inverting (-) input.  This will give a unity gain buffer that provides high input impedance  is typically 1 MΩ to 10 TΩ.  An ideal op amp has infinite resistance.  The output of this buffer is very low, typically much less than 1Ω.  In the guitar FX world we would add a resistor to Vb (Vb is half of the input voltage) in order to allow the guitar signal to pass through since we typically use a single sided 9V power supply.  This resistor will negate the high input impedance of the op amp though since you are essentially putting it in parallel.  This resistor will determine your input impedance so always keep it above ~470kΩ.  1MΩ is generally the go-to resistor here.

 

Image result for inverting op amp

Inverting op amp circuits change the game completely so be aware of which op amp you are using.  Rin alone will determine your input impedance here.  Generally, this circuit is preceded by a transistor buffer or a non-inverting op amp buffer so that lower resistor values can be used.  Higher resistor values in series with your signal translate to higher noise levels.