Showing posts with label Dremel. Show all posts
Showing posts with label Dremel. Show all posts

Wednesday, September 23, 2015

Look Ma, No Wires!

I’m blogging after aeons! Been really busy; work is such :-/ It’s not like I haven’t been tinkering at all, it’s just that I’ve been tinkering less, and haven’t had the time to document it.

A few weeks ago I decided that I needed a Bluetooth-to-audio adapter for my home (which has a decent but dated Sony home theatre) and car (which has an old stereo system). So this vacation I decided to make one.

bluetooth-audio-adapter
Logitech’s Bluetooth Speaker Adapter has got a 3.5mm socket as well as RCA outputs

I was looking for an end result similar to Logitech’s Bluetooth Speaker Adapter, available on Amazon for INR1,100 (~USD16) as on Sep, ‘15. There are predominantly two types of Bluetooth audio adapters available online – one, which outputs analog audio through a 3.5mm jack, and connects to your sound system’s AUX/RCA input. The second, slightly more interesting version (to my mind, at least), plugs in to the USB port of more modern mp3-capable sound systems. The adapter ‘appears’ as a regular USB flash drive with an MP3 file on it. The audio streamed over bluetooth is constantly written and buffered to the ‘mp3 file’. Pretty ingenious!

As with most of my projects, I turned to the internet to do a little pre-hacking research. I took a look at a few DIY hacks – google “hack car stereo bluetooth”, and you’ll get links to several people who’ve given new life to the old cassette deck in their dad’s rickety jalopy.

Pretty straightforward: http://www.instructables.com/id/Add-bluetooth-to-your-car-stereo/?ALLSTEPS

A bluetooth speaker modified to do the business: http://www.instructables.com/id/Bluetooth-Speaker-Hack-Home-Theater-Streaming/?ALLSTEPS

And for those people still rocking cassette tapes in 2015 (my mom, for example), this guy made a ‘bluetooth cassette’: http://car-mods.wonderhowto.com/how-to/hack-your-cars-cassette-deck-into-wireless-bluetooth-music-player-0139843/

I was initially thinking of modifying the BT earpiece I use with my phone, however that would limit me to a mono output only (there are earpieces which have stereo outputs, so these too, may be good contenders for a hack). I had an old Corseca/Byte brand on-ear headphones lying around. The ear pads were crumbling, and the sound quality was absolute rubbish. But it was still working, and I was pretty certain that the poor audio was only due to the low cost sound drivers. So naturally, I took a screwdriver to the headphones, hehe.

IMG_1757
Not sure if the brand is ‘Corseca’ or ‘Byte’

Disassembly was rather painless – just a few screws and plastic retention clips. The electronics were crammed into the plastic cover over one ear, and the battery was stuck with double sided tape in the other cover. The cover which had the electronics also had control buttons on the other side – FF, REW, Vol Up, Vol Down, Call Answer.

IMG_1758
Teardown time!

No surprises about the main chip being from CSR (now acquired by Qualcomm). CSR is a major in BT consumer electronics ICs, and you’d find CSR chips in everything from keyboards, to headsets, to smart microwaves. The main chip is a CSR57F68 A2DP streaming audio chip. The chip is fully integrated, and has two onboard differential audio outputs, button handling capabilities (debounce, etc), GPIOs, and of course, the BT radio itself.

IMG_1759 IMG_1760
The electronics were on a double-sided board – one side with the chips and support circuitry (Left), and the other side with buttons and status LEDs (Right)

The TSSOP chip is an L24C32, 32kbit I2C EEPROM, which probably stores config data, descriptor strings, etc.

I then desoldered the sound driver and battery wires.

IMG_1770 IMG_1771 IMG_1772
Desoldering the mini-USB charging socket, and replaced it with a micro-USB connector for convenience. The micro-USB’s pin pitch didn’t fit the board perfectly, and the connector itself had a different footprint, so I had to use mod-wires

I also removed the mini-USB charging connector, and soldered-on a micro-USB connector (side rant: just like everyone else, I get totally frustrated pulling out ten different cables to charge ten different devices. With most manufacturers now standardizing around the micro-USB connector, things have become a bit easier, but Apple still stubbornly pushes its weird proprietary connectors, each one different from the previous).

IMG_1773 IMG_1774
The covers, before (Left) and after (Right) modification

My idea was to use the two covers – one from each ear – to form a sort of ‘case’ for the final product. I used my Dremel to trim away the plastic standoffs for the screws on the plastic covers. I then fashioned some new screw inserts out of acrylic. The inserts were hot glued into place. Small holes were drilled into the inserts and the bottom cover to allow for the screws.

IMG_1775 IMG_1776
The acrylic inserts/standoffs for screws, and the 3.5mm audio connector

I had a 3.5mm audio socket (probably scavenged from an old motherboard or CD drive) in my junk box, which I also hot glued in place. Wires were then used to connect the audio outputs from the board to the socket. I took care to connect the left and right channels to the correct legs on the socket. The negative output of each differential pair was soldered to the ground pin of the socket.

Connecting the wrong output to ground would result in an out-of-phase output from the speakers. While this may not be such a big deal with headphones, it would result in sound ‘cancelling’ itself out (primarily poor bass response) if I used the BT adapter with speakers. The AudioCheck website has cool online audio files that help you determine if your speakers are connected correctly.

 
IMG_1778 IMG_1779
The finished project – screws on the sides, and the PINK (!!) audio socket sticking out – not the prettiest

A small slot had to be cut in the bottom cover to accommodate the audio jack. The covers are held together by three screws. The final device is not the prettiest, but it’s functional and works really well.

  IMG_1780 IMG_1781
Charging through the hacked-on micro-USB connector

Saturday, June 18, 2011

Cheap Graphics – Nokia 3310 LCD

It’s been aeons since I blogged last. I’ve kinda gotten rusty so I thought I’d begin small by blogging about something that’s been a work-in-progress for a quite a while.

I’m always looking for inexpensive ways to add ‘bling’ to my projects. A graphic LCD is a lovely way to add that extra bit of fun (and functionality) to an application. Granted, a graphical display may be total overkill in some situations, and may not even be required in others. But when it is necessary, the Nokia 3310 display is a cheap and easy way to display 48*84 pixels of graphics.

I’m not going to go into the specifics of driving the 3310 LCD – I simply followed the resource found online. Scroll to the end of this post to see what’s helped me out. In this post I’m going to condense the four years of dilly-dallying and playing around that was a ‘necessary’ prerequisite in learning to interface the 3310.

I bought my LCD from Lajpat Rai market in Old Delhi for Rs.120 (less than $3) from a mobile repair shop. If I had haggled I may have got it for 80 bucks. It took me two whole years to actually get down to interfacing it – the main thing that made me repeatedly postpone working on the LCD was the difficulty in interfacing. The pic below shows what I achieved in January of 2010. I used LCDInfo and connected the 3310 LCD to the parallel port of my IBM. The results were far from pretty, but I liked what I saw.

Messy wiringMy first attempt: messy, to say the least.

Again, my reluctance to work on this seriously was due to the fiddly wires and temperamental connections. So I made the connections slightly more reliable by using the plastic chassis of the phone and soldering a ribbon cable to the connector (which, by the way, is not too difficult).

TP1         TP2

TP3
The LCD being tested. Read more about how I interfaced a touchpad here.

In May of 2010 I used a touch pad and interfaced the LCD to it with a PIC. Pretty fun stuff. Here’s the post and a video. The LCD, however, still had a mind of its own, and would abruptly stop working due to poor connections.

Finally, a year later (in June 2011) I got down to making something much more reliable; something that would allow me to easily prototype with the LCD. Here are the results.

Top   Bottom
The LCD board.
Left: Top. Right: Bottom showing header.

LCD connector   Comparision
The LCD spring connector. Hand soldered and compared to a pen.

Marked   Sub assy
Left:
the veroboard marked for cutting with a Dremel.
Right: parts of the assembly.

It took me only a couple of hours with a Dremel, some cyanoacrylate glue, veroboard and some headers to make this. Now I can simply stick the board into a solderless breadboard. A backlight is missing, and is the order of business tomorrow. :-)

Resources:

Sunday, July 5, 2009

To Do

If I remember correctly, my first introduction to circuits was in my 4th grade when my dad’s friend gave me a neat science-projects like kit. The kit contained components to teach the basics of electronics - switches, a buzzer, small incandescent bulbs (I absolutely dislike using these bulbs nowadays because of the power they drain), wires, steel wool, and other such things.

I was in the US at that time, and Lucas, a friend, and I, used to perform the ‘experiments’ given the handbook. I don’t know what Lucas’ dad did exactly, but to me he was some sort of god; he had tons of toasters and mixers and radios and TVs and machines lying open in his house. My mom would definitely have hit the roof had she seen such an untidy house. But I loved that house because, I suppose, it contributed a lot towards encouraging me to explore electronics as a hobby. And would you believe I’ve still got components from that kit!

In the 6th grade I read something about an FM transmitter and pestered my mum to take me ‘shopping’. I bought a couple of condenser mikes and speakers, but not knowing anything about transistors and chips, got absolutely nowhere. I did, however, manage to build a working crystal radio – very interesting things, I must say.

I always loved mechanics, and continued tinkering with small motors and toy cars and bulbs till the 10th grade. Finally, when I moved to junior college, I got my first formal introduction to electronics. I had loved the mechanical aspect of things, and could put my hand to anything that had gears and rods and levers. So junior college, with its electronics, was a new experience.

Every year I keep growing in experience and exposure, and my ‘To Do’ list keeps expanding. There are a lot of things that I want to build, but I’ve either not had the time or the knowledge to see them through. A lot of the things in the list are half complete; some of them have passed the proof-of-concept stage and are awaiting, to borrow from software lingo, the transition from beta to release version. Summer break is the perfect time to hit these projects with a vengeance, and I certainly plan to achieve a lot during these two and a half months.

The only problem – as I’m researching one project I invariably come across something new and attractive, which but naturally, gets appended to the To Do list, making it longer still!

Here’s my list, in current form:

Project Status
Linear PSU v3; Revision required
SMPS Proof-of-concept
Home Energy Meter To be done
Air Conditioner Controller v1; Revision required
Computer Controller DMX To be done
Ultrasonic Rangefinder Proof-of-concept
Digital LC Meter To be done
Temperature Controller for Soldering Iron Proof-of-concept
Long Range Walkie Talkies To be done; (searching for info)
Home Intercom Using Old Phones To be done
Drill Press To be done (currently collecting parts) 
CNC Milling Machine To be done (currently collecting parts) 
iTrip Mod v1; Working
iPod Mini Remote To be done
Auto-balancing Inverted Pendulum To be done
PIC to VGA To be done
Optical Mouse Based Navigation System for Small Robots Proof-of-concept
Very Long Range IR Transmitter Proof-of-concept; (currently collecting parts)
USB PIC Programmer To be done
Class D Audio Amplifier v1; Revision required
Digital Weigh Scale To be done
Low Cost USB Oscilloscope Proof-of-concept
Nokia 3310 / 6610 LCD Interface Proof-of-concept
CYUSB6934 Radio Interface Proof-of-concept
Lightweight Multipurpose Robotic Platforms (to be christened ‘Saxiest’ :-D ) v2; Revision required (currently collecting parts)
Foot Speed Controller for my Dremel XPR To be done; (searching for info)

As you can see, several projects still need to be started. Any advice/help/experience is most welcome :-)

Friday, July 3, 2009

The Super Probe

I remember mentioning in one of my earlier posts that an Oscilloscope was very high on my wish-list. The other day I entered into a bidding war on eBay-USA for a no-name DSO. It was pretty inexpensive, and the features it had seemed reasonably good. Sadly, I was outdone by some chap from Germany, who was willing to pay more than four times the amount I was.

After the eBay misadventure, my electronics toolkit continued to remain woefully incomplete. Apart from a simple multimeter and the PICKit2-Logic Analyser, I lacked the resources to take essential circuit parameter measurements – frequency, event counting, capacitance, inductance. I would also like a function/signal generator which would be able to output a PWM signal, pulses, pseudo-random number sequences and such like. Was there a multipurpose, do-it-all out there that would enable me to do all of this without breaking a bank?

About two years ago I had chanced upon the Super Probe while googling for a low cost capacitance meter. The Super Probe, designed by Luhan Monat, is a DIY low-cost and very low parts-count tool. As its name suggests, the Super Probe is capable of taking a variety of measurements with a fair degree of accuracy. It can also be used to output some useful waveforms and signals.

When I first saw Luhan’s site, I built a solderless-breadboard-prototype for myself. It lasted all of three days before the rats-nest of wires and components was deemed unsightly and cumbersome, and was relegated to the corner of my room, before being cannibalised for parts. I’ve finally gotten around to building my self a ‘proper’ Super Probe – the ensuing photos are ‘proof’' :-)

1 

My 'Probe is enclosed in an old Orpat ODM-100 Multimeter case. I ripped out the insides (naturally keeping some of the components – the LCD, and some precision resistors – for future projects :-D ), replacing them with my own circuits. The entire 'Probe is built on proto board using DIP components. I plan to design my own PCB later with SMD parts.

Using my Dremel XPR400, I cut a slot in the side of the old multimeter to accommodate an ON-OFF slide switch. A circular piece of acrylic was glued in place of the rotary switch of the multimeter. Openings were also cut for buttons, which were ‘borrowed’  from an old non-functional calculator. Both, the button holes, and the switch slot, were made using the etching bit of the Dremel. To make the circular acrylic piece, I started by trimming the sides of a square piece. I drilled a small hole in the circular-ish piece and mounted it on a mandrel. This setup was spun at about 20,000RPM on a rough file till a circular shape was achieved, and then on a smooth file for finishing. You could just as well use a lathe to do this, but I had to make do with what tools I have :-( The circular acrylic piece was super-glued into place, as was the slide-switch.

The images below, from left to right, are of the slot cut for the switch; the switch glued from the inside; and, the modifications made to accommodate the buttons.

There are four PCBs inside the multimeter case – the display board, the actual 'Probe, a button mount, and a 7805 regulator. The reason I used a ‘modular’ approach is for ‘upgradeability’. Yeah, yeah, don’t laugh! I’ll tell you how ‘upgradeable’ this device is – I plan to replace the just PCBs with just one, which integrates everything. But until the time I actually design and etch the integrated PCB (I use the toner-FeCl3 method, and I no longer have access to a good laser printer) I would like to tinker and test the individual circuits. Each time I fiddle with a certain sub-circuit, and I wouldn’t want to build a completely new 'Probe.

inside2insides

The PCB wrapped up in red electrical tape is the 7805. The tape was necessary to prevent shorting. In the second pic, the crystal, wrapped in black electrical tape (also to prevent shorting) is visible.

For example, tomorrow I’m going to swap out the power-hungry and inefficient 7805 regulator with the much nicer, and comparatively power-thrifty MAX1836 buck converter from Maxim. I’m currently running off a 9v PP3 battery. With the 7805, I’d get 5v on the output as long as the PP3 voltage is above 7v. Current draw by the circuit is 20mA peak and about 10mA average, so with 9v on the PP3, I’d lose clip_image002[9]across the 7805. With 7v, I’d lose 20mW.

Now, although this doesn’t seem like much, I could improve battery life tremendously by using a buck regulator which is near about 85-95% efficient. So I’d reduce the power lost across the regulator to about 8mW – a reduction in power loss of 80%. Another advantage of Maxim’s 1836 is that it allows me to run the PP3 down to 5.5v, and it will still give me a nominal 5v on its output.

Back to the construction. For the display, I used individual 7 segment LED displays. The original 'Probe uses a 4-digit multiplexed display, but individual display blocks can be used as well, though soldering them is one hell of a pain in the butt (literally! Hehe :-D ). I put a sheet of cellophane paper (plastic) on top of the display to improve contrast.

The 'Probe uses a PIC16F870 as its brain. Luhan has been kind enough to provide a pre-complied HEX file which only needs to be burnt onto the PIC. He’s also provided the source code for download so you can modify the code as per your needs.

The Super Probe does have its limitations. It certainly is very inexpensive; the caveat is accuracy. The device’s readings are only as reliable as its components. Measurements should not be taken as God’s Word and whenever possible, must be checked against standard tools.

Anyway, the 'Probe has rapidly become one of my most useful tools. Of its 17 functions, I use the Frequency Counter, Event Counter, Servo Pulse Generator, Square Wave Generator, PWM Generator, and 38kHz IR Pulse Generator most often. For a list and description of all its functions look at the list below or visit the Super Probe website.

 

Super Probe Functions
Logic Probe – High, Low, Tristate
Logic Pulser with variable pulse rate
Autoranging Frequency Counter
Event Counter
Voltmeter 5v max.
Diode Junction Drop
Capacitance Meter
Inductance Meter
Signal Generator – 0.5v, 500Hz square wave
NTSC Video Signal Generator
Serial ASCII Generator – selectable baud rates: 1.2/2.4/4.8/9.6K
MIDI Note Generator
Hobby Servo Pulse Generator
Square Wave Generator – 1 to 9999 Hz
10kHz Pseudorandom Number Generator
38kHz Generator – useful for testing IR receivers
PWM Generator – 3 to 97% duty of a 6kHz square wave

Visitors