A precision LED/LDR-based Attenuator

Status
Not open for further replies.
I've only lost one set of LDRs due to dc on the signal path - am now paranoid about checking other people's systems for dc before plugging any of my vol controls in -

The main problem, even with low amount of dc, would be resistance 'creep' and maybe this can be 'adjusted for' with your auto calibration system but if the condition persisted (if the dc condition was unknown), this would ruin the set of LDRs rather quickly, IMO, and prompt a factory return.

Not sure how big a problem this would be but would needed to be figured into the price somewhere.

This maybe the problem that Allan ran into with his Warpspeed kits, and are no longer available.

Yes, I was a bit surprised that they could get a whole package together for that price too, altho maybe the hole drilling and such is the diy component - the small things do add up very quickly (case, power supply, sockets, knobs, wire, etc)

George is adamant about adding any switch or relay into the signal path and only supplies his vol controls with the 1 input - Personally, I found a couple of those rotary switches that don't seem to effect the sound at all (could also be my hearing, or lack of ..!) and I prefer the flexibility over the possible loss of fidelity.

Same thing with adding a buffer/gain control - the usual trade-off between possible signal degradation and system synergy/gain structure (did I get that 'mumbo-jumbo' right?)

Perhaps you could incorporate a signal line test by 'dropping a relay contact' across the signal line without interrupting the signal line as a power-up or part of the 'auto-calibration' sequence - could also add another contact to short the signal line to ground while doing this dc test with the volume control still in circuit
I have seen a couple of times where guys have removed a volume pot on the input of an amp but forgotten to add a resistor to ground to avoid a dc condition on the input sockets, too, and will have same 'bad effect' on the LDRs (unfortunately, I've done sillier things!)

Maybe some of these things could be looked at later - don't want to distract you from your present progress - 'Blowing in the wind' here a bit, sorry!
 
Just when I thought I had things going right . . .

Got my first quote back from the local outfit that populates boards -- their PCB fabricator's proposal is for 32 boards minimum and the price put them at more than $3 per square inch. The advantage is that they are nearby and they do panelized boards with scores between the pieces so the boards can be run through as a larger panel and then broken apart after the parts are installed and soldered.

But I'd rather not spend that kind of money and probably not order that many boards right away. This local option may not work regardless of how much I'd like it to work out.

So, I have two questions:

1. Can anyone suggest a place that does panelized boards with the scoring for breaking the boards apart after soldering?

2. Can anyone suggest an outfit that does assembly work that could receive blank boards and build completed boards for me to program, test, and deliver?

At this point, I'm back to considering all options.
 
How many PCBs are you trying to build? Prototype PCB fabs are the only ones that will touch small qtys, and $3/sqin isn't that bad for the number you are looking at.

If you are thinking less than 32 PCBs and they appear to be all through hole parts, why wouldn't you populate them yourself? A CM only makes sense if the quantity justifies the cost (ie reducing it by increasing the qty). If there is more than only a few SMT parts, the tooling (paste screens) will add ~$400 and the programming and set up costs will dwarf the production cost.

So: How many different model PCBs, how many of each model, what are the dimensions of each, how many components/bd and what is the mix between SMT and thru-hole parts?
 
How many PCBs are you trying to build? Prototype PCB fabs are the only ones that will touch small qtys, and $3/sqin isn't that bad for the number you are looking at.

If you are thinking less than 32 PCBs and they appear to be all through hole parts, why wouldn't you populate them yourself? A CM only makes sense if the quantity justifies the cost (ie reducing it by increasing the qty). If there is more than only a few SMT parts, the tooling (paste screens) will add ~$400 and the programming and set up costs will dwarf the production cost.

So: How many different model PCBs, how many of each model, what are the dimensions of each, how many components/bd and what is the mix between SMT and thru-hole parts?

For the same number of identical boards it would cost $1.30 per sq inch from Expresspcb and $1.00 from Osh Park compared to $3+ from the local folks.

I would prefer to use an assembler 'cause I don't want to spend my time soldering. But I will if I have to.

At this point there are no SMT parts.

There are no programming and setup costs because the local people do it with labor and therefore focus on small quantities and automation is not involved. But this is a separate issue from the cost of the boards.
 
I'd suggest something similar - perhaps just order half a dozen from OshPark, if they'll do that smaller number at maybe $1.50/sq. inch

If the boards are still 2.5" x 4.5" (11.25 sq in) @ about $1.50 X 6 = $101 and just initially assemble 3 or 4 for beta testing.

I think there's the other boards added to this, so those numbers aren't quite right, but ....

As for finished units, I would like to put my name on at least 2 units straight away,- pretty sure there'll be a fairly healthy interest on this thread alone.

And will put up deposit/seed $s for development if needed/required, no problems
 
Maybe you're not familiar with the process of making PCBs; there is a fair amount of NRE involved in the form of films that need to be generated for the various processes (etching, solder mask, silk screen, routing, drilling, etc). This usually runs about $150 per project. They try to optimize the yield on a build by stepping and repeating the board onto the largest panel they can, but the panels generally run about $100 each. OshPark is able to offer lower pricing, because they combine a number of small projects onto a single panel so they can distribute the NRE tooling costs to a number of projects. Because the projects are different sizes, they can't score them, so they route individual boards. If your finished PCB were smaller, it would probably come in closer to $1/sqin.

If your CM is using manual labor to populate boards, they probably don't need to be panelized; in some cases (ie connectors hanging over the edge) it would be easier for them if the boards were not on a panel. Even if the assembly is not done on pick and place machines, there is still some setup involved. If you can find someone that will build less than 30 PCBs for a reasonable price, I would latch onto them, they are doing you a favor.
 
Passed a milestone last night -- confirmed that the encoder/ir code that runs on a fairly large PIC could be downsized to run on a smaller chip with different coding. It's now running properly on the smaller chip, and that means I can now finalize the board design for the IR & rotary encoder front end and order a prototype.

I'm going to try Osh Park, thanks all for suggesting board houses to consider.

If anyone out there has been using Expresspcb and would like to make Gerber files from your designs, the Robot Room software seems to work very well -- I've tested it against several board houses and each has accepted the Gerber files converted from Expresspcb without complaint. The software costs $49, which is half of what Expresspcb charges for converting one drawing. I've got a lot of board designs that I can now consider "unlocked."
 
I ordered four different boards from OSH Park this morning. I need a total of five, but didn't have the fifth board designed.
I ordered
the IR-encoder-display board
the LDR control board
the LDR carrier daughter boards (two per setup)
and the little tiny board that will sit on top of, and short together, the two rows of a 7-position jumper header that will plug into a socket on the LDR control board to enable selecting operation or calibration.

Tomorrow I'll design and order a small board that will hold a rotary encoder and a terminal block for the wires connecting it to the IR-encoder board.

While I wait for the boards I'll be working on software.

The board designs look good. I may discover a physical conflict in parts location that I can't see from the drawing, but aside from that the circuitry should be just about right.

The images of the OSH Park boards look very handsome with the dark blue or purple solder mask and gold colored solder pads.
 
I think I have most of the software sorted out -- everything works except the display. That's next and is the last major component. Now have the LDR controller board, an IR & rotary encoder board, an IR & motorized pot board, plus LDR daughterboards. I think I can use an off-the-shelf OLED display if I can make certain issues go away with software . . .

This morning I woke up and figured out how to make the rotary encoder behave like a ballistic mouse -- nonlinear action. If you click it once, you move one count on the volume control. If you click it twice in a row, you move three counts, and so forth up to a maximum of nine counts. So from the same encoder you can get one count resolution (about .25 db) at a time, but if you want to move fast you can move about 10 db with one continuous twist of the knob. I was wondering how I was going to handle that . . .

Yesterday OSH Park emailed to say they mailed my boards; today I verify my BOMs and check my parts bins and order whatever parts I need to make at least three sets of everything.

Still moving forward . . .
 
Very cool idea about the variable step encoder, I don't think I've seen that done before. Might I suggest a slight variation:

A user may want to change the volume 1 step at a time, but several steps, maybe even back and forth and might find the 3 step jump undesirable. Would it make more sense to alter the step based on the speed of knob rather than just the second click? If the user wanted to change 1 step at a time, rotate the knob at a "normal" rate. If they wanted to go down fast, rotate the knob quicker. The faster they rotate, the higher the step. Just a thought.
 
That suggestion seems more like some other digital steppers I have (a very little) experience with.

A slow turn gives very small steps.
A fast turn gives big steps.
A change from fast to slow turn begins with big steps and reverts to small steps when the "speed change" is detected.
 
Would it make more sense to alter the step based on the speed of knob rather than just the second click? If the user wanted to change 1 step at a time, rotate the knob at a "normal" rate. If they wanted to go down fast, rotate the knob quicker. The faster they rotate, the higher the step. Just a thought.

Well, your thought is right on, and it is where I headed first when I realized I needed to do something like that. Looked around, asked around, the answers I got were that any solution would involve measuring time betweeen clicks and be complicated to code.

The solution I came up with took about ten minutes to write and debug and involves maybe four lines of additional code - a simple, elegant solution in a sea of complex ideas. Unless someone shows me a different real-life working solution, I'm sticking with this.

Anyway, my solution does have a timing component -- as long as you turn the knob deliberately, it stays at .25 dB / click but, if you speed it up, it increases by .25dB at each new click so at the end you're moving quite rapidly. But to activate the increasing steps you have to move pretty fast between clicks. Casual rotation will keep you at .25 to .5 dB per click. I need to try it out for a while to see how well I like it.

Originally, my volume control had about 1000 steps -- .06 dB per step. When I tried to use it, I found that it was worse than pointless -- I could not take advantage of such resolution, and it took forever to change the volume in a meaningful way. So I made it 250 steps, and that's about right. Nevertheless, a .25 dB step is well below audible unless your system has crazy high gain, and this solution is not over reactive. You can still get .25 dB per step if you're deliberate, but you get an audible change with a serious twist of the knob, and you get a really audible change by making an effort to do so. It's pretty good, I think. 🙂
 
Last edited:
That's a reasonable solution, as long as there is a timer to differentiate between fast and slow movement of the knob. If it were possible to further refine it as Monte McGuire suggests, that would be a definite improvement and add true speed sensitive ratio to the step size.
 
I started by increasing by one count for every continuous click up to nine, and it was inconsistent because it was hard to get the rotation consistent.

I changed my approach to increasing by two to a maximum of six -- 1, 2, 4, 6,6,6,6,6 . . . etc.

Any unrushed rotation keeps the rate at one count per one click, and anything even slightly intentionally faster rapidly increases to six counts per click. Works well, I'm sticking with that.
 
That seems to be what my car stereo does. If you turn the selector dial fast, it jumps quickly, maybe 5-10 steps per mechanical click, and then when you turn more slowly, it goes back to 'normal', one step per mechanical click mode. This helps to slew through the 100-200 channels of satellite radio without thinking too much.

It seems like the 'two speed' approach you settled on is a popular one, and isn't too confusing for a user to deal with. 🙂
 
Got a display working -- it's a two-line OLED which can display Volume, Balance, and Mute information.
 

Attachments

  • Display.jpg
    Display.jpg
    599.3 KB · Views: 336
Status
Not open for further replies.