Jump to content
Sign in to follow this  
Master_Scythe

IC 'Logic Level'

Recommended Posts

Hey guys, I'm messing with one of these.

http://www.elserw.com.pl/baza/PDFy/YDA138.pdf

 

Now I'm trying to set the input gain to be max.

Vol 1 = Pin26
Vol 2 = Pin27

Digital Amplifier Gain Setting
VOL[1:0]    L,L     L,H     H,L     H,H
Gain        36dB    30dB    24dB    18dB
In Sens     0.14V   0.28V   0.56V   1.12V
In Imped    12.1kΩ  22.0kΩ  37.1kΩ  56.5kΩ

I know that usually low level (logic low) means zero and high level (logic high) means one; but on an IC like this, how does that work?

 

Since I need Pin 26 and 27 Low; does that mean ground?

If so, what is High? is it VCC? or anything above 0v?

and... what 'level' is leaving the pins open? (which is what I think they are); since no voltage, is that Low?

 

Thanks guys.

Edited by Master_Scythe

Share this post


Link to post
Share on other sites

Depends on the type of IC, fab process, and what voltage it runs at. Some use a reference voltage (either the power input or a dedicated pin)

 

The old TTL stuff that operated at +5V, generally it was assured low < 1.8 high > 3V (as an example, actual figures would be different).

 

Fried it... good idea to read the datasheet through, ensure any suggested precautions or special configuration requirements are being met.

  • Like 1

Share this post


Link to post
Share on other sites

I'm too tired to look now. BUT, I think the reason you fried the chip is not because of what you put on the Vol1/2 pins, but rather that you didn't put any protection on the input signal and thus fried your chip (Imagine a DC signal going in and no protection there so it mega-amplified it and fried the chip.

 

I'll look again tomorrow ok? If you get an answer before then, awesome.

 

AD

  • Like 1

Share this post


Link to post
Share on other sites

The voltage thresholds for logic high and logic low are in the datasheet:

 

Input terminals for control High level input voltage VIH2 >3.5 V

Input terminals for control Low level input voltage VIL2 <1.5 V

 

For safety, you should never assume that a pin is internally current-limited.

 

Thus, to fix a pin low, connect it to ground through a pull-down resistor, 1k should do the trick.

  • Like 1

Share this post


Link to post
Share on other sites

They're cheap (around $10) and I was excited to 'try it', I knew i bought more than I needed,and I knew the risk. so frying it was 'disappointing' but not upsetting.

I've always 'rushed in' which mistakes arent going to be expensive. I read what I thought I needed and went to work!

 

I still have one channel to play with and test; its 2Ohm stable up to 75% on the POT, played 0db amplified dubstep for half an hour and didn't even get warm. (was TRYING to work it hard)

At 1 ohm, anything above 50% on that pot throws it into protect mode.

 

 

They're these guys

GF1602-MS-04.jpg

 

25W real RMS @ 4Ohm @ 13v (less than 1% THD) bloody cool little things. (buck converting 12v-13.3v; Max VCC is 14)

I'm kinda excited I found something that 'beats' the TA2020 chip Lepai is using everywhere.

 

 

Ahhh, i didnt know thats what I was reading; now i do! thanks :)

VIH and VIL, I wont be forgetting that :D

 

So if logic low is <1.5 V, does that mean making sure they're open (aka, cutting them) is also 'low'?

 

OK, so since I know VIH is >3.5v, I assume there's no harm in probing them with my multi, while running, to see what they're actually currently at? Unfortunately the board has a very solid black silicone layer and traces (outside the VCC\Ground trace, which is deep) aren't visible.

 

 

One thing I did learn from that data sheet is to trust my brain sometimes (what ive learned) rather than what is visible.

 

In the data sheet, the 'dot' on the chip, is exactly where it is IRL...... but usually the 'dot' means the bg one in the middle.

 

I assumed Dot in top left meant dot in top left; that didnt break it, I was actually lucky. what I did was find the 'MUTE' pin. tap on, tap off. So on top of learning what high and low meanI learnt that regardless of if the picture is perfect, any sort of'marking' indicated the central indent on one end of the chip. I'd been taught that, I just trusted the diagram too much. lol.

Edited by Master_Scythe

Share this post


Link to post
Share on other sites

So if logic low is <1.5 V, does that mean making sure they're open (aka, cutting them) is also 'low'?

Not necessarily, and nearly impossible to tell without knowing how it's wired internally.

 

Some inputs have a characteristic known as "tri-state", where the circuit recognises that the input is driven high, driven low, or is in a high-impedance (or high-Z) state.

 

For an input that is not a tri-state input, there are a couple of possibilities. The IC may have an internal pullup, in which case leaving the pin disconnected is the same as it being logic high. The IC may have an internal pulldown, meaning disconnected = low. The third and most common scenario is that the pin fluctuates to environmental factors, like the pin acting as an antenna, your body touching the pin, transients, gate leakage within the chip, etc.

 

Therefore, the safest option is to use a pulldown to force logic low, or a pullup to force logic high.

 

OK, so since I know VIH is >3.5v, I assume there's no harm in probing them with my multi, while running, to see what they're actually currently at?

Spot on.

  • Like 1

Share this post


Link to post
Share on other sites

Is a 'pull down resistor' the same as a resistor? (the name just comes because of the job it's doing?)

And why 1k-ohm? Im just trying to learn what I can; what made you come to that value?

 

 

Damn, so that data sheet doesn't tell you if it has an internal pull up or down? That SOUNDS like an important detail to leave out if you were building a circuit (because its two less traces you'd need if you want HH or LL, depending).


BUT, I think the reason you fried the chip is not because of what you put on the Vol1/2 pins, but rather that you didn't put any protection on the input signal and thus fried your chip (Imagine a DC signal going in and no protection there so it mega-amplified it and fried the chip.

 

Considering it's on a little amplifier board with coupling capacitors and the lot, does this still apply?

If I understand what I'm trying to do, compared to what you're saying; My input signal from my phone is too much for the amplifier to handle?

You mention DC signal; where would that come from?

 

I suppose the phone is putting out an already amplified headphone signal technically... so In 0.14v senitivity might have been too much and popped it?

 

Am I better running at a different Gain?

 

I'm just wanting maximum output; THD below 10% is fine (yes, ten).

It's an outdoor boombox project using some 4ohm car speakers in custom 0.5cuft boxes tuned to 95hz.

and if you're curious; it will eventually be controlled by this guy:

http://www.ebay.com.au/itm/141349215333?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

 

 

PS... who colored my chart? lol.

Edited by Master_Scythe

Share this post


Link to post
Share on other sites

Is a 'pull down resistor' the same as a resistor? (the name just comes because of the job it's doing?)

Yep. Nailed it.

 

And why 1k-ohm? Im just trying to learn what I can; what made you come to that value?

We want to limit the current through the junction to 1-5mA.

 

R = V/I

 

5v / 0.005A = 1k

5v / 0.001A = 5k

 

 

Damn, so that data sheet doesn't tell you if it has an internal pull up or down? That SOUNDS like an important detail to leave out if you were building a circuit (because its two less traces you'd need if you want HH or LL, depending).

Not directly. But notice that in the example application diagrams, the VOLx pins are always connected directly to REFA, the output of the chip's internal 5v regulator. They don't use a pullup. So the gate clearly doesn't sink current (or that configuration could toast it).

 

So the gate it likely a source. If you draw that current without a limiting pull-down resistor, and there is no internal protection on the IC, you *can* smoke the gate.

 

Best practice is always to use pull-up/pull-down resistors on digital inputs like that.

Share this post


Link to post
Share on other sites

 

Is a 'pull down resistor' the same as a resistor? (the name just comes because of the job it's doing?)

Yep. Nailed it.

 

And why 1k-ohm? Im just trying to learn what I can; what made you come to that value?

We want to limit the current through the junction to 1-5mA.

 

R = V/I

 

5v / 0.005A = 1k

5v / 0.001A = 5k

 

 

Damn, so that data sheet doesn't tell you if it has an internal pull up or down? That SOUNDS like an important detail to leave out if you were building a circuit (because its two less traces you'd need if you want HH or LL, depending).

Not directly. But notice that in the example application diagrams, the VOLx pins are always connected directly to REFA, the output of the chip's internal 5v regulator. They don't use a pullup. So the gate clearly doesn't sink current (or that configuration could toast it).

 

So the gate it likely a source. If you draw that current without a limiting pull-down resistor, and there is no internal protection on the IC, you *can* smoke the gate.

 

Best practice is always to use pull-up/pull-down resistors on digital inputs like that.

 

 

I'm going to preemptively thank you for being awesome; I'm learning tons and you're making it easy to understand. Everyone has to start somewhere; and this is a pretty good place :D

 

 

I was going to ask where you got 5v from considering Vcc is 13.3~13.6v in my example, but I notice pin 41 is called 'reference' at 5v.... OK cool. still learning :)

 

and while R = V/I, I knew that, for the sake of current limiting.... how do we know how much voltage its shedding? Or are we pulling it to ground, just at low currents?

 

Let me try and noob translate your post....

You're saying that the volume pins in all the examples are connected to reference... internally?.... meaning they've been internally set to be HH in the examples?

So when the chip is powered.... it gets 5v? (or are the examples external? I'm not confident in my schematic reading yet, I can do the basics....)

 

Sink current is where I got stuck... is it simply that with no limiting resistor, pulling those pins to ground can allow an unregulated (current) 5v through that gate? Was that the lovely crackle I heard when I did it?

 

The bit where you lost me entirely is calling the gate a source (if I understand 'gate' means the internal trigger being activated by the pins, yah?)

What do you mean by source? Do you mean voltage source?

So just 'being on' those pins will probably see 5v (from the internal connection) and my resistor from that pin(s) to ground will simply be discarding some voltage?

 

What does this research teach us about leaving them disconnected? Anything? That they'll be 5v (thusly HH)?

 

 

I ask because with all these asthma meds this week, I'm like a bloody paint shaker, and also pins that small with my eyes is painful at best. If I can nip them off rather than try and solder between such small pins it'd be very nice.

 

though I still haven't measured the voltage yet; it might already be LL.

 

 

Assuming I manage this, will I have to be careful with my audio input? is my mobile at maximum output likely to damage something if I manage to get the sensitivity down to 0.14V\12kohm? should I be aiming for a different level? or is it all 'Just gain' and all I risk is noise and distortion?

Edited by Master_Scythe

Share this post


Link to post
Share on other sites

I'm going to preemptively thank you for being awesome; I'm learning tons and you're making it easy to understand. Everyone has to start somewhere; and this is a pretty good place :D

My pleasure. :)

 

I was going to ask where you got 5v from considering Vcc is 13.3~13.6v in my example, but I notice pin 41 is called 'reference' at 5v.... OK cool. still learning :)

Yeah. For this device, on this datasheet, your power source is referred to as Vddp. See page 14.

 

The control inputs (VOLx, MUTEN, HP, MODEx) have a different rating, Vin3, which is Vss+0.3 through Vreg+1.

 

On page 15, we see that Vreg comes from the pin REFA, and is nominally 5v, typically 4.5<x<5.5.

 

 

and while R = V/I, I knew that, for the sake of current limiting.... how do we know how much voltage its shedding? Or are we pulling it to ground, just at low currents?

We assume that the voltage on the digital circuits is 5v, as the rating on those pins is Vin3. So at most, the potential difference between the gate and Vss is 5v. Ergo, through a 1k or 5k resistor, even in the most catastrophic short circuit condition, the most current to flow through the gate, through the resistor to Vss is 1-5mA.

 

The benefit is that, rather than melting everything and dying horribly if something isn't connected properly, it just won't work.

 

Let me try and noob translate your post....

You're saying that the volume pins in all the examples are connected to reference... internally?.... meaning they've been internally set to be HH in the examples?

So when the chip is powered.... it gets 5v? (or are the examples external? I'm not confident in my schematic reading yet, I can do the basics....)

The pins themselves will be connected to some *part* of a circuit operating at Vreg. In the example applications, they are externally connected to Vreg.

 

Sink current is where I got stuck... is it simply that with no limiting resistor, pulling those pins to ground can allow an unregulated (current) 5v through that gate? Was that the lovely crackle I heard when I did it?

Potentially. Like I said, without knowing the internal schematic it's nigh-on impossible to know for sure.

 

AD could also be right, I don't know enough about the part to say for sure.

 

The bit where you lost me entirely is calling the gate a source (if I understand 'gate' means the internal trigger being activated by the pins, yah?)

What do you mean by source? Do you mean voltage source?

So just 'being on' those pins will probably see 5v (from the internal connection) and my resistor from that pin(s) to ground will simply be discarding some voltage?

Essentially yes. The inputs are probably nominally high. They are externally tied to Vreg to keep them stable.

 

To set logic 0, you need to lower the voltage. To say the pull-down resistor "discards some voltage" isn't really correct. Current flows through the resistor, causing a voltage drop across some components within the IC, which will switch off a transistor somewhere upstream.

 

It discards some current as heat, you can't really "discard" voltage.

 

What does this research teach us about leaving them disconnected? Anything? That they'll be 5v (thusly HH)?

Yes. Pretty much. But leaving them floating can have unpredictable, if intermittent problems. Tie them high, or pull them low through a resistor.

 

I ask because with all these asthma meds this week, I'm like a bloody paint shaker, and also pins that small with my eyes is painful at best. If I can nip them off rather than try and solder between such small pins it'd be very nice.

 

though I still haven't measured the voltage yet; it might already be LL.

It's unlikely they're already 0's.

 

Assuming I manage this, will I have to be careful with my audio input? is my mobile at maximum output likely to damage something if I manage to get the sensitivity down to 0.14V\12kohm? should I be aiming for a different level? or is it all 'Just gain' and all I risk is noise and distortion?

I don't do analogue electronics! I'll defer to AD on that one.

Edited by SquallStrife

Share this post


Link to post
Share on other sites

OK cool that's cleared a lot up.

The voltage drops because it just (or, it will) flows back to ground through the resistor; correct? The resistors job is to limit the current, and thus, voltage drop. yes?

 

We can assume that I PROBABLY fried the chip by hard wiring the pins to ground because there was no current limiting; meaning I could have not only fried the volume gate, but possibly Vreg too... am I thinking right?

 

 

 

 

So my process now will be:

 

Measure pins with multimeter (confirm roughly 5v)

If 5v, connect to Ground (My DC power ground, yes? It doesnt have to be an IC ground pin, does it?) using a 1k-ohm resistor.

(should I pick one up somewhere between 1 and 5kohm? or is 1kohm already more than safe)

 

 

 

If this works; my remaining question is analogue in regards to the input sensitivity\impedance. I'm fairly into audio amplifiers and sound as a whole, so I'll start googling this right away and see what I can uncover. I'll try find the nominal impedance to, say, 'plug my iphone into an amp' in internet slang\noob terms. lol. Hopefully uncover some forum discussions.

 

Thanks heaps Squall; means a bunch to have so much help. I'll see if I can answer my input question or if AD beats me.

Share this post


Link to post
Share on other sites

OK cool that's cleared a lot up.

The voltage drops because it just (or, it will) flows back to ground through the resistor; correct? The resistors job is to limit the current, and thus, voltage drop. yes?

Yes.

 

We can assume that I PROBABLY fried the chip by hard wiring the pins to ground because there was no current limiting; meaning I could have not only fried the volume gate, but possibly Vreg too... am I thinking right?

Potentially yes.

 

 

So my process now will be:

 

Measure pins with multimeter (confirm roughly 5v)

If 5v, connect to Ground (My DC power ground, yes? It doesnt have to be an IC ground pin, does it?) using a 1k-ohm resistor.

(should I pick one up somewhere between 1 and 5kohm? or is 1kohm already more than safe)

By the looks of it, all the Vref and *Vss pins are connected to a common ground plane, so yes.

 

1k is plenty safe. That or 2k2 are my "go to" value for pulldowns, just depends what I have nearby.

 

If this works; my remaining question is analogue in regards to the input sensitivity\impedance. I'm fairly into audio amplifiers and sound as a whole, so I'll start googling this right away and see what I can uncover. I'll try find the nominal impedance to, say, 'plug my iphone into an amp' in internet slang\noob terms. lol. Hopefully uncover some forum discussions.

 

Thanks heaps Squall; means a bunch to have so much help. I'll see if I can answer my input question or if AD beats me.

No probs. :)

Share this post


Link to post
Share on other sites

Nice work guys.

 

Input impedance is typically covered by the device you are connecting.

 

They tend to have high impedance. In part to protect themselves.

 

But otherwise, I've only skimmed after I saw Squall answering your questions. But the 'dot' on a chip represents "Pin 1".

 

AD

Share this post


Link to post
Share on other sites

No probs. :)

 

 

 

OK so turns out the dots ARE correct and I found my two pins with 4.99v on them... should I be measuring a drop when I have the resistors in place?

I mean, I have the resistor on the two pins, and if I probe from ground to the pins I still see 4.5v.. it's not shedding much.

 

Should I use a significantly less resistive resistor?

Edited by Master_Scythe

Share this post


Link to post
Share on other sites

so I paralleled 2x 1k resistors and still no change..

So I figured, this is silly, This one is already toasted (the chip I'd already killed finally burst into HUGE flames, lol. That was fun). Lets try the unlikely; its broken as is.

 

So, a pair of tweesers later and I ripped the two pins off....

guess what? They pull low.

 

So now my IC has a blank spot missing 2 pins, and its FUCKING LOUD. holy HELL that's loud!

 

So that dude is permanantly at 36db gain (because it has no pins :P). There is SOME background hiss from the huge gain (technically that IC has a pre-amp AND an amp, and I'm messing with the pre.... so yeah 36db on a preamp is going to give hiss), so the 'good chip' is going to lose Pin27 (Vol1), which will make it 30db gain.

 

Learn something new everyday eh?

Share this post


Link to post
Share on other sites

Hm.

 

Are you using these chips loose, or on the PCB you linked earlier?

 

If still on the PCB, when you connected the pins to ground (and fried something), did you first lift the pins away from the PCB?

 

If the PCB had those pins routed back to the AREF pin, then you probably fried the regulator on your initial attempt.

Edited by SquallStrife

Share this post


Link to post
Share on other sites

On the PCB.

Doesnt worry me, the initially dead one was dead as a door nail. I know how I set it on fire :)

I touched pin 27 to 26, so put 12v through the volume gate, lol. It was already fried, I was just seeing what did what with whatever was still semi functioning.

 

No I didn't lift the pins.

 

 

But on the other side, which was still working, I simply ripped the pins off, and BAM, perfect!

 

I'm pretty bloody happy it's that simple, lol.

I have another 3 of these boards, and only need 1. It's working great :D

 

and now we know it pulls low when not connected.

Edited by Master_Scythe

Share this post


Link to post
Share on other sites

Fair enough.

 

Leaving the pins attached to the board explains why the pulldown resistor didn't work.

 

Leaving them unconnected technically leaves them in a high-Z state like I mentioned earlier. It may be that the chip internally deals with that, but it would be good practice to lift the pins and attach pulldown resistors. It may seem redundant, but leaving pins floating can lead to all sorts of intermittent red-herring type faults down the line.

 

In any case, congrats on getting it to work. :)

Share this post


Link to post
Share on other sites

Damn man, I haven't done or read up on any of this for almost 20 years. I am having a hard time even understanding everything thats been said here now >.<.... Good luck MS.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×