Display for a reference signal

ebeowulf17

Joined Aug 12, 2014
3,307
Rough draft. I think this is more or less ready. Looks more complicated than it is. The four op amps can all be part of one chip. I don't have sim models of trim pots, so the resistor/pot groupings are busier looking than they need to be. When I draw a nicer schematic of this in DipTrace it'll be more approachable. The basic idea is that there are two trim pots, one to set the target pitch, and another to set the tolerance (how far out of tune you can be before it lights an LED.) The tolerance one could probably be a hidden one that you just set once with a screwdriver and forget about. The pitch one should obviously be reachable from the outside. I'm not totally sure how sensitive that knob adjustment will be. You might need a multi-turn pot, but I don't think so. The wiring to this circuit is 9V supply from battery (preferably through a switch so it's not wasting power when it's not needed) "ground" (negative side of 9V battery) and the signal from negative terminal of the meter. Outputs are two LEDs, one to indicate that the pitch is sharp, the other for flat. If neither LED is lit, you're within your tolerance range of the target pitch.

If this circuit seems reasonable, I'll draw up a nicer version in DipTrace and come up with a little advice on component selection. @crutschow, if you wouldn't mind looking this over, I'd really appreciate it. It all makes sense to me, and it's working well in simulation, but I don't have your level of experience, and I'm always afraid I'm doing something stupid and just not realizing it!!!

Doh! Just noticed a typo in schematic. What should be trim pot 2 is also marked as trim pot 3 in one spot. Sorry! No time to fix it right now.
bagpipe-tuner_04.png
 

Attachments

crutschow

Joined Mar 14, 2008
34,464
A few comments:

It the meter voltage is not regulated (i.e., it varies with the battery voltage) which seems quite possible, then you don't need to regulate the voltage with U5.
Even if the meter circuit is regulated, this is a short term, relative measurement, and the battery voltage is unlikely to change much during the measurement time, so regulation is probably not needed.

Since this is a battery operated device, with high brightness LEDs you could probably reduce the LED currents to a mA or two.

R7, R8, R10, and R11 are not needed.

If you wanted to get fancy, you can add an auto power-off circuit, activated by a push-button.
 

ArakelTheDragon

Joined Nov 18, 2016
1,362
Ok, this one may be annoying, but I realized there's one more detail that would help determine the best approach. I need to know if that stable 3.063 voltage (or any of the others) varies significantly depending on battery voltage, or if all the internal working voltages are regulated. A 9V battery can range from almost 10V brand new to less than 7V before many "9V" circuits stop working.

If the signal levels change in relation to battery voltage, we can make this circuit scale in a similar way. If it doesn't, then we can use regulated reference levels.

The best way I can think to check this would be to measure the battery voltage, and double check that the positive meter terminal voltage is still near 3.063V. Hopefully the current battery reads significantly lower voltage than a new battery so we can see the change. Then put a brand new battery in and measure its voltage, then measure the positive meter terminal again (all of these measurements relative to battery negative terminal)

Sorry to be a pain, but I'd hate for this circuit to give wildly unpredictable results depending on the battery state of charge, and there's no way to know how the existing circuit behaves without testing it.

I've done a rough simulation of the concept I have in mind, and everything's working great so far. Once I know how battery life affects signal readings, I should be able to fine tune things a little more and share the basic circuit simulation.

The first schematic will be in LTspice simulation software and will neglect some generic background details like decoupling caps. Once we're happy with that circuit concept, I can draw a cleaner, easier to read version with all the extra components in DipTrace.
I am not familiar with these shop batteries, but the maximum voltage of a 9V battery should be about 10.8V, while it should be discharged at 8.5V is what I think?
 

ebeowulf17

Joined Aug 12, 2014
3,307
Thank you so much for your comments! I appreciate your feedback.
Even if the meter circuit is regulated, this is a short term, relative measurement, and the battery voltage is unlikely to change much during the measurement time, so regulation is probably not needed.
I'm fairly confident from the various measurements that the meter circuit is regulated. The reason I thought regulating my reference voltage would be good is that it allows me to set R12 and R13 much tighter so that almost the full span of Pot1 is between 470-490Hz voltages. If the top of my voltage divide is unregulated, I have to allow a much wider span, which means it's more difficult to set the exact pitch you want. Not sure how great a benefit that really is, but that was my reasoning anyway.

Since this is a battery operated device, with high brightness LEDs you could probably reduce the LED currents to a mA or two.
Good point. I'll adjust them accordingly.

R7, R8, R10, and R11 are not needed.
I was meaning to double check my thinking on those. Originally 10&11 were to prevent comparator hysteresis feedback from pushing the reference voltages around, but I've switched to using a regular op amp there instead of a comparator, so I agree they're useless now. I'll drop them.

I thought leaving 7&8 in might be good just in case the meter signal voltage was ever beyond the op amp supply voltage - the resistors would limit current through the built in protection diodes. It doesn't seem like the meter voltage would ever get there, but since that circuit is a mystery box, I was playing it safe.

If you wanted to get fancy, you can add an auto power-off circuit, activated by a push-button.
That might be handy, but I don't think I should get fancy... I'm lucky if I get the basic stuff right, much less the fancy stuff! I assume the meter must have an on/off switch, so hopefully we can just tap into 9V power after the switch.
 

ebeowulf17

Joined Aug 12, 2014
3,307
I am not familiar with these shop batteries, but the maximum voltage of a 9V battery should be about 10.8V, while it should be discharged at 8.5V is what I think?
http://data.energizer.com/pdfs/522.pdf

Most disposable 9V batteries are composed of 6x alkaline cells...

https://en.m.wikipedia.org/wiki/Alkaline_battery

Excerpts from wiki page:

The effective zero-load voltage of a non discharged alkaline battery, however, varies from 1.50 to 1.65 V, depending on the purity of the manganese dioxide used and the contents of zinc oxide in the electrolyte. The average voltage under load depends on level of discharge and the amount of current being drawn, varying from 1.1 to 1.3 V. The fully discharged cell will still have a remaining voltage in the range of 0.8 to 1.0 V.

Open circuit, zero-load voltage and voltage for a 33 Ω load (330 mW) vs capacity[9]
Capacity 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0%
Zero-load 1.59V 1.44V 1.38V 1.34V 1.32V 1.30V 1.28V 1.26V 1.23V 1.20V 1.10V
33 Ω 1.49V 1.35V 1.27V 1.20V 1.16V 1.12V 1.10V 1.08V 1.04V 0.98V 0.62V
 

Thread Starter

Rennieaj

Joined May 6, 2018
49
http://data.energizer.com/pdfs/522.pdf

Most disposable 9V batteries are composed of 6x alkaline cells...

https://en.m.wikipedia.org/wiki/Alkaline_battery

Excerpts from wiki page:

The effective zero-load voltage of a non discharged alkaline battery, however, varies from 1.50 to 1.65 V, depending on the purity of the manganese dioxide used and the contents of zinc oxide in the electrolyte. The average voltage under load depends on level of discharge and the amount of current being drawn, varying from 1.1 to 1.3 V. The fully discharged cell will still have a remaining voltage in the range of 0.8 to 1.0 V.

Open circuit, zero-load voltage and voltage for a 33 Ω load (330 mW) vs capacity[9]
Capacity 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0%
Zero-load 1.59V 1.44V 1.38V 1.34V 1.32V 1.30V 1.28V 1.26V 1.23V 1.20V 1.10V
33 Ω 1.49V 1.35V 1.27V 1.20V 1.16V 1.12V 1.10V 1.08V 1.04V 0.98V 0.62V
That all looks great, im sure you know what your doing
if you could draw up the final diagram and give me a list of components to order that would be absolutely amazing!

thanks again guys for all your help
 

ebeowulf17

Joined Aug 12, 2014
3,307
I've finished a first pass at the DipTrace version. Very sleepy now, so I wouldn't be surprised if I missed something in the transfer. I should double check everything tomorrow with fresh eyes. Of course, if anyone else would like to double check my work, I'd appreciate that too.

The attached BOM includes recommended part numbers for a few specific components, but is mostly open to generic parts.

I'd appreciate any feedback from the knowledgeable folks around here. I'll probably make corrections and finalize it sometime tomorrow.
 

Attachments

Thread Starter

Rennieaj

Joined May 6, 2018
49
I've finished a first pass at the DipTrace version. Very sleepy now, so I wouldn't be surprised if I missed something in the transfer. I should double check everything tomorrow with fresh eyes. Of course, if anyone else would like to double check my work, I'd appreciate that too.

The attached BOM includes recommended part numbers for a few specific components, but is mostly open to generic parts.

I'd appreciate any feedback from the knowledgeable folks around here. I'll probably make corrections and finalize it sometime tomorrow.
hi, thanks so so much for this,
one quick question if I may?
is there no led to show when the desired frequency is matched? or is it only for sharp and flat?

many thanks
 

ebeowulf17

Joined Aug 12, 2014
3,307
hi, thanks so so much for this,
one quick question if I may?
is there no led to show when the desired frequency is matched? or is it only for sharp and flat?

many thanks
As it's currently drawn, only sharp or flat. Shouldn't be too hard to add one for frequency matched if you need it.

I think it would just take a NOR logic gate, decoupling cap, LED, and resistor. I'll have to double check myself on this, as I've never actually used any logic gates, but it should be easy enough.

It wouldn't actually be telling you anything that both-LEDs-off doesn't already tell you, but if it makes it more intuitive to use, I can certainly add it.
IMG_5682.PNG
(I removed the regulator from the sim because at one point I thought it was the cause of some ridiculously long simulation times, but I still plan to use it in the real design.)
 

Thread Starter

Rennieaj

Joined May 6, 2018
49
As it's currently drawn, only sharp or flat. Shouldn't be too hard to add one for frequency matched if you need it.

I think it would just take a NOR logic gate, decoupling cap, LED, and resistor. I'll have to double check myself on this, as I've never actually used any logic gates, but it should be easy enough.

It wouldn't actually be telling you anything that both-LEDs-off doesn't already tell you, but if it makes it more intuitive to use, I can certainly add it.
View attachment 153093
(I removed the regulator from the sim because at one point I thought it was the cause of some ridiculously long simulation times, but I still plan to use it in the real design.)
if you could find away to easily add it, that would be great
if its a hassle, don't worry too much about it,
thanks
 

ebeowulf17

Joined Aug 12, 2014
3,307
Again, this was whipped up hastily, but I think it's right. I've attached an updated PDF with a NOR gate to provide a "matched tuning" LED output in addition to the sharp and flat LED outputs. I've also attached the updated BOM.

@crutschow, I don't know much about the pros and cons of each logic family for any given situation. Parametric searching through Digikey landed me at the SN74HC02N. Does this seem like an ok choice to you? Also, I've tied all unused inputs to ground and left unused outputs floating. Is that all appropriate? Thanks!
 

Attachments

ebeowulf17

Joined Aug 12, 2014
3,307
if you could find away to easily add it, that would be great
if its a hassle, don't worry too much about it,
thanks
I think the updated files are good to go. Let me know if you want help selecting more of the components. I chose recommended chips and a diode for you, but hadn't picked out specific resistors, capacitors, or LEDs for you. The capacitor specs are pretty flexible.

For the resistors, if you can get 1% or 2% tolerance for R1, R2, and R4, that would be preferable but not absolutely necessary. The remaining resistors can be 5-10% tolerance; doesn't really matter on them.
 

Thread Starter

Rennieaj

Joined May 6, 2018
49
I think the updated files are good to go. Let me know if you want help selecting more of the components. I chose recommended chips and a diode for you, but hadn't picked out specific resistors, capacitors, or LEDs for you. The capacitor specs are pretty flexible.

For the resistors, if you can get 1% or 2% tolerance for R1, R2, and R4, that would be preferable but not absolutely necessary. The remaining resistors can be 5-10% tolerance; doesn't really matter on them.
 

Thread Starter

Rennieaj

Joined May 6, 2018
49
Thank you so much for your hard work, I really appreciate it.
I’ll get the parts ordered from RS as best I can, if I have any difficulty I’ll give you a shout.
I hope to be in a position to build a prototype as soon as they arrive.

Thanks again
 

ebeowulf17

Joined Aug 12, 2014
3,307
C
Thank you so much for your hard work, I really appreciate it.
I’ll get the parts ordered from RS as best I can, if I have any difficulty I’ll give you a shout.
I hope to be in a position to build a prototype as soon as they arrive.

Thanks again
Awesome. I'm excited to see how this works out. Definitely don't hesitate to ask if you have any questions, whether with parts sourcing, building, or testing/troubleshooting in case anything doesn't work as expected.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Thank you so much for your hard work, I really appreciate it.
I’ll get the parts ordered from RS as best I can, if I have any difficulty I’ll give you a shout.
I hope to be in a position to build a prototype as soon as they arrive.

Thanks again
How's the project coming along? Any progress?
 
Top