Specifically, I need to know, to a fair level of precision (1/32" would be ideal):
1. The diameter of the thumbwheel. 2. The thickness of the thumbwheel. 3. The distance from the face of the PCB to the underside of the thumbwheel. (The distance from the face of the PCB to to the center of the edge would be good as well.)
I've already looked at the datasheet for the part, but it doesn't show the size of the wheel itself and I need to know that so I can size and position a cutout for it in a panel.
What is hard about putting a 4K7 resistor across the input?
I didn't understand what you meant earlier when you said load the output side of the transformer with a 4K7 resistor.
I'm also not sure what this is supposed to accomplish. I don't want the transformer there. And I don't want to have to create special audio cables for every kit I ship with a resistor spliced in parallel.
The amplifier and isolator are also currently inside an enclosure which is difficult to get open and close back up again, so while I may try this at some point to see if it does anything, unless there's a compelling reason why I need to do this to solve the overall issue, which is that I'm stuck with that ground loop isolator / transformer in the first place, I'm not itching to open the shell up to try that out.
I did try putting a 1.5K resistor across the line out (I don't have a 4.7K and I figured the smaller the better anyway), aka, the input to the transformer, as that is outside the shell and easily accessed, and that didn't seem to do anything. Perhaps that's exactly what you expect would happen, but if adding a resistor can't be done on the output side, then I would prefer not to use that approach. Can you imagine Apple selling an iPod and telling their customers they have to stick a resistor on the line-in to their portable speaker amps to make them work?
Actually, I could imagine Apple selling their customers an expensive cable to do just this, but that's not the point.
I'm looking for a nice, clean, non-kludgy, miniaturized solution that doesn't involve any big ugly expensive through-hole transformers that look like they came out of a 1980's telephone.
You can see how little room there is there with that all installed, and that's a relatively large space, as far as where these boards end up being used (nerf guns and tricorders and such don't have a whole lot of space inside). That's version 1.0, and for version 2.0 I want to make it even more compact and ditch those 2.54mm headers in favor of more compact 2mm versions.
I decided that I don't have the luxury of spending months trying to figure out how to port a bunch of Arduino libraries (like WaveHC and Servo) that use timer interrupts to the Xmega though, so I have to redesign that around the Mega1284 I'm using in the current model. (Then again, it might take less time to port the libraries than redesign the board... But with the Zero coming out soon, I feel like I'd be wasting my time getting familiar with the Xmega.)
> One approach you have not attempted yet is to lower the input impedance of your amplifier to reduce the pickup of the noise. I would use the transformer and load the output side with something like a 4K7 resistor going into your amplifier.
I don't understand what you mean.
In case there's any confusion, when I mention an external amplifier, it is a battery powered class D 20W amplifier running from the same 12V power supply as the board's external 5V switching regulator.
There is also a 3W on board amplifier which runs from the same 5V supply which powers the logic and LEDs.
There is no transformer in this setup other than the one which is inside the ground loop isolator, and the goal is to get rid of the ground loop isolator. I don't want to use a transformer as these boards need to be super small, transformers are expensive, and I've yet to find a transformer that will work across the whole audio range.
The DAC and amp are in the lower right hand corner, isolated from the power and ground planes except at one point.
The LEDs on this board are driven by TLC5947's that are on little modules connected to the LED pins. Those boards only have a couple small decoupling caps on them, 10uF, and 0.1uF.
The power is supplied by a separate 5V switching regulator which has 220uF caps on the inputs and outputs.
I get noise on the audio from the LEDs when they dim, due to the PWM, and I also get noise when I drive any other modules off the pins on the left side of the board with PWM.
But that's when connecting a speaker to the 3W onboard amp. If I connect an external amplifier to the line out pins, all hell breaks loose and the quiet PWM noist turns into a loud screeching that overpowers the rest of the audio... unless I stick a ground loop isolator... which is just an audio transformer, in between the board and whatever external amp I'm using. Then I just get the quiet PWM noise.
I had one suggestion to break the connection from my line out voltage divider to reference that to the amp's grounf to solve that isolator issue, and I haven't tried that yet, but that wouldn't solve the primary issue which is that pwm noise that's getting into the audio subsystem in the first place.
Given the PI filter with its inductor seems easier and the inductor will take up the same space as a 100uF cap, I would be inclined to go that route... were it not for the fact that those 1mH inductors appear to have resistances in the range of 3-6 ohms, which I think it's safe to assume would result in a far worse voltage drop than the 1 ohm resistor that still seems too large:
So, I'm not sure what to do at this point. I could use a larger capacitor to make the resistor smaller but my boards need to be small. A linear regulator might do the trick, but I was hoping to use a switching regulator in the next iteration of the boards to allow for a 16v input. And that adds a lot of cost.
Perhaps adding a resistor to Vcc on the LED drivers is the key? I don't need 5V for those. And I have room on there for a 100uF capacitor. I think someone suggested such an approach in the earlier thread to "get the current flowing around there". Just a question of what wattage that resistor needs to be. Can't calculate that since I don't know how much voltage it will drop.
I was originally leaning towards the PI filter because it seemed simple enough to implement, but when looking for a suitable inductor I realized during my original search I must have mistakenly selected nH instead of mH,, because the inductors I found this time around were much larger and more expensive than what I found before.
I would like to keep my design small, because even though the board I'm working on now has room to spare, the next board I'll be designing has to be as small as possible.
If I plug in 1khz and 100uF I get 1.6 ohms for my resistor.
Good so far, but I was warned that doing this would cause a voltage drop, and that I should take care to make sure that's acceptable. I selected such a large capacitor because I have no idea how to calculate the voltage drop here, but I figured the smaller the resistor the better. Still, if I could get away with a smaller capacitor, so that I could use a tiny ceramic one instead of a hulking electrolytic, that would be great.
At best I can guesstimate, the DAC is probably not going to draw more than 25mA, but the absolute max on the input is 50mA so it may be wise to assume that.
The amp, well that's going to be powered by something less than 5V, the voltage drop will determine that. But assuming 5V and a 4 ohm speaker, with 10% harmonic distortion as a worst case, that looks to be about 2.75W max. Which with a 5V supply gives 550mA.
So worst case, this portion of the circuit would be drawing 600mA.
Now, I have no idea if this is correct or not, but I'm thinking I should plug that into R = E / I, and that gives me 8.3 ohms for the resistance of this portion of the circuit.
Here, I would set R2 to 8.3 ohms, as that represents my audio circuit in the worst case, and R1 would be the resistor in my low pass filter.
R2 / (R1 + R2) would then = .89 if R1 = 1 ohm.
And if R1 = 1.6ohms, which was the value calculated for the 1khz LPF, then I get .84, which multiplied by 5V gives me 4.2V. That's quite a voltage drop.
The thing is, if the voltage drops, then the current the amp is putting into the speaker would as well, so that's probably incorrect. Perhaps I should just use the 4 ohms for the speaker as my resistance?
In that case, R2 / (R1 + R2) would be 4 / (4 + 1.6), which is .71, which is even worse actually. And I doubt that is correct either since I think the speaker resists the flow of electricity more than its impedance implies.
Anyway I'm totally confused here. All I can really say for certain at this point is the circuit would probably work but be quieter than it should be if the voltage drop is really that large. Even in my worst case there, that's still 3.5V and that's still more than the amp and DAC need. Except... I'll be talking to them with 5V logic and they may not like that with Vcc being lower than expected. :/
I'm working on a project for which I'm going to need first 10, an then 100 11x11" sheets of 1/8" acrylic cut.
I'm not sure if laser or CNC cutting would be less expensive, but I'm on a budget, so if one is going to be half the cost of the other, but the quality of the cuts isn't as good, then I'd prefer the cheaper service. This will be a base plate so it's not going to be seen much.
Each sheet would have six holes for screws, two SD card size slots, and square holes for a DC jack and rocker switch. In the center, there will also need to be a 'grill' with holes for screws at the corners, behind which will be mounted a small speaker.
The speaker portion will probably add the most cost. Right now it's a fancy design with oval shapes, but that might actually make it cheaper to cut than something with a lot of much smaller holes.
I'm not looking for random suggestions; I know how to use google. What I'm looking for are reviews from those who've actually used particular services and been happy with the results or might have an idea of the cost difference between CNC and laser cutting for panels like this.
I'm also not sure what format they'll want the data in, but I would like to be able to just create the design in Eagle since that's what I know and I'll have the board right there for reference. I think most places will want DXF, though maybe some can accept gerbers? I'm not sure if I can export DXF form Eagle, that's something I still need to look into.
Oh and as Grumpy mentioned, the speaker housing is important. The waves from the back side of the speaker are 180 degrees out of phase with the ones from the front and they cancel eachother out like noise canceling headphones. The speaker cabinet prevents that from happening. They sell tiny speakers on Digikey with plastic housings. I haven't tried them myself as they are fairly new, but I would imagine they'll give you the most bang for your buck with minimal effort.
I've done a lot of stuff with speakers in my projects, trying to get the most out of small and large speakers.
There's several things you'll want to pay attention to.
First there's the audio file itself. Have you maximized the peaks? Run it through a compressor? You can double the volume this way.
Next, there's the impedance. If you've got a little 3W amplifier running on 5V, then a 4 ohm speaker (or two 8 ohm speakers in parallel) is going to allow twice the current to flow, and you will get twice the power out of it.
Then there's the sensitivity. All other things being equal, the sensitivity, measured in decibels, is how efficient the speaker is at converting power into volume. A 6db increase is a doubling in volume.
But the sensitivity does you no good if the speaker isn't good at reproducing the tones you want. Look at the datasheet for the speaker if you can find one for a graph. Or at the very least, there should be a range for frequencies the speaker can reproduce. You can hear between 20Hz-20kHz, so you want as wide a range as possible. For a tiny speaker, if it can go down to 300Hz then that's great. But make sure it isn't limited to something like 8Hz on the high end if you want the best audio quality.
Finally, there's the size of the speaker. You'd think the other factors above would tell the whole story but in my tests, that doesn't seem to be the case. A 3" speaker is going to sound a hell of a lot louder than a 1x2" speaker, even if the latter is listed as having a higher sensitivity, and has half the impedance. Perhaps this is partly due to the larger speaker's ability to play lower frequency sounds, but it seems like it's across the board that a larger speaker will be louder with the same power input.
Unfortunately if you're buying your speakers on Ebay instead of a site like Digikey or Mouser, then you're not really going to have much of this data to base your decision on, and you can't really trust what's there anyway.
So, I'd suggest getting a speaker from Digikey and paying close attention to the specs, or else it's just going to be pot luck what you get. That said... the 5pc auction looks like that would be the louder speaker. But neither looks like a very good speaker. Not a fan of the mylar.
I made him using a Teensy 3.0 + audio shield, an ultrasonic sensor, a 3W amplifier, a TLC59711 breakout, and a regulated 5V wall adapter.
This is more a proof of concept than a final product, as the kits I mention will actually use a new board I'm designing which will be based on the Arduino Pro and Wave Shield. That board is being designed as part of a commission, but I figured since it was perfect for talking paintings like this, (it will be long and thin and have the controls and SD card slot and power jack all along the bottom and have an amplifier and LED driver and DC motor controller built in) that I might as well sell a few spares. I needed something to demonstrate the concept to potential buyers though, and I had the Teensy already, so I based the prototype on that. I'll probably set up a Kickstarter in a couple weeks to take preorders once the design of the new board has been nailed down. It's not going to be marketed as a Vigo circuit, but as a generic Halloween prop controller. And , since it's based on the Arduino Pro it will be programmable by the end user in the IDE using an FTDI or ISP programmer.
The code for Vigo is actually somewhat sophisticated.
I didn't want him to repeat the same audio file every time he started up, so I seed the random number generator with the time and distance at which he first detects something blocking the sensor.
I also will have limited ram to work with when I switch to a 328, so I needed a way to select a file to play back that didn't require me to store all the filenames or indexes in ram, since there are over a hundred phrases. So I count the number of files on startup, and then choose a random index and just read the directory again until I've read that many files.
To prevent him from repeating the same phrase several times which the random number generator alone was wont to do, I keep a running history of the last 10 indices played in a ring buffer and compare new selections to that before playing them.
Vigo also does not trigger the instant you step in front of the sensor, but waits for the opportune moment to startle the unsuspecting victim... between 3..5 seconds. If the user walks away before that time elapses he won't trigger. And after he has spoken, he will wait a longer period before he begins pinging for victims again.
As for his glowing eyes, those work by detecting the maximum amplitude of the waveform since the last check, and he performs this check 30 times a second. The brightness is squared to make the fade linear, and I multiply the peak value by 4 because the volume of the audio files is at half to begin with and I wanted even softly spoken lines to light the eyes at almost full brightness.
You could add the modified wiring.c to the sketch folder. I just ran a quick test to confirm it gets compiled and linked OK. I haven't tested making any change to the file to prove that the definitions in this copy take precedence over the ones in the standard wiring.c, but I think they probably do.