Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Foxfire_
Nov 8, 2010

Is the heating wire flat or wound around something? If you built an inductive load, the voltage at the mosfet drain may be spiking high enough to damage it.

When it's stuck on, what happens if you measure at the gate? Do you see it at 0V and does poking it with a meter probe unstick it?

Adbot
ADBOT LOVES YOU

Foxfire_
Nov 8, 2010

polyfractal posted:

Oh, maybe it is the grounds. Originally they were all referenced together. The 12V fed two of the mosfets and the 5V switching ubec, which then fed the other two mosfets and powered the RPi through its USB. And everything was tied into the 12V power supply's ground line.

This seemed to be causing problems (after running the heaters for a minute or two the ubec would start flashing and the RPi would reboot) which I assumed meant the ubec was drawing too much current (it's rated for 5V/3A, but a cheap chinese part so I dunno, and no manual). So now the RPi is powered directly from a 5V wall wart, and the rest of the circuit is unchanged. BUT, various things tie back into the RPi's ground pins (because it made sense before), but I'm guessing that's probably an issue since the circuit has two different grounds now?

The microcontroller and the mosfets have to share a ground because when the gpio line goes high, you need it to be at least 2.5V above the source so that the mosfet switches on. The microcontroller output is relative to its own ground, so if the mosfet ground and microcontroller ground are unrelated, you're going to get behavior that depends on how the two grounds float relative to each other. (as an aside, you may not actually get >2.5V out of a worst-case rasberry pi GPIO according to some quick googling, but it's probably okay since you're unlikely to have worst-case parts)

The 12V return should go to the mosfet source pins, the 5V wall wart return, and the other 5V supply return.

polyfractal posted:

I have two heaters: one is flat and glued directly to the back of a mirror, the other is loosely wound around a piece of flat plastic. It's 30cm long and makes perhaps a dozen turns around the plastic, which is about an inch wide, and 12 inches long. So it's not really "wound" so much as zig-zagged, if that makes sense. Would that still be a problem?

Nah, it's almost certainly fine. And looking at the specs for that mosfet, it has big avalanche ratings anyway so it would survive a lot.

Foxfire_
Nov 8, 2010

Current always flows in loops. Think about where the loop is going, what things it will touch, and what it will do the them.

Current comes out of the 12V supply, flows through the heater, through the mosfet, then into the 12V return. You don't want to run those amps across through the Pi's board or IC. There is some resistance to the traces on the board and in the IC. 1. Things would get hot (P=I^2R, I is large, R is nonzero, so it'll dissipate heat) and 2. you will move the ground voltage the Pi sees (delta V=IR, I is large, R is nonzero, so there has to be some voltage drop)

On the Pi's side, some current will come from the 3.3V supply on the Pi's board, into the Pi, out the GPIO pin, into the MOSFET gate, out the MOSFET source, and will need to get back to the 3.3V return on the Pi board. That's the only current coming out of the Pi's board and it'll be just the leakage for the MOSFET gate (nanoamps). That won't cause any significant heating or shifting the Pi's ground potential compared to your start ground point.

If things were switching fast in the circuit, you'd also care about AC current vs DC current (at large frequencies inductance is more important that resistance and capacitors look like shorts, so they'll take different paths), but all the fast switching is inside the Pi board, and they've presumably designed it well enough to keep it looking like a mostly DC load.

Foxfire_ fucked around with this message at 06:22 on Dec 16, 2016

Foxfire_
Nov 8, 2010

coyo7e posted:

Yeah I think you're right, I'm getting kinda inconsistent results when trying to roll an 8-LED array in sequence so I must be missing something basic. I tried shifting around the pins and poo poo, but I think I'm just super rusty at code or something.

https://youtu.be/l43pDvvbBlI

There is absolutely no difference where you put the resistor with the way you are driving it.

What specific board/microcontroller are you using? Depending on which one it is, it's ability to source/sink current through the GPIOs will be different.

The GPIO pins are usually divided up into individual banks that share a bunch of drive circuitry. As you run more and more current through a bank, it's voltage levels will tend to degrade. For example, with a 5V VCC and no load, you might see a pin set to high outputting 4.9V. If you used the pins to supply a bunch of current to some LEDs and resistors, you will see the voltage coming out of the pin decrease. There will be a spec in the microcontroller datasheet for a minimum high voltage and maximum low voltage at a given load. And there will also be specs for how much current you can run through it before damage starts to occur (the current generates heat and will eventually burn parts of the microcontroller IC).

In the case of your LEDs, the brightness of the LED depends on the current through them. If you turn on a bunch of them and are close to the drive capability of the GPIOs, the current will drop (V=IR, lower V implies lower I for constant R), and all the LEDs will dim. I suspect uneven light levels are caused by you crossing GPIO ports so that some are heavily loaded and some are lightly loaded.

If the microprocessor can't drive enough current to do what you want, the usual solution is to use a transistor as a switch. Only nanoamps/picoamps of current will flow into the transistor gate, so you won't overload the GPIO and all the LEDs will see your full VCC voltage.

Foxfire_
Nov 8, 2010

BattleMaster posted:

It's not that I want to add a layer but that I want to justify not having a ground layer in the first place just because with my current plan I can have all but one signal be on one layer only. But if it ends up being necessary to have a ground layer and two signal layers I will design it that way.

I could try routing that one signal a long way around and avoid crossing but I'm not sure I will be able to since I have incredibly little space to work with for the entire circuit. I'll keep it in mind when I start doing the proper layout on a computer.

And by not having a ground layer, you mean that the entire bottom of the board is a nice big unbroken ground plane and you've thought carefully about how return currents of all frequencies are going to flow through it? Cause that's what you should be doing for a 2-layer board.

Foxfire_
Nov 8, 2010

DaveSauce posted:

Question on powering DC motors:

I have an application at work where I need to power a series wound DC motor. Not typical in my line of work.

A question has risen about diodes. I have a flyback diode spec'd in my design, but the power supply manufacturer has a vague recommendation for a blocking diode:

http://www.magna-power.com/support/technical-notes/getting-best-performance-ac-dc-power-supplies-abusive-environments

Scroll down to the bottom where they have sections on "back fed voltage" and "reverse voltage."

I've been told by others in my company that they have used a blocking diode based on this "spec sheet," but I don't see where it's necessary (though that is likely due to my ignorance). In my line of work, we use flyback diodes all the time for relays and other inductive loads in order to prolong the life of the switching relays. Using a blocking diode is new to me, and we only have 1 other time we've had a similar application so I don't see that as confirmation either way.

So the questions:

1) Is a blocking diode more appropriate for this, or is a flyback diode correct?
2) Would a blocking diode be in addition to, or in place of, a flyback diode?
3) Dow do I know which type of diode I need for a given application?

This is like a $15k power supply so I'd be very interested in not destroying it.

Pretty sure you want both, unless you need a very fast switching off of the motor/are super concerned about cost, in which case you should think more. You don't really need the blocking diode, but it gives you some piece of mind.

The way I read it, the back fed voltage part is concerned about (1) having a battery or cap or something that will hold the V+ rail up when the supply is off and (2) having something that will hold it above it's nominal output. Either way something is pushing current back into it and potentially damaging things. The blocking diode stops that from happening.

The reverse voltage part is saying that most of their supplies have an internal diode that will conduct if you apply reverse voltage, but it might not be big enough for whatever abuse you're applying (or it might not exist).

The peak voltage the blocking diode would be exposed while switching off the motor with no flyback would be large and hard to figure out.

The blocking diode should have high enough amperage ratings to handle your peak load + margin, a high enough voltage rating to block whatever is likely to get backfed (at least nominal output voltage + some), and low enough resistance to not waste a bunch of power.

Foxfire_
Nov 8, 2010

nvSRAM is the generic name for those kind of chips if you're hunting for parts on digikey

Foxfire_
Nov 8, 2010

BattleMaster posted:

I thought NVSRAM was when you've got SRAM backed up by a battery, not this particular configuration.

edit: I mean NVSRAM would be just fine for the application but this EERAM stuff is pretty cheap and is more compact

It covers all the types. External cap to power it, external battery to power it, and internal battery in the IC

Foxfire_
Nov 8, 2010

Anyone know a bunch about audio circuits?

I got some new headphones recently and am toying with the idea of building a DAC/amplifier for it.

Are there any major parts of this that I'm missing? It seems pretty straightforward:
- power filtering to clean up incoming USB power
- USB codec chip to deal with the computer and output a stream of L/R audio samples over I2C
- DACs to convert to analog
- Buffer amp for drive current
- Maybe another amplifier stage for volume control?

Lots of off the shelf parts and layout seems like it'd be easy.

Foxfire_
Nov 8, 2010

Lead free solder isn't to protect you from it when you're soldering it (the flux fumes from lead free solder are worse for you than the ones in leaded solder), it's a lifecycle thing for when the part is in the dump and the lead leaches down into the groundwater

Foxfire_
Nov 8, 2010

This is the current plan:

Signal Path
- USB goes into a PCM2707C and the audio data comes out as I2S. There's not a lot of options for parts here since I don't feel like doing the USB part on a microcontroller and dealing with clock recovery. Annoyingly, it doesn't look like there's a good way to do volume control from the computer with this.
- The I2S goes into a DAC with differential outputs. There's lots of these
- Audio goes into a differential in-single sided out amplifier, which spits out to the headphones. Decent selection of parts for this too

Volume control is a pot adjusting the amplifier gain.

There's also the comedy option of using a differential in-differential out amplifier since each earcup on my headphones has its own connector (the normal cable is a Y from the headphone out)

Power
- 5V USB power comes in and immediately goes through a ferrite + capacitor filter to filter incoming noise and limit what noise my circuit will emit back
- That 5V goes into the PCM2707C, which runs it through an internal linear regulator to power itself
- It also goes into an external linear regulator to drop it to 3.3V and clean noise
- 3.3V powers the DAC and the amp.
- The amp either has to have an internal charge pump (these exist), or need an external charge pump + linear regulator to make a negative rail for it

Layout
- I'm going to try to squeak by with a 2 layer board unless routing gets hairy. I think I can probably route all the signals and power on one layer and have an unbroken ground plane except for vias.
- The design separates out pretty naturally into digital and analog parts, so it should be pretty easy to keep digital return currents away from the analog stuff.

Foxfire_
Nov 8, 2010

Connect it to a GPIO to trigger an ISR that turns on the watchdog and spins until that resets it?

Foxfire_
Nov 8, 2010

The Rigol 1000Z's say they are 100Vrms for CAT II, the Siglent says 400V pk-pk.

Either will probably work when paired with an appropriate attenuating probe, but both would be damaged by a 1:1 probe, and the selectable attenuation probes that come with them are almost certainly not rated for that much voltage either.

You should not be working with mains by jabbing probes into wall sockets.

Foxfire_
Nov 8, 2010

ate all the Oreos posted:

I've been doing a lot of home circuit board makin' lately and it's pretty tedious and wastes a lot of toner / toner transfer paper / transparency paper so it's got me thinking of other ideas. I remember someone in this thread mentioned that if you have a laser cutter / etcher, you could spraypaint your board black and then burn off the areas you want etched. I don't think I have a laser powerful enough to do that in a reasonable amount of time, but I do have a violet laser and in my experiments 405nm "violet" LED's are close enough to UV to work on UV-sensitive etch resist. My other idea was to get a ~12" LCD screen and shine UV light through it, then use a lens to scale it down. I figure after being scaled down the diffraction around the pixels will be enough to not wind up with a grid of unexposed resist in any large areas but I'm not sure. Anyone tried anything like this?

e: I'd only need a feature size down to like half a mm for what I do, though if I can get better than that great :shrug:

Embrace the lovely chinese boards! http://dirtypcbs.com/store/pcbs

Foxfire_
Nov 8, 2010

How would you know if its spitting out enough UV to be an eye hazard?

Foxfire_
Nov 8, 2010

You can totally solder a QFP by hand; it's much easier than it looks. It can be easier than an 0805 because the chip's heavy enough that surface tension won't flip it into the air so you don't have to hold it while you solder.

- Position chip over the pads. Check that all the pins are nicely centered.
- Put a little solder on your tip, touch it to a corner pin. The joint will suck, but it will hold it
- Flux across the pins on another side
- Put a little solder on tip, touch all the pins with flux, reloading the tip as necessary. Don't worry too much about bridging things
- Repeat for all sides
- Flux on all pins
- Touch each pin with a clean tip to reflow it, any bridges should clear.


Also, PIC's are fun, but the little ones are architecturally very different from most things and not high-level language friendly at all. Apparently Microchip has a C compiler for the little ones now, but that's fairly new. Usually you write assembly directly for anything smaller than a PIC18.

Foxfire_
Nov 8, 2010

MRIs are expensive enough that I wouldn't hack together something and then find out exactly how ferromagnetic it is.

Also, you don't want to be the guy that got a soldering iron stuck to the magnet and had to have it shut down. Apart from cost/downtime, there's coolness factor to consider. One of the NMRs at my school's still on the same shot of current from the 70s. Vintage electricity's way better :colbert:

Foxfire_
Nov 8, 2010

Aurium posted:

Hydrogen peroxide works very well for speeding up ferric chloride for etching copper circuit boards.

The downside is drugstore the hydrogen peroxide you can easily buy is very diluted, so you need to add a bunch, which also dilutes the etchant.

I prefer using an aquarium bubbler for etching boards though. That way you don't end up making more and more dilute etchant. The highest convenient hydrogen peroxide concentrations are only 30%, which is still a lot of water to be adding. On top of the fact that the hydrogen peroxide breaks down into oxygen and yet more water.

>30% is getting towards the concentrations where mixtures with organic stuff will spontaneously ignite or explode, so there's a pretty good reason why drugstores don't sell it.

Foxfire_
Nov 8, 2010

Three-Phase posted:

Got an IC question: are there any chips that can be utilized (probably with a few external caps/inductors) to take an unregulated D.C. input voltage and generate a regulated +V and -V output?

I am looking at building a very simple PWM inverter for demonstrating three-phase measurements on a power quality meter without needing a real three-phase power source. (I know I could also just take an offset PWM signal and use a high-pass filter.)

Aside: I found that Digikey sells 4.5kV 3kA thyristors for only about $800 each. :science:
http://www.pwrx.com/pwrx/docs/tdk4_30.pdf
I'd love to construct a 4160V soft-starter that was run off a little Arduino. Of course you'd need a separate gate firing board you're not going to connect an IO pin directly to the gate.

If you only need moderate amounts of power and the output can have some ripple, you can get ICs that have a pair of charge pumps that'll generate +/- supplies from one DC input.

Foxfire_
Nov 8, 2010

I'm not qualified, but no one else is answering, so I'll give it a shot.

Based on your DAC, you're trying to hold a single ended signal to <0.3mV accuracy? That seems ambitious. You're going to need very good layout to protect those traces and think hard about where all the return currents are going. Probably your 3.3V rail will have more noise on it than that, even with the decoupling (that should be easy to slap together and measure to get a first look).

R4 will increase the phase margin of U3B, it probably won't oscillate/blow up. Actually figuring out the transfer function and how quickly it damps out at various frequencies would be hard and it's probably easier to build and measure.

Foxfire_
Nov 8, 2010

ate all the Oreos posted:

I'm laying out a board with a bunch of analog stuff and a few fairly rapidly switching digital signals kinda nearby. I've made the bottom layer entirely ground plane, and put a ground plane on the top layer too to surround as much of the analog stuff as I can. The analog side runs off a separate low-noise LDO and has lots of bypassing with different sizes and dielectrics of capacitor. I've also stitched together the two planes all over the place so I don't get any inadvertent loops on the top layer (and also I find it weirdly relaxing to do in kicad since you have to lay out each individual via manually, so it's like crocheting sorta???)

Anything else I should consider? I've never really done a board with a lot of analog stuff on it before so I'm kinda massively over-designing this. Will all this via stitching come back to bite me in the rear end somehow? I don't think the added stray capacitance will be that much of a problem since the fastest signal is only around a couple MHz and I've put it off to one side along a short track. The only other thing I can think of is that it will make it a pain to solder due to the heat sinking, but I can handle that.

Consider where all your return current is going to flow in the ground plane and make sure none of the digital return paths cross the analog parts. The AC return current will flow underneath the outgoing trace if it can. Splitting the ground planes is pretty unnecessary if the layout is good. No current will want to flow between the sections anyway.

Unless you told it different, Kicad defaults to putting thermal relief on all your pads, so that should be okay.

Foxfire_ fucked around with this message at 10:18 on Apr 28, 2018

Foxfire_
Nov 8, 2010

How much latency do you believe is noticeable? USB MIDI latency vs keyboard is unlikely to actually be noticeable by humans

What input can your DJ software actually take? Being a USB MIDI device is a not-insignificant amount of software. Being a USB HID device (mouse/keyboard) is easier, but still a lot of work to handle enumeration to the OS. Easiest way to attach via USB is with a FTDI chip emulating a serial port, but you would need to make your DJ software actually react to the serial port.

Semi-comedy option since you mentioned that normal keyboards work as triggers: PS/2 keyboards are not horribly complex to implement, so that would work if your motherboard has a connector. Or run it through a PS/2 to USB converter (will introduce latency, but you probably actually don't care)

Foxfire_
Nov 8, 2010

You could do it with the encoder edges feeding a counter instead of polling them directly.

The microcontroller would periodically read and reset it, then act on knowing the new wheel position and velocity.

Foxfire_
Nov 8, 2010

mobby_6kl posted:

I just received a usb 5V->12V boost converter to charge my tablet off my non-USB-C powerbank. It's looks like this one: https://www.ebay.com/itm/USB-DC-5V-...ksid=m570.l1313

Supposedly it's up to 0.8-1A @ 12V which is below what the stock charger does but should've been good enough to slowly top up the battery. But actually it only supplies ~180mA when the tablet is in sleep mode and charging, and goes to just above 200 when it's on before it starts buzzing and shuts off.

I popped the cover off and part of the coil was broken off. I didn't see the missing piece anywhere so I guess it was already missing. Could this be causing the issue? I don't really know enough about how it works to know.



The chip is Feeling Technology FP6293: http://www.feeling-tech.com.tw/km-master/ezcatfiles/cust/img/img/24/fp6293v062.pdf

The chip has a configurable current limit at I=48000/R3, which is 41k so 1.17A. What is not really clear is if this limits the input current or the output, but even if it's on input, it should be ouptutting ~0.5A rather than less than 0.2.

What are you using on the USB end? <= USB2 is only rated to deliver 100mA baseline, extendable up to 500mA if the device asks and receives permission to do so.

Frequently USB hosts don't actually enforce anything because it's annoying to build the circuits to do it, but 0.8A @ 12V is about 2A @ 5V, so it's not super surprising that drawing that doesn't work. It's also exceeding the spec by enough that I'd start to worry about melting insulation off cables.

Foxfire_
Nov 8, 2010

If you draw a schematic, we can probably explain what is going on. You are feeding the comparator output into a GPIO pin on a microcontroller? Probably there is a pull-up inside the uC.

Foxfire_
Nov 8, 2010

Also depending on how fast it comes down, plan for having water condense out on your electronics when they're cold and the air is warm and humid.

Foxfire_
Nov 8, 2010

ALLPCB is fine, their marketing is a little scummy though. They like to spamvertize message boards and have like 20 different storefronts that all map to the same underlying company to try to slurp up traffic. Used them once since they do aluminum core boards in prototype quantity.

Foxfire_
Nov 8, 2010

poeticoddity posted:

How do you like the aluminum core boards? I never looked into them with much detail, but I've got some high-wattage LED project ideas that might benefit from that if they're suitable.

They did what I needed to do, but there was barely anything on them. It was a LED, a protection diode, and two connectors. All the drive electronics were on a different board. It would be hard to put anything complicated on one since they only have one layer (the reverse is for clamping to a heatsink with thermal compound)

It was for mounting one of these LEDs and running 1.5A through it. The manufacturer's stock board just has pads that were really annoying to get wires onto. LED manufacturer had detailed dimensions for pads, soldermask, and paste, so I was just copying that.

Foxfire_
Nov 8, 2010

You can buy a reel of resistors for like $50

Foxfire_
Nov 8, 2010

It's not like lead free solder is particularly hard to work with or anything. Hobbyist stuff is just as likely as commercial stuff to end up in a landfill leaching into groundwater, so use lead free.

Foxfire_
Nov 8, 2010

Search for battery holder. You can buy contacts separately from housings

Foxfire_
Nov 8, 2010

I had a battery charging circuit with a part wrong. When the board tried to switch from wall power to charging the battery, it shorted the battery terminals together. A decent lead acid battery can surge a few hundred amps.

All the soldermask above the traces the current went through boiled off and left shiny copper behind. Battery didn't explode though! (The board actually still worked after replacing the FET that melted. The battery did not survive)

Foxfire_
Nov 8, 2010

You have a +5V voltage supply. The circuit in it will maintain a 5V difference between the +5 and its ground, except that it was designed to always have some amount of current flowing and its regulation becomes unstable without it. Normally this load would come from the computer, so it wouldn't be wasted. On your system, you're going to stick in a resistor instead and turn it into heat.

You think that that minimum required load is 10W. 10W / 5V is 2A. So you're trying to find a resistor that will allow 2A to flow through it when exposed to 5V and not melt in the process. The less resistance the path has, the more current will flow. A wire would let a lot of current flow. The air (high resistance) won't let very much at all flow.

The relationship that describes this is Ohm's law: V (voltage drop across a thing) = I (current through the thing) * R (resistance of the thing)

Filling in your numbers: 5V = (2A)*(R). A R of 2.5ohms will have 2A go through it

If you want a feel for how hot it will get, a LED bulb that you would put in a desk lamp dissipates about 10W. The resistor itself is unlikely to get hot enough to damage anything as long as the inside of your case has airflow.


Also, carefully unplug your supply, then tape up or otherwise shroud the exposed wall power pins on the other side of the entry plug. You're going to go to unplug the thing and zap yourself. It also should really have a fuse in the power entry if there isn't one in the PSU.

Foxfire_
Nov 8, 2010

Radio du Cambodge posted:

I'm working on what I thought would be a simple project and keep running into stumbling blocks. Basically I'm trying to make a circuit that lights up a bunch of LEDs when triggered by an audio input, specifically a synthesized kickdrum. Like an LED strobe but light tied to an audio pulse instead of a steady beat.

Power is coming from a standard 9V/1A wall-wart. The LEDs I scavenged from dollar-store work lights, basically four arrays of 24 little white LEDs each. They're all wired up in series, going only through the resistor built into the first array (very low resistance, I think 6-10ohms which surprised me), not sure that makes sense so I drew a little diagram. I'm using a 5V relay and a 386 audio amplifier IC. I have a 100uF capacitor between +9V and ground. Simplified this schematic: I wired the 386 correctly and the audio ground is attached, etc.



What I have right now works, like it does turn on the lights when I hit the kick drum, it's just kinda weak. The LEDs are way less bright than when I've just hooked them up to the power supply. It was way better when I had it on a breadboard, and for a few minutes after I soldered it. I'm confused because my understanding is that the relay is just activating a physical switch, so when it makes contact shouldn't the LEDs be exactly as bright as if I just had it wired straight up to a 9V supply?

I'm thinking maybe the audio amplification is robbing power from the LEDs. Or I somehow damaged the LEDs, maybe they need a higher resistance (I have lots of experience building circuits from schematics I find online, but current and voltage and power calculations are terribly confusing when I have to play with them myself). Or I damaged the relay somehow? By hitting it with a signal that's larger than 5V? Any ideas? Thanks in advance.

Let's start with the LED board!

The bright green parts have copper under them. The dull green is where the copper's been etched away.

So if you follow the bright green parts, all the LEDs are wired in parallel.

Following it back down to around the wires, one side goes across the resistor, then into where the wires attach on the left (assuming the wire bends around and comes into that solder blob from the back side). The other side of the LEDs goes down under that middle of the knoby thing and into that solder blob. Is the solder blob where the wire on the right attaches? (What's the knob do? Do you turn it to make the light brighter/dimmer or is it an on/off switch?)

The resistor has "2R0" written on it, which means it should be a 2.0 ohm resistor.

Supposing the LEDs have a forward voltage drop of about 2.5V (typical for a white LED), applying 9V would do:

9V in, 2.5V drop over LED, the rest drops over the resistor. So V(across resistor) = 6.5V

V(across resistor) = I(through resistor) * R(of resistor): 6.5V = I * 2ohms => I=3.25A=magic smoke

So that's not what's actually happening. What does the back of it look like and where do the wires actually attach?


On to the control parts:


This is what you have?

When it's idle, the drum signal is holding steady with some offset relative to everything else. When you hit it, it oscillates some around that steady state value. The signal is weak and can't source very much current.

The wire goes into C1, which passes only the high-frequency parts of it. The DC part is blocked, so the other side will be at 0V when the drum isn't sounding and oscillate above/below 0V when it is. The signal is still weak.

Then it goes into RV1. This is the first thing that seems wrong to me. As you turn the pot knob, the resistance between the audio signal and ground goes down. It's lowering the amplitude of the audio signal by drawing current out of the pickup. This would typically be connected like this:


where the pickup is driving into a constant load and the amplifier input is on a resistor divider.

Then the oscillating signal goes into the amplifier. The amplifier does this:

Output = Input * 20 + (half VCC)

The output can also source/sink more current before it distorts.

For 0V input, it outputs a 4.5V output. For a -100mV input, it outputs 2.5V. For a 100mV input, it outputs 6.5V

So now we have an oscillating signal with bigger amplitude that can drive current and is centered around 4.5V

C2 doesn't do anything particularly interesting (changes the frequency response some)

C3 is similar to C0 and blocks the DC part of the signal. So the output heading to the relay is oscillating around 0V instead.

Overall Example:
A signal from the drum oscillating between -80mV and 120mV would be output as a signal oscillating between -2V and 2V. It'll be oscillating at audio frequencies (10-20kHZ)


The relay isn't going to be particularly happy with that. You're effectively trying to open and close the relay hundreds-to-thousands of time per second. Also, a relay isn't a good choice for that switch in general since you'll only get about ~100000 cycles out of cheap one.

What do you want the output to look like? On for as long as the amplitude from the drum is above a threshold?



Foxfire_ fucked around with this message at 06:43 on Oct 20, 2018

Foxfire_
Nov 8, 2010

Don't put 9v across your LEDs that were designed for 3v power, it will destroy them.

Either power them from 3v, add another current limiting resistor sized for 9v input, or put 3 modules in series so each one gets about a 3v drop (this is a bad solution, they will be uneven brightness or possibly damaged depending on variation in the LEDs)

For fixing the control, one easy way would be to run the post amplifier signal into a comparator, run that into a oneshot, and then use that to switch power to the LEDs with a mosfet

Foxfire_
Nov 8, 2010

For a drum that would probably work okay. It depends on what you want to have happen on sustained notes (that a drum can't really play).

If you plugged it into a guitar and played a chord, what should happen:

- One flash of light at the start of the chord, then off: Use a nonretriggerable oneshot (like a 555)
- LED on at 100% as until the volume drops below some level: Use a retriggerable oneshot
- LED intensity proportional to volume: Use an envelope follower circuit to filter the amplifier output, eliminate the relay/mosfet, and drive the LEDs with a big beefy buffer amp

Foxfire_
Nov 8, 2010

Steppers can go quite small.

For example, The smallest, cheapest, crappiest 4096 step motor on digikey draws 0.5W when stalled

If you're willing to have a wall plug, you should be fine. It'll be hard to get months/years out of a couple AAs though

Foxfire_
Nov 8, 2010

I'm ~95% sure it's impossible with just passives. I think you can prove that for any arrangement of resistors, capacitors, inductors, and ideal voltage sources, every point in the circuit has a constant voltage in the limit as t->infinity. Passives can't add AC energy and you need something to compensate for heating losses.

I don't think LEDs can add AC energy either.

Foxfire_
Nov 8, 2010

longview posted:

Here's an interesting problem I found last night:
I have an audio processor board I designed, and it was producing horrible distorted sound on the speaker outputs (not random noise. The line outputs are built with the same amplifier, hookups etc. and were fine.

The speaker outputs are powered using a LM4871 BTL speaker driver, and the line outputs are generated using a LM4861 which is the same part but lower power.

On the outputs I put 600 ohm ferrites (2A DC rated) + 10 nF decoupling (cap on the external side).

Basically looked like this:

(Equivalent circuit)

The outputs of the amplifier were perfectly fine on the scope when running a sine wave test signal, but measuring the voltage after the ferrites there was horrible crossover-like distortion clearly visble on the scope.
Bypassing the ferrites resolved the problem entirely (I also removed the caps first, they had no significant impact).

Best guess:
The ferrites are operating in their inductive frequency range, and were saturating because they're not really meant for that.
When the current reverses, they discharge their stored energy which is absorbed by the speaker.

Any thoughts?

What are you using the ferrites for? Reducing EMI? If it's a hobby project, just cut them. Or replace with a real RL low-pass.

Ferrites do some interesting nonlinear stuff from hysteresis in the magnetic bits.

Adbot
ADBOT LOVES YOU

Foxfire_
Nov 8, 2010

$5 says the next classes lecture starts with "Did anybody find a way? No? Well it turns out that those are all passive components which is a grouping of the parts that can't do that. Next, let's talk about active components, which can"

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply