Fiddle – The DIYed Music System

Originally Posted here

Zu ZU ZU ZU ZU UUUU ..BR.BR.CHIK Thats how my old ‘Phillips All in One’ failed a couple of weeks back. It was a pretty archaic piece. All it could do was play Cassettes, Do Radio, Had an Aux In and offcourse the marketed CD Player with a segmented Display. But today most of the music is digital and hence Upgrade was necessary.

I was planning to buy one and browsing the estores but then then Makers Dilemma struck me.

Why Buy? When it can be Built!

And alas! I was fiddling with microcontrollers and SD Cards to make one. But couldnt get to the level i wanted. I wanted one that could:

  • Play MP3s
  • Radio
  • Aux -IN
  • Take SD Cards
  • Remotes will be good too.

Fitting such things in a project would rather be heavenly. I searched online for references and You have it boy! there is one ready to amplify (supply) module from our friends in China that does it all . See this . I had seen this in a Taxi (less formally called Gramin Seva) while commuting to college once, which made me realise that this would certainly be available in India. The next day i was in the market looking for it and I did source it for about 9 $ (INR 500 ) Now all i need to do is :

  1. Decipher the connections
  2. Build a power supply and Amplifier
  3. Find/Repurpose/Build a 2-Component (1-Woof and 1-Tweeter) speaker box
  4. Modify the box to fit all in
  5. Enjoy

Connections were pretty easy as the silkscreen had some references. It basically needs a 5V DC supply that’s the two pin connected on the left for and give stereo output using the 3 of 4 connectors on right (Right, Left and GND) and the last one is for the FM Antenna The Landscape The next part was testing if i will see the blue smoke of death as sometimes they can mess up with silkscreens too. FingersCrossed It worked fine and i was playing things off the USB straight away! USB Reading Now, the power supply and Amplifier. I used the omnipresent 7805 Regulator that could power the module easily as i estimated the current requirements to be around 250-300mA . The supply was going to be 12VDC due to the Amp i was building and hence, a heat sink was necessary. The Amp was build out of ST’s TDA2030 which is a 14W,voltage friendly, High Fidelity (Correct Portrayl of sound without much loss in clarity), Class AB , Mono Amplifier. The Application circuit works charm. So, i assembled them on a single perfboard and was short of one heat sink. I now had to decide. Who needs the heat sink badly? Demo runs showed TDA2030 needs it badly. Now using some thermal glue and nuts and bolts i screwed the heatsink to the TDA2030 and made a makeshift heat sink for 7805 Ortho View Circuit -Front Circuit- Back I heard a strange buzz sometimes in the background which was because of some filtering issues. Adding a snubber (filter) for AC frequencies (50Hz) that was almost gone. Used the 10k and 0.1uF combination. I had an Old but dis functional Column 2 component speaker, we had bought probably 12 years down the line. It was the ideal candidate for the purpose. Now opening and digging i found phenolic pcb with broken and corroded traces. I reworked them and the Woofer was working . (Oh! Yeah) Look at that Woofer I planned to fit the circuit inside the speaker box itself. For that i had to cut a small square pocket in the body for the module to peep out and the other electronics would be inside it. This was a bit more difficult than anticipated. After 2 hours and 2 broken saw blades , I was able to do this. The 2 hour , 2 broken blades cut Now it was assembling time. All Messed up After a few half hours, i got it all working.. No Buzz and all music! Charm Cheers! Rohit

Tiano-MSP430 based TouchScreen Piano

Touchscreens..huh.. They are all around us..Phones ,tablets, phablets and now even laptops. Most of them have a capacitive touchscreen where the change in capacitance at a point is used to sense it and then perform the corresponding action. Capacitive ones are multi point sensing. They sense more than 2 points and hence we get those pinch to zoom features etc.

On the other hand , almost archaic version on touchscreen is the resistive version. That are pretty easy to interface with almost any microcontroller with an ADC. In this project i did over the weekend i tried to interface a touchscreen ( resistive one..) ,available at mobile repair shops in Delhi with a MSP430G2553 (Although MSP430G2231 would also do)  to make a piano.

Touchscreen setup

Pre-requisites: The touchscreen may not be easier to get. I got mine from a mobile repair shop in LR. It is a 4-wire Touchscreen, pretty common with horribly thin contacts that took a lot of patience to solder.There is a lot of literature available on Touchscreens on the internet. I found two app notes that were best. First one from Atmel , that explained the working of the touchsreen in a pretty clear way and one from TI that some what helped in the software part.

You must read the atmel one ( atleast the first few pgs to get how it works). Its essentially a resistive voltage divider. The value of the touch point is determined by the ADC value read.

formula

From the illustration above(borrowed from TI App Note). One can easily see how the co-ordinates are read. In order to find out, what wire on your touch sreen corresponds to X and Y meshes. You can use a multi-meter first to measure the resistance between pins ,usually the alternate pins belong to same axes. in my case it was X-,Y-,X+,Y+  then to differentiate between x and y , one probable method will be to power the touchscreen i.e. giving the drive voltage and then find out the voltage at any other terminal w.r.t. ground and see whether is changing horizontally or vertically in your reference plane.

CAUTION: Be careful about the current while powering the touchscreen externally!

After this coding part is pretty simple. For the algo refer to page no.7 on the TI App Note. If you plan to run your end application on a battery and you have hard-coded the co-ordinates and the Vdrive is sourced externally i suggest that you sample the Vdrive as well . If you are using  microcontroller pins to supply Vdrive then this can be neglected.

I have a desire to learn to play music but unfortunately due to my low patience levels , i have failed to keep up. 😀

So, i made this Piano using the MSP430 Launchpad and a touchscreen along with a speaker. The code algo is pretty same as TI App Note Suggests and i encourage the reader to code it himself . Any difficulties can be discussed. It uses the tone library i posted earlier to generate the solfeggio.

Here is the shaky and horrible video i made:

Cheers! 😀