#Adventure of YM2151+YM3012+MCUs
1 messages ยท Page 1 of 1 (latest)
So, what is your question?
Reading the YM3012 datasheet more carefully, in the "Relationship between Digital Input Data and Analog Output Voltage" section, it seems to say 1/2Vdd is the center voltage, which would imply the output range is 1.25V - 3.75V. However, it's confusingly worded, so I'm not sure.
Yeah probably circuit diaram says the truth; and yes I assume it's 1/2Vdd, but I am not so sure if it goes negative voltage
those YM2151 connection diragram says that it need negative voltage so
It does show a bipolar supply for the op-amps. It could be because op-amps in those days weren't so good. However, these days, 5V single supply rail-to-rail op-amps are common and cheap.
A couple of solid inexpensive options (available in breadboard friendly DIP-8 packages) are the Microchip MCP6002 and Texas Instruments TLV272. If you're looking for higher fidelity, perhaps the Analog Devices LT1494.
โ๏ธ
Thinking about carefully using non RtR opamp, dual supply ones to single supply; because of abundance...
Given the voltage swing, any modern op-amp that can operate with a 5V (total) supply should do.
Yeah, thinking about using 4580
If I read the documentation correctly, the signal never gets near either the 0V or 5V rails anyway
Yeah, my guess is the 1.25V - 3.75V I mentioned earlier. The 4580 is a fairly old chip, but should work (it can work down to a 4V total supply voltage)
NJM4580 is still good opamp
There was an AdaFruit hint a while back pointing out that the LM741 is pretty old, and suggesting upgrading to the newer TL072. The 741 is over 50 years old, the TL072 is only 47 or so. My current go-to op-amp is the 5532, which came out in 1977. Analog just doesn't rush along like digital.
I'll try to make a design that you can hotswap
Also, how do you mix audio? Probably I could do additive mixing with opamps?
I'll usually have resistors from each source to a virtual ground point at the input of an op-amp.
Hm
In theory this will work, would it?
- think about USB power, how to reduce noises.
- can I just use biased addition opamp
Hmm at the USB noise reduction. I heard it's unusually stable for VBUS
You may need coupling capacitors if the inputs would object to being pulled toward a particular DC voltage. To reduce noise in a voltage supply, amusingly, you want the opposite concept: a "decoupling" network.
Normally USB noise will be high frequency noise, which is fairly easy to filter.
Yea, I think so.
I know there is like big caps
It ties VBUS and GND always
(also don't forget CC pin pulldowns :))
I'll often use small caps in a CLC or CRC configuration. You'll often see the same approach used for analog reference supplies in microcontrollers.
That's it in a nutshell
Although, how stable is the USB power anyway?
It depends where you're getting it. Most computers provide well-regulated 5V to their USB ports (although there's some series impedance due to polyfuses and other protection circuitry). USB chargers vary from Apple quality (solid, low noise power) to a dangerous spiky mess. USB power banks are similar, with varying performance.
something like this I guess
where R9 = 10k, R10 = 10k
Then decouple the DC offset BEFORE the amp or HPA
so it will be biased to 2.5V,
idk if the 4580 could do near 5V...
Note that I like to put a capacitor on the non-inverting input (thereby decoupling that derived voltage) or even buffer it (if I'm using it for multiple op-amps). Also note that it can be useful to balance the impedances on the inputs to minimize offset voltage, but it's not critical in this application.
yea
I'll add it on finished prods.
Actually let me ๐
something like this perhaps?
each output now have caps
(low ESR is considerable choice, but)
You don't really need minimum ESR for audio frequency work (there's plenty of series resistance anyway), but you probably don't want polarized capacitors there.
(also, sorry if I am taking up your time :C)
oh yea
้ปๅญ้จๅ,้่ฒฉ,่ฒฉๅฃฒ,ๅๅฐไฝ,IC,ใใคใณใณ,้ปๅญๅทฅไฝ็ฉๅฑคใปใฉใใใฏใณใณใใณใตใผใ๏ผฮผ๏ผฆ๏ผ๏ผ๏ผถใ๏ผธ๏ผ๏ผฒใ๏ผ๏ฝ๏ฝ็งๆ้ปๅญ้ๅ ้ปๅญ้จๅ้ไฟก่ฒฉๅฃฒ
soemthing like this would be good perhaps?
I meant adding a decoupling capacitor to ground at the junction of R9 and R10.
ahh
but I gonna add coupling for each FM input
and PCM mixing, if I were to.
(I would LOVE the PCM emulation :D)
An X7R ceramic is possibly not ideal for max fidelity, but these are low fidelity waveforms anyway, so it's not a big deal. If you want to get fancy, a film capacitor is traditional.
I'll memo it ๐
(also yes I am japanese so I use those local sellers)
(too bad TI stopped selling parts to the 2nd hand reseller, not sure why. but it just sucks)
That is annoying, especially since TI has bought many of the brands.
I think range of 100p ~ 1000p is fine?
That's pretty low for audio work
Side note: I'm fond of retro electronics and film capacitors
like this? ๐ฎ
OOOO
Nice ๐
inb4 me I do not understand OpAmps and analog way of doing this, this is first time in practise.
No, a capacitor from the junction of R9, R10, and pin 5 on the op-amp (the aforementioned non-inverting input) to ground.
That way, the voltage divider resistors do double duty as voltage dividers as well as decoupling resistors.
โญ
Yes, that's what I'd do. If I wanted to get fancy, I'd add a 100nF capacitor in parallel to the polarized one to absorb high frequency noise.
is floating pin okay for external mixing?
(R7, in this case)
so I can connect external sources, or is that should be avoided?
Yes. Since the other end is at a low impedance point (the "virtual ground"), it won't tend to pick up noise or anything.
๐
Yeah I guess I'll use this. I just need to know VBUS stable
to be honest, could tuck the ESP32 and use USB that way.
thanks!
I tend to avoid knowing much about the details of USB (it's complicated).
anyway, time to make a schematic that uses YM2151 and YM3012
Now probably I gonna ask about actual audio outputs. Probably could just feed this mixed VOUT to jack and use active speaker
or connect external HPA
(I do not consider passive speaker because....yes...)
Those two are basically equivalent. Alternatively, you could use the existing output to a tape deck, digitizer, etc.
true
One of the AdaFruit boards does use an op-amp as a low-level speaker driver. It works, but not very powerful.
...is connecting active speaker to HPA bad?
Generally yes, you don't want to put a high power "speaker level" signal to an input expecting a low power "line level" signal.
so I can integrate some kind of HPA chips like 7368
ah ok
oh YEAH
that's why there is two jacks
yeah I guess I gonna leave this project to output line level (as in opamp level), and user can connect external HPA
The 7368 is a bit of an oddball, but it should work fine (I usually use a common LM386 for simple circuitry, or something fancier like a PAM8302 for more fidelity and efficiency)
noted
(memo)
For your amusement, a noisemaker I built out of the classic SN76477 "complex sound generator" chip, along with an LM556 (basically two 555 timers in a single package) for more waveforms, and the usual LM386 as a speaker amplifier
๐
I wanna make a stackable design that can take many YM soundchips
like YM2608 and whatnot
ALL the sounds!
Yeah
But first I wanna experiment eith YM2151+YM3014
...even though my dream would be to capture YM2151 serial output, into pico or something
And then do a nesscery math, to restore 16bit audio stream to I2S
It might be easier to just emulate the YM2151 function digitally, but sometimes we just want to use the real thing (only better)
Yeah; emulation is kinda...yeah.
I just wanna use og chips because I have it ๐
But yes, FPGA replication would be fun...
(but I do not wanna see jt12)
I'm actually toying with an FPGA replication of the old unobtainable Atari Video Music chip
ooh
Probably this would be your interest?
Heh, somebody's already done it. I'm not terribly surprised.
but idk FPGA so not really my forte ๐
I got started in FPGA then lost most of my enthusiasm after getting some very rude replies in a Discord that's supposed to be helpful
:C
sad
But thanks for help, I might need them more :C
ooh
I found local seller selling TL074
But probably NJU7034
local seller sells 5532 as well
but probably that makes things interchangable between 4xxx series
but I do not know if I should use bipolar... eh
I don't think it will go above 4.0V
How would I go with converting voltage in both ways? TXB0108s?
Or can it be done with logic ICs alone?
Idea:
Have two jacks. One with Line and One with Headphone
The TXB chips might work. You may not need bidirectional conversion for such a simple interface.
It is a bidirectional data bus, so you'd need either steering logic or the aforementioned bidirectional chips
Yeah
I don't think ESP32-S3 is 5V torerant
Either
-
disable readout from YM2151
-
and use only a octal buffer to convert
-
use SIPO to access
-
enable readout from YM2151
-
TXB0108
-
MCP23S17 (?)
-
...?
Or use 74245
Hmmmmm
Maybe I should just use MCP23S17.
wish you can just, connect 3v3 over parallel expansion chip
or use TXB0108.
RevA- use MCP23017
Think about DAC
I thought you were going to use the companion YM3012 DAC.
No
Mixing with PCM, that DAC