Finished editing the video demo this afternoon. I've been wanting to learn a new video editor package called shotcut (https://www.shotcut.com/) so I used this as an opportunity to do so. It has a bit of a learning curve, but I believe it will work better than the Blender Video Sequence Editor that I've been using in the past.
This has been a fun and challenging project! I'm very thankful to have had the opportunity to learn more about the Arduino and 3D printing while building something I can make use of in the future.
I installed RCA style jacks for the ground, plate and cathode probes. I have a ton of old RCA audio and video cables and I figured I could easily re-purpose them. I got the jacks from an old VCR (picture below).
After wiring them in, I tested, and as has become the norm, it didn't work. After much head scratching, I found that I wired the ground to the wrong lug on the jack. After fixing that, it worked! I shot a video of working and will work on a project presentation video this weekend.
What's taking place in the video below is:
I'm posting this on 12/7/2017, but the work I did took place last night - I was just too tired to post afterwards.
I've got Arduino nano soldered in and a working project. I still need to mount the jacks for the probes and wire them up. I also need to work on my video presentation, while I'll do this weekend and next week.
I had a very scary moment last night; I finished wiring everything and went to plug the Arduino nano into my computer to program it.... sssssssssssssssnap, smoke.
Not good.
Turned out that the last wire I installed was the ground wire, and I mistakenly wired it directly to +5v. Luckily I didn't fry the nano.
Here are some pics of the mostly working unit. Very exciting! My son thinks I should have mounted the on/off switch sideways; he's probably right, but I like it the way it is.
This took way longer than expected!
First I needed to find some small screws. I have several parts drawers full of nuts, bolts, washers, knobs, switches, etc... and screws. I ended up spilling the entire contents of one of them to scrounge for screws that would be small enough. Success!
I had to enlarge the screws for the lid of the enclosure, as well as drill pilot holes for the joystick, screen and lid. I took my time, everything went well... until I drilled just a little too far on the lid and went through the top. It didn't look awful, so I repeated the "mistake" on the remaining three holes. I'll probably find some stickers, or something to cover it up. Maybe I'll print a ring for the top, surrounding the screen.
After mounting everything, I realized I'd forgotten to account for adding a set of terminals to mount the discrete components, like the resistors I'd need for the voltage divider and a common ground. I hot glued a terminal strip in place - should work well.
I started disassembling some ribbon wire and soldered one into place on the ground terminal. At this point I realized I'd been working on this for almost two hours and still hadn't eaten dinner. This seamed like a good time to quit for the night. I'll try to finish up the wiring tomorrow and hopefully power the unit on.
The enclosure has now been printed. Amazingly, it's good-to-go on the first try. I did have one glitch with the cutout for the joystick, but I carefully hit it with a dremel tool and made a couple braces out of some strips of plastic I had. Everything fits, it's just a matter of drilling pilot holes for the screws... and obtaining some small screws. That's all on the list for tomorrow.
Next up is soldering the nano Arduino board and then mounting the parts.
I thought about the Build vs Buy with regard to an enclosure today... and I decided to build. If I bought an enclosure, I'd still have to measure the things I'm going to mount and cut, so I might as well design an enclosure and print it with everything sized to fit.
So, I did: https://www.tinkercad.com/things/krHya0m3oOP
I hope to print the top tomorrow and see how I did measuring everything.
I spent a couple hours cleaning up the source code to the sketch. I also decided to release the code under the Creative Commons Attribution 4.0 International License. That way anyone can use it for anything they want. https://creativecommons.org/licenses/by/4.0/
I also broke out the Nano arduino and started considering how I'm going to wire it up. I think I'll try to find some ribbon cable, which I'm certain I have in my junk closet from old floppy drives (yes, I have very, very old junk!). It's really small, so I had to break out the magnifying glasses to read the pin holes.
When I was a software engineer, one of the standard questions that arose (often) was build vs. buy. Commercial of the shelf (COTS) software was appealing because there were no development costs (or time) and if the software did most of what you needed, you simply needed to deploy the software and start collecting revenue from the customers you were supporting.
The rub of course was that you would have to massage the COTS software to do what you needed it to do, and this usually ended up being quite a lot of work.
As a programmer, I was (and still am) pretty much allergic to buying COTS and always wanted to develop something.
Anyway, I find myself wrestling with a similar decision for this project concerning the enclosure for the bias meter; I can design, model and 3D print a perfect enclosure. Here are the requirements for it:
The problem is, I know there are several enclosures available to buy that will probably work and meet my needs. I may need to make a hole here ore there, but for the most part, I think I can buy a pre-built enclosure for less than $20 (may even less than $10) and make it work. Buying an enclosure is certainly not rare when it comes to electronics projects; I've built guitar pedals and bought enclosures for them, the same goes for amp projects.
I guess it just depends on where you want to spend your time?
I've put a lot of time into the code and design of the bias meter - that's where I feel I've explored and learned the most. I don't feel there is much more room for me to expand by 3D modelling and printing an enclosure... so I'm presently shopping for an enclosure.
Here is a short video showing the bias meeting working. Very excited to have gotten this far!
As I mentioned below, I've still got a lot of work to do on coding. I also need to work on using an arduino mini or micro board and programming that. Another thing I need to consider is designing a case for the project.
I added the code to measure both the plate voltage (pv) and cathode current (k) and calculate bias. It worked! I determined that I was running my Twin Reverb too hot and adjusted the bias while using my arduino project. I then confirmed with my known good voltage meter just to be sure. I've got some cleanup and tweaking to do with the code. I'd like to add the ability to the interface to adjust the reference voltage and store it in EEPROM on the arduino.
I also experimented with the Nokia 5110 screen I bought from a vendor on eBay. I was excited to get it hooked up.
Problem: the pinout is not the same as the pinout on every site about the 5110 - it appears I have a knockoff. To make matters worse, the pins are labeled differently. I'm pretty sure I've got the pinout correct, but I can't seem to get the code to compile. This is one of those "I learn more when things don't work right the first time" moments.
More things to work on!
It turns out that the arduino had a ground differential with the amplifier I was measuring when the arduino was plugged into USB.
I'm not sure why, but I do know it existed.
When I power the arduino on a battery power, my voltage measurements are within a couple mv of my meter.
Onward.
Here's a video of a voltage divider, the measurement on the arduino and the matching measurement on my meter.
I hooked up the arduino to my bias probe to see what I might be looking at as far as analog voltage measurements.
The results weren't good. Without changing the analog reference voltage from the default 5v to a lower voltage, the best I could hope for was close to 5mv of accuracy - that wouldn't do.
Using this line of code: analogReference(INTERNAL); in the setup function, I changed the reference voltage to 1.1v (approximately). I measured the voltage on the AREF pin with my known accurate multimeter and came up with 1.083v - that's the value I used in my code.
This had the side-effect of changing the way the joystick values were read, because those readings relied on a 5v analog reference. Since the readings were now based on a 1.1v reference, they were always maxed out at 1023. I build a voltage divider out of two resistors (100k and 33k) and got the reference voltage for the joysticks at approximate 1.1v - problem solved.
The next issue is actually reading the voltage from the tube bias probe. On my multimeter, I'm seeing 37.9mv on the plate probe (this translates to 379v on the plate - the probe reduces the value using .1% accurate resistors in a voltage divider). On the arduino, I'm calculating about 28mv using this formula:
//this reads the pin 10 times rapidly and averages the values
double vp = readAverageAnalogVoltage(vPinPlate, 10);
double plateVoltage = (vp * (1.083 / 1024.0)); //1.083v is the actual reference voltage
I'm going to look at the recommendations from this site: https://rlogiacco.wordpress.com/2015/03/04/arduino-analogread-pitfalls/ to try to figure this out, as well as other sites I've been reading in rapid succession.
Bias plug hooked up to Twin Reverb:
I moved some of the pictures and documentation from my original site to the google site. I haven't been a fan of Google sites in the past, but I wanted to try it again. We're going to start using them at school, so I figured I might as well give it another go. So far I like it.
Been working on the GUI for the bias tool. After getting a prototype up and running (https://www.youtube.com/watch?v=12S7aFntrk8), I realized I’d need to support more than 3 types of tubes. I needed a way to scroll the LCD.
I decided to only show one tube type at a time, and scroll up and down. To indicate the selected tube, I wanted a custom, user-defined LCD character. I found this site: https://www.quinapalus.com/hd44780udg.html which lets you define a character and gives you the character array needed to draw it. Here it is on my LCD:
Many guitar amplifiers still use tubes to make them louder (amplify). Tubes require that their idle current be set in order to achieve the best sound and insure long life of the tube. The reason tubes need to have idle current is when the voltage swings up and down (AC audio signals, they will bottom out or top out if the bias is not set in a reasonable range and sound cold (too little idle current), or overly saturated (too much idle current). There are several resources that explain bias online, as well as tube bias calculators.
https://tubedepot.com/pages/bias-point
https://www.humbuckermusic.com/pages/tube-amp-bias-article
The tube bias tool will assist with adjusting FIXED ADJUSTABLE BIAS amplifiers, such as found in most Fender, Marshall and VOX amplifiers. There are countless other brands of tube amplifiers, but most of them use identical circuitry to set the tube bias. Also, these style of amplifiers all use similar octal power tubes (6V6, 6L6, EL84 and EL34). It can also give a reading from a cathode biased amp, however those are only adjustable by soldering in a different cathode resistor.
The schematic piece below is from a Fender Twin Reverb, AB763 style power amp section (preamp tubes do not have an adjustable bias).
The area in RED is the potentiometer that adjusts how much negative voltage is applied to the Grid (pin 5 below and blue in the schematic). This negative voltage controls how much current flows through from the Plate (pin 3 below) to the Cathode (pin 8 below).
(image source: amplifiedparts.com - https://www.amplifiedparts.com/tech-corner/6l6gc-comparison-current-made-tubes)
Without a negative bias, the tube would burn out (also called going nuclear, or redplating) very quickly.
The signal from the amplified instrument is applied to the point in blue in the schematic above. This audio signal causes the voltage to go up and down, which in turn allows more or less current to flow through the tube. The current is being pulled through a transformer (TR3 above), and the opposite side of the transformer is connected to the speakers, which move back and forth creating the amplified sound.
I use a tube bias probe. One I bought for 6V6, 6L6 and EL34 tubes
And one I made for EL84 (aka 6BQ5) tubes (has the same size and pinout of preamp tubes (usually 12AX7). I had my friend Tim cut the tube open, then I built a voltage divider so the plate voltage (300v - 400v) could be measured safely: