How to use BT66T with amplifier?

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I designed this circuit and I want to make sure if it is safe before testing on breadboard.

BT66T is a Simple Melody Generator, I want to use PAM8403 to amplify its music. Also I want to use ATmega16 to turn on and off the music according to my needs.

 

AVR BT66T PAM8403

 

Partial test of BT66T and PAM8403 (without AVR and 2N3904) works fine :

 

 

More info :

BT66T :

Operating Voltage: 1.3V ~ 3.3V

 

PAM8403 :

Operating Voltage: 2.5V ~ 5.5V
Speaker With: 4Ohm ~ 8Ohm
Speaker Power: 2W ~ 8W

 

Thanks in advance

 

 

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What voltage is your mega16 working off?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

What voltage is your mega16 working off?

 

5 volt

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, that's not the best way.  The BT66T has a max limit of 3.3V ...if you apply 5V from the AVR, it will try to pull the emitter up to 5.0-0.7 =4.3V, trying to drop along the 4.7k resistor...so it will try to tug the chip voltage beyond the limit.  A lower resistance will give a stronger tug.  It might be "ok" if the chip just absorbs the tug & self-limits the voltage to its max rating.  But not for production!

 

Better to use a PNP (with a voltage loss from 3.3V) or better yet, a P chan mosfet, with "no" drop.  Enjoy the music.

 

Also, you may need 5V for your PAM, otherwise you will get somewhat weak sound (then why bother using it).   Not sure how loud you want to play its a small world or happy birthday

As shown, the 4.7K is a weak drive & won't allow enough transistor current to get to the PAM  to do much.  The PAM will need some serious current (4W amplifier)

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Fri. Apr 26, 2019 - 04:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to the Forum.

Looks like a fun project.

The BT66T looks like an interesting little chip.

Note that you could use the Mega16 to generate the audio signal and not use the BT66T chip at all, but perhaps that could be your next project!

 

The BT chip is spec'd to typically operate at V+ = 1.3 V, with a maximum of 3.3 V.

The data sheet has some errors in it, for example the operating current of the BT chip is listed as Id = 60 V in the data sheet I have...  Perhaps that is supposed to be 60 mA if it is directly driving a piezo or speaker?

 

In any event, if the BT chip is driving the high impedance input of an audio amplifier chip, then the actual output load current should be very low, and the output audio driver is likely the main current draw for the chip.

 

If you have the ability to do so, try to measure the current drawn by the BT chip when it is playing a tone and the output is connected to a 1K or 10 K resistor, to get an idea of the chip's actual current draw.

 

The reason you want to know the actual current required for the BT chip is that you really need to make a simple 1.3  to 2 V or so power supply for the chip.

 

There are many ways to do this, but the goal would appear to be to keep it simple for this project, and hopefully use some components you already have on hand.

 

If the BT chip draws very little current when driving the audio amp chip you might be able to power it with a Mega16 pin driving a resistor and then one or two LEDs in series, tied to ground.  The LEDs will have a fixed voltage across them when they are forward biased.  With a simple red LED you would likely need two of them in series, with a blue or white LED the voltage across a single LED would likely be adequate to drive the chip.  This is similar to an old zener diode shunt regulator, but might work for a low current source power supply with parts you have on hand.

You could, if you have an op-amp available, use the op-amp tied to your 3.3 V / Ground power source as a voltage regulator for the BT chip.  Use the LED's for your fixed voltage source, and the op-amp as a "voltage follower" to power the BT chip.    Just make sure the op-amp is spec'd to provide a few mA's output current for the BT chip.

 

In terms of your present design, if one has a transistor switching the V+ power to a load, one would typically use a P-channel transistor, these days a PFet instead of a PNP, (2N3906, IIRC), instead of the NPN 2N3904 you have used.  There are even small chips that combine an NFet and a PFet transistor in one package specifically for being a "high side" driver for a load, such as you are using.

 

Depending upon your project, you might also just use the PAM84403's Mute or Shut Down pins to turn the audio and the chip, on and off, instead of switching its power supply on and off.

The Pam is a small Class D audio Amp chip. You would typically feed the audio input signal through a small capacitor to the input of the Pam chip, (A.C. coupling).  Perhaps the little PCB already has one installed, you will have to look at the schematic for the PCB to see.

 

JC 

 

Edit: Typo

 

Last Edited: Fri. Apr 26, 2019 - 04:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The whole project is an alarm clock :

 

Alarm Clock

 

 

Alarm Clock

 

It works fine but if you see anything wrong on the schematic please let me know.

 

Again thanks in advance

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One very small comment. 

 

The triangular symbol is really not very good for that device. That symbol, with its two inputs, is commonly used for operational amplifiers and comparators; those two connections on the left are used for signal inputs.

 

This device really only has a ground connection, a power connection, and an output. A simple rectangle with 3 terminals would be more recognizable.

 

The page where I saw a project using the BT66T sort of  implied that the output is PWM. Because the  PAM8403 is also a PWM device, I would add a low-pass filter between the two. I would use a series resistor and a capacitor to ground at the end of the resistor connected to the PAM8403. I would set the corner frequency around 10KHz or so. With a C = 0.01uf = 10nf, then the R would be 1/(2 * PI * F * C) = 1.59K (1.5K is good enough).

 

Looks like a  good project and a neat IC.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The schematic does not show a clock source, but it appears you have a xtal in the breadboard.....

Looks like a fun project! 

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
stack gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could likely ditch the '4511, but its fun to learn.

Not sure about the switch diodes, other than maybe you want to flag PB2 as an input when either switch is pressed(why?, since they will already be inputs).  Do NOT make PB2 an output hi, since the switches will act as a PB2  short to GND via the diode.

 

You should include all of your chip power bypass caps on the schematic, since they are part of the circuit & not just an external power connection.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Fri. Apr 26, 2019 - 08:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The triangular symbol is really not very good for that device. That symbol, with its two inputs, is commonly used for operational amplifiers and comparators; those two connections on the left are used for signal inputs.

 That symbol is used in BT66T datasheet (which is attached to the first post)

 

With a C = 0.01uf = 10nf, then the R would be 1/(2 * PI * F * C) = 1.59K (1.5K is good enough).

Thank you

 

The schematic does not show a clock source, but it appears you have a xtal in the breadboard.....

Yes I have to add it to the schematic, thank you.

 

You could likely ditch the '4511, but its fun to learn.

Yes that's right, I can do it. Also I can use 4 2N3904 instead of ULN2803.

 

Not sure about the switch diodes, other than maybe you want to flag PB2 as an input when either switch is pressed(why?, since they will already be inputs).  Do NOT make PB2 an output hi, since the switches will act as a PB2  short to GND via the diode.

Do you know a better way to detect two buttons by using only one interrupt?

 

You should include all of your chip power bypass caps on the schematic, since they are part of the circuit & not just an external power connection.

So I have  to use two 100nF near VCC of ATmega16?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 but if you see anything wrong on the schematic please let me know.

I commented above on your use of an NPN transistor as a "high side switch".

 

I commented above on your need for a cap to couple the BT chip to the audio amp chip.

Jim mentioned a LPF.

If you add Vcc/2 centering resistors on the coupling cap then those form the "R" in the LPF.

 

You should really draw ALL of the connections in your project.

Then mark them off with a Highlighter as you wire up the project to make sure you have not overlooked anything.

 

I don't see a Ground connection drawn for the micro.

 

The micro and the other chips all need a By-Pass cap, typically 0.1 uF, from their V+ pin to Ground.

These should be placed as close to the pins on the chips as possible.

 

I don't see any caps for your crystal on the micro.

These are typically in the 10-20 pF range, but the value depends upon the crystal you are using.

(It is important to use them, their exact value probably isn't very important, most of the time.)

 

You should draw the Aud Amp chip with a box around it, and label it a PAM... Module.

The reason is that that chip has a lot of additional required components, and your schematic omits all of them!

If someone took your schematic and wired it up it would not work.

Labeling it a module implies that there are additional parts, not shown, included within the module.

 

Your breadboard shows an external crystal connected to the micro.

The schematic doesn't show the crystal or its caps.

 

The resistors for the 7-Seg display do not have any values shown on the schematic.

 

Your project appears to be coming along nicely, but I think you need to do a little bit more clean up work on the schematic, and perhaps re-design the BT chip and audio amp circuitry.

 

You might also wish to add a photo cell or photo transistor as an input to an ADC input o the micro, so that the alarm clock and automatically dim itself at night, and be bright during the day.

 

JC

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you know a better way to detect two buttons by using only one interrupt?

Why do you need a separate interrupt for the buttons at all?---there is barely an processing going on.   Or simply setup a timer with a 1ms tick interrupt.  This looks at the switches every 1ms & decides what to do (including debounce), maybe update the time then as well (every 1000 interrupts is the next second).

 

 

If you use a transformer power supply, then you have access to the low voltage, isolated sinewave, then you can count powerline cycles, which will give you better long-term accuracy. The power company adjusts for an exact number of sinewave cycles  every year---wonder who's job it is to do the counting.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!