<div dir="auto">A shunt regulator like LM431 would do this automatically. It's a good thing to use in a lot of places.<div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 27, 2020, 11:26 PM MTG <<a href="mailto:grant@musictechnologiesgroup.com">grant@musictechnologiesgroup.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I like the last bit, the sensing. Certainly there will be current flow <br>
and voltage drop if anyone is attached.  The bit at the beginning about <br>
"constant" current flow ... seems to me you'd be adding edges from the <br>
circuit that is active while the MIDI one is not, so that introduces <br>
it's own issues. But it's all quite clever. I like it.<br>
<br>
I saw a Yamaha memory expansion that came with it's own battery-backed <br>
SRAM (separate from the synth's native battery-backed SRAM). Having seen <br>
inside a few PIN-pads and their tendency to "self-destruct" upon <br>
tampering I was thinking this expansion utilized executable code in the <br>
added battery-backed SRAM. Devious! It didn't turn out to be that, but <br>
one's paranoia gets the mind thinking...<br>
<br>
GB<br>
<br>
On 1/27/2020 8:07 PM, Didrik Madheden wrote:<br>
> I had an idle thought about reducing power rail interference in audio<br>
> circuits by equalizing the currents that any given part of the circuit<br>
> draws at any given time. For example, a MIDI transmitter may use up to<br>
> 5 mA when transmitting. If the circuit was also set to dump 5 mA into<br>
> a dummy resistor whenever it was NOT transmitting, that part of the<br>
> circuit would always draw exactly 5 mA, and no interference would be<br>
> injected into the power lines due to changes in load. Then I realized<br>
> that different MIDI implementations might draw slightly different<br>
> amounts of current depending on which optocoupler it's using, not to<br>
> mention what would happen if no MIDI device was connected, in which<br>
> case the circuit itself would inject the exact same amount of analog<br>
> noise it was supposed to prevent...<br>
> <br>
> This is an absolutely silly consideration. At least in this context.<br>
> In secure digital devices, power analysis is actually a field of<br>
> security research, where digital devices have secrets that are never<br>
> supposed to leave the chip, but which can be recovered by measuring<br>
> fluctuations in current consumption due to different parts of the CPU<br>
> causing different amounts of power use. I've also once made a Gameboy<br>
> program that plays audio through power line interference by purposely<br>
> turning on and off the CPU's power save mode in well timed sequence.<br>
> <br>
> But I digress. Normally, this is where my train of thought would end,<br>
> and I would go think about something else. This time, however I<br>
> remembered the discussions on this list about MIDI running status woes<br>
> where a device may get unconnected and reconnected. So I thought, hmm,<br>
> could the idea discussed above actually be useful?<br>
> <br>
> Consider this: 5 pin MIDI is a 1-5 mA current loop that typically goes<br>
> through a 1.6 V optocoupler and three 220 ohm resistors. So, by<br>
> sensing the voltage after the 220 ohm resistor on the +5 V line, you<br>
> could deduce whether a device is present on the other side. If nothing<br>
> is connected, you're just seeing +5V through a 220 ohm resistor, which<br>
> should be close to rock solid. If it's transmitting, by Ohm's law<br>
> there will be at least a V=I*R=0.001*220=0.22 V voltage drop while<br>
> transmitting a byte. With a bit of margin, you could detect anything<br>
> below 4.9 V as the presence of another device. You could for example<br>
> detect this by sampling the voltage with an ADC in a suitable moment.<br>
> Or, you could use a comparator with one input set to a 0.98*Vcc<br>
> voltage divider.<br>
> <br>
> A good time to check this would be when sending active sense commands,<br>
> which are meant for exactly this thing, just not exactly like this.<br>
> <br>
> This approach would have several downsides. It can't detect if a<br>
> device has been powered off but is still connected. It can't detect<br>
> anything about thru-connected devices. It would probably fail to<br>
> produce any useful information on non-powered MIDI splitter devices.<br>
> <br>
> What it *could* do, is to provide a basic heuristic for when a<br>
> transmitting device might suitably need to refresh the status byte, as<br>
> well as potentially resend CC's. Something that would nominally not<br>
> hurt anyway.<br>
> <br>
> It's silly. It's crazy. But has something like this ever been done to<br>
> anyone's knowledge?<br>
> <br>
_______________________________________________<br>
Synth-diy mailing list<br>
<a href="mailto:Synth-diy@synth-diy.org" target="_blank" rel="noreferrer">Synth-diy@synth-diy.org</a><br>
<a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer noreferrer" target="_blank">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
</blockquote></div>