Wednesday, March 18, 2015

Creative T20 speakers standby mode

The goal

Add sleep mode to Creative T20 speakers after no sound over 1 minute.

Usability

Additional comfort, no need to turn off you speakers. Volume knob always in the same place.

Parts

  • 1 x Attiny45 (or any other with 2 ADC, one PWM and one HW interrupt)
  • 1 x Bright led, blue 3V
  • 2 x 4,7k resistor
  • 1 x 9k resistor
  • 3 x 1k resistor or one in 200-300 ohms, this is for led only
  • 1 x LM78L05 - 5V low current
  • 1 x microswitch
  • some cable

Code


Hardware

  • none

Description


I don't like speakers with power switch in volume knob. Every time, when I leave my desk for longer than 15 minutes, I switch them off. Continuous ON and OFF and searching right volume is a bit of annoying.

I bought Creative T20 couple years ago, because they sound just great. Despite almost perfect sound, I've decided to open the case and see what is T20 belly :)

T20 power stage is made from TPA3123, which is 25W stereo Class-D amp (it's popular, you can google application note in pdf).

TPA3123 has build in two useful functions - MUTE (pin 4) and SHUTDOWN (pin 2). Looking at the application note you can find that in MUTE state amp is eating more power than on SD (shutdown).

I didn't check behavior on MUTE, but when amp is waking from SD it need some seconds to boot up. I think changing form MUTE-on to MUTE-off state would be instant and without additional time to warm up, but I prefer SD over MUTE.

Amp shutdown mode


To put TPA3123 into SHUTDOWN mode, you need to short pin 2 over 4.7k resistor with ground. Voltage will drop form 6.2V to less than 2V. This is recognized as pin in low state. High state is above 2V to VCC which in case of Creative T20 is about 30V, so be careful and check twice SD voltage before connecting SD pin to microcontroller. To be honest, 6.2V as pin state on Attiny supplied from 5V is too much, but ... it works ;) You could secure your MCU by adding 5V diode or drive SD pin through additional transistor.

Connection diagram.

I fully agree with you! Circuit is ugly, but ... it works ;)

Detecting audio


This was simple, connect Left and Right input (from back of T20) to Attiny's ADC input pins. There is a continuous loop that reads from ADC (in 20x gain mode), and when values are smaller than threshold (200 times in a row), MCU puts TPA3123 in shutdown mode by changing SD pin to low state. When ADC gets value above defined threshold, SD pin is put into high (back from < 2V to 6.2V).

I've used differential ADC input so i need only one read from ADC.

For me, this is working well. I've used to listen music on 50-80% volume level on my laptop when audio is connected to T20. MCU puts TPA3123 into sleep just below 40-45% volume.

It may behave different on your equipment, if so - change ADC threshold, or even build better ADC circuit.

Disable sleep mode


T20 has additional AUX input at front. My MCU is connected only to back input, so when listening only from AUX, speakers would go into sleep mode (no sound on back input). To avoid this I added microswitch mounted on back of main speaker, which is connected to INT0 (interrupt nr. 0) and serves as disable/enable sleep mode switch.


Sleep mode notification


I removed original led diode from volume knob and put my own 3V blue led connected to Attiny's PWM output. When TPA3123 is in sleep mode, led is in a pulse state (from dark to bright and backwards). On regular work led has full brightness. Disabling sleep mode (by microswitch) makes led flash 2 times, enabling sleep mode - one time.


Photos

Creative T20 circuit board with sleep mode added.


Led and resistors view.


Attiny45 in holder.


MCU holder is glued to plastic case.


Microswitch is glued too.


Additional button looks as original (well, almost).


Movie

Movie is a little bit boring, skip from 0:30 to 1:30.







27 comments:

  1. Haha, this is hilarious. The T20 already have automatic standby mode built into them, though its after 10 mins and it seems only on those bought in EU (to comply with EU regulations). You should buy those from EU and it would save you from voiding your warranty :-) Just saying...

    ReplyDelete
    Replies
    1. Hey, I bought this one in EU (maybe 5 years ago) and they came without sleep mode. I know some models had a bug and go into sleep after some time... but this was a bug for 100%. Maybe something has changed now, don't know.

      Delete
  2. Legendary speaker set :-} nice mod

    ReplyDelete
    Replies
    1. Thx. It actually appears that this mod is made by manufacturer in newer T20 version. Some people report that it's super annoying.

      Delete
    2. would you have any idea how to remove the inbuilt standby version in the series 2

      Delete
    3. To remove: you need to deep dive into the PCB and check how the standby actually works. I'm not familiar with new T20, and I don't have my old speakers, so can't help here. If you know sth. about electronics, you could disassemble them, and try to target some sleep/standby/mute pin on the amp and track it's origin, and then maybe simple pullup/pulldown resistor will "remove" this functionality, but since I don't own new T20, I can only guess.

      To bypass: I think if you play sin wave with low amplitude and frequency above human can hear, you could trick the sleep mode in your T20's. If the speakers have also aux input, you could build some small device that would generate such a frequency, so you wouldn't have to play it on your computer.

      Delete
    4. About the frequency ... I would not recommend this if you have some pet, cat/dog etc. Animals have better hearing than humans and they can freak out when you play some high freq. actually. So keep that in mind.

      Delete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. Hello! I was wondering if you happen to have the wiring diagrams/schematics for these speakers. I can't find them anywhere... Thank you!

    ReplyDelete
    Replies
    1. Hello! Sorry, but I don't have schematics nor the speakers, you need to reverse engineer it by yourself :) I don't know what you're up to, but maybe check the datasheet of every IC you notice on the board, sometimes those docs have example circuits, commercial products often use similar wiring.

      Delete
    2. Thank you for your reply! I started with fixing a loose headphone jack after I dropped it and once I fixed that, it won't power on at all now and I can't figure out what's up.

      Delete
    3. If you're taking about front jack, volume knob (which is a on/off switch at same time) could be damaged, but I remember that it was mounted firmly, so it depends how you dropped the speaker. If you dropped on the back, then check if you have power on the smaller pcb around DC socket. You have some digital multimeter or sth. to check the voltage?

      Delete
    4. I ended up just getting a new set... oh well, I tried! Thank you so much for being so responsive on such an old post! I really appreciate it. Take care!

      Delete
    5. No problem :) btw. don't throw the old ones, maybe you get into electronics more in time, and you finally fix them, or use them for learning purposes.

      Delete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Creative apparently makes all their speakers go into standby mode after 10 minutes to satisfy a EuP energy requirement. I suppose to save money they sell the same in all Countries not just EU. It is a bit annoying and what's worse is their is no description of this power saving mode in specs. You end up finding out through these forums, support, or Knowledge base on Creative site. For what little these speakers draw its sort of ridiculous and must be a opt in regulation because other speaker makers don't do this. Wish I had known this before buying my Inspire T10's. I would have bought Logitech's instead.

    ReplyDelete
    Replies
    1. Sennheiser also likes auto off feature ... got it in my headphones with mic. Literally they just power off when I'm on conference longer than an hour, even when I'm talking. Super stupid feature, and can't be disabled.

      Delete
  7. not sleep (IC1 -> 2 SD ->10KOM IN VCC )
    https://yandex.ru/images/search?text=tpa3121d2%20%D1%81%D1%85%D0%B5%D0%BC%D0%B0%20%D1%83%D1%81%D0%B8%D0%BB%D0%B8%D1%82%D0%B5%D0%BB%D1%8F&stype=image&lr=65&source=wiz&pos=8&img_url=https%3A%2F%2Fi.stack.imgur.com%2Fzwkp3.png&rpt=simage

    ReplyDelete
    Replies
    1. Hello,
      Thank you for your comment. However, my post confuses more and more people. I originally bought speakers without sleep mode, and added one by myself by adding additional MCU. So in my setup sleep mode was actually a benefit. I know that Creative also released newer version of the speakers with sleep mode, that irritated many people.
      Regards,
      Igor.

      Delete
    2. Do you know how to fix a standby mode in T20 II? I mean some circuit mod, not playing a sound that can't be heard :)

      Delete
    3. I don't own them anymore, and my version was without this feature (I added it myself). I doubt they implemented standby similar to what I've done, maybe you should try to search schematics of other speaker with standby and see how the circuit looks there, and then try to find something similar on you T20 II PCB.
      The easiest would be ot make a sound generator (or even cheapest mp3 player with looped song/signal with very low/how freq.), and hook it up to second input, but I understand that you want a permanent fix, sorry, can't help without having them on site.

      Delete
  8. How many watts are used when it's idle and not in standby vs standby mode?

    ReplyDelete
    Replies
    1. Did not have a chance to check. I no longer have the speakers. Probably you could have a look into the amplifier data sheet. This mod was mostly about not abusing the switch and the potentiometer by constantly switching them off and on.

      Delete
    2. Since the original power supply died, I measured it with a 12V AC adapter, which may give different values. At idle, I measured 0.6 to 0.7 watts.

      Delete
  9. Hi, I have a 5V Bluetooth adapter. But I do not understand at all how to feed it to him. Can you help me?

    ReplyDelete
    Replies
    1. Hi, I don't own the speakers anymore, but maybe go with the shortest path and add step-down converter to the power supply barrel jack socket. I don't remember how high was the power supply voltage, but pick some converter that can handle couple of Volts more.

      Delete