Monday, January 21, 2013

Chinese electronics recycle fun or what's inside gsm to landline phone terminal

Here we go. I have a simple gsm terminal for landline phones, so I can call from regular analog phones through gsm network. I'm using it in low signal area with external antenna.
So one day I decided to look what's inside of it. I was thinking there would be some kind of gsm modem inside and analog support electronics etc. But found some interesting stuff.
Here how this thing looks, nothing important just grey box with gold antenna output sma socket.

Now let's take a look inside:

Yes, it is a gsm cell phone pcb inside! With phone battery for backup power. This thing is powered by nuvoTon W78E052DDG mcu. Which has 80C51(52) core. Never heared of them yet, but they make Cortex-M0 mcu and other ARMs too. I guess it is connected to the phones serial port.


Wires soldered directly to pcb connector.


Looks like Nokia or SE connector to me.


Wires soldered directly to phone external connector.
Phone pcb screwed to terminal housing posts, so this housing is made for this particular phone pcb on purporse. It means some kind of cellphones recycling =) Chips on phone pcb has date codes leading to 1999.


Wires soldered to the phones sim socket leads to a new sim socket on bottom side of terminal main pcb.


Some unknown chip under pcb.


Here must be some know-how, otherwise I don't know why they sand those chips markings.


LCD board glued in place =) This LCD board is connected through serial data line, may easily be reused. There is a black blob lcd controller on pcb.


LCD itself actually has a good contrast.

I had used a cell phone as wireless terminal to send sms alerts. But I never though this would be used in actual manufacturing =)

Update: as requested I pictured main pcb bottom side:


Friday, December 7, 2012

PIR Motion sensor relay fast repair

Recently my motion sensor lights switch went bad. I opened it up and found that main ic is dead, but relay and relay transistor is ok. So I ordered really small PIR Sensor Module to fit it in place of dead ic. That ic was LP8072C which is a pir controller and it support light intensity sensor which is just a Photoresistor. So my motion sensor does not switch relay in daylight, designed for lights switching.
Pir sensor module I've got does not support photoresistor, so I had to design it in myself. What I've done is connected photoresistor to the base of relay switch transistor and second lead to the ground. With a base resistor which was on pcb already it makes a strong pulldown to transistor base. So when it's a daylight, photoresistor changes it's resistance to about 220 Ohm which prevent transistor to switch relay. I had to remove some parts from original pcb which interfere with photoresistor. An I removed LP8072C too.
Then I removed actual pir sensor can from module pcb and removed connectors too. Wired pcb pads to old pir sensor can on original pcb and to power and wired output to the output pad of LP8072C ic.


Then I glued sensor module pcb in place. Works ok except this new sensor has short keep relay on timeout, but whatever. This can be adjusted I guess, ic on sensor module pcb is unknown, no markings, it looks like sanded.
As you spotted there is no power supply as we used to see. It's just Live wire through 0.47 uF 250v cap in series with resistor to diode bridge. Then to 25v filter cap then to regular diode to drop voltage a bit then to zenner diode to get 5v with filter cap. It's a low power supply. Sometimes it's used inside cheap led light bulbs with many leds. This red 0.47 uf cap is half dead already because it's rated to 250v and as you know 220v mains has 315v sine peaks. It's capacity is 0.2 uf and it still works.

Saturday, October 13, 2012

Game Boy Color Loud Sound Mod

Update: published schematics and pcb design files for Eagle and Gimp. Make your own pcb and respect the license =) Take a look: http://code.avrnoob.com/gameboy-color-quality-amplifier/


Recently I've got used Game Boy Color and noticed lack of sound volume, it is barely audible. So I tear it down and pulled speaker out, it was all rusty.


 I had a speaker for Motorola L7/L6/L2/L71/K1-GSM/V8 on hands and soldered it in. So this is fixed sound. But it is still not loud at all, so low volume, I had to use my headphones instead. Oh and there is loud hiss noise, guess it's coming from power supply. I had to do something with it =)
I looked in my parts bin and spotted TPA2000D1 - a class-D mono amplifier from TI. It is 2W power rated with programmable gain and class-d is pretty efficiency means low power consumption.
After some time pcb was made.

I used schematics from datasheet but in the final version I changed 1uF bypass cap and other 1uF caps to 10uF and added 0.1uF. Also I had to change 120k resistor in oscillator circuit to 180k to keep frequency below 300 kHz, it was 330 kHz with 120k resistor.

Powered up ok first time wires connected and sound now is much louder even with gain of 6 dB but then I set it to 12 dB by moving one resistor to outrun any ambient noise. This is max before clipping I guess. Unfortunately noise hiss did not gone away and become even louder on high volume, so this is power supply. Game Boy Color is powered with two AA batteries. But it has switching step up power supply with 15V and 5V output, this makes noise because amp is powered from 5V. I had to add additional 470uF cap to 5V power rail to make noise go almost away, now it's barely audible on max volume.

Amplifier pcb moved over speaker and case closes nicely.

Amp barely visible inside. This Game Boy Color now definitely has Hi Fi sound =)

Sunday, August 19, 2012

OBD II Bluetooth PowerUp

Just upgraded my Bluetooth OBD II adapter with class 1 power module. Now I can diagnose a car sitting at home.
You can get bluetooth OBD2 adapters from Amazon but neither of them has class 1 power bluetooth module with ceramic antenna! =)

Friday, August 10, 2012

DIY Car Bluetooth A2DP

Does not have bluetooth in your car? No problem, let's do it yourself.
I had a spare iPod / iPhone dock Bluetooth A2DP receiver, never used. So I decided to open it up and fit into car 12v plug with aux out.
Here what it looks like when new:

When opened there is one pcb with OVC3860 Bluetooth chip. Actually it sounds better than ISIS chips. That why I decided to use it.
I desoldered 30 pin ipod connector with heat soldering gun.
Backside has some testpoins, maybe useful to easy solder wires for aux and power.
I traced 30 pin connector pads to testpoints and found out that this thing needs 5v power and has left, right, audio ground and 5v in and power ground on testpoints.
I've opened 12 car plug, removed guts and tried to fit this pcb in, no fit =( But with desoldered 30 pin connector there is much unused space on pcb, so I cut it to fir nicely.
Soldered 5v linear regulator and put heatshrink over it later.
Wired power and AUX out to 3.5mm female socket with screw mount and it is done.
Forget to take picture of it when closed, but there is nothing special, just plug hole visible. Sounds nice, but becomes hot almost instantly. This thing eats 100mA when receiving sound and 60mA when idle. So linear regulator works on the edge, it is rated for 100mA. But chip itself gets hot too, not sure why. Anyway I connect car AUX to this plug and have Bluetooth now.

Tuesday, June 26, 2012

TI LaunchPad with OLED

ti launchpad oled

Have not time til this week to play with my little OLED display which I won in Seeed Studio lottery last year.
Connected it to TI LaunchPad. Made a little library to control it. Pixels addressing is a bit confusing. Had to do a font converter to make big digits font suitable to send to display without much processing in micro.
Anyway, it is equipped with SSD1308 controller with i2c bus on connector. Used my oldy USI i2c driver library.
Code which outputs those digits:

 i2c_init();
 i2c_wait_for_device(oled_addr_w);
 P1OUT |= LED_RED;

 oled_command(OLED_DISPLAY_OFF); // off
 oled_command_arg(OLED_CONTRAST, 255);
 oled_command(OLED_DISPLAY_RAM);
 oled_command(OLED_NORMAL);
 oled_command_arg(OLED_CLOCK, (15 << 4)|0); // 0b1111 0000 fastest clock
 oled_command_arg(OLED_PRECHARGE, (3 << 4)|(3)); // 3 dclk for 1 and 2 phase precharge
 oled_command_arg(OLED_ADDRESSING_MODE, OLED_ADDRESSING_HORIZONTAL);
 oled_command_arg2(OLED_COLUMN_ADDRESS, 0, 127); // column address from 0 to 127
 oled_command_arg2(OLED_PAGE_ADDRESS, 0, 7); // page address from 0 to 7

 unsigned int i;
 // clear display
 oled_start_write_data();
 for (i = 0; i < 128*8; i++) {
  oled_data(0);
 }
 oled_stop_write();

 oled_command_arg2(OLED_COLUMN_ADDRESS, 0, 127); // column address from 0 to 127
 oled_command_arg2(OLED_PAGE_ADDRESS, 0, 7); // page address from 0 to 7

 oled_print_big_digit(0, 0, 0);
 oled_print_big_digit(1, 1, 0);
 oled_print_big_digit(2, 2, 0);
 oled_print_big_digit(3, 3, 0);
 oled_print_big_digit(4, 4, 0);
 oled_print_big_digit(5, 0, 1);
 oled_print_big_digit(6, 1, 1);
 oled_print_big_digit(7, 2, 1);
 oled_print_big_digit(8, 3, 1);
 oled_print_big_digit(9, 4, 1);

 oled_command(OLED_DISPLAY_ON);

Not much memory left in MSP430G2231, so I'm going to port this library to AVR for my projects.
Display is really great, easy to read. This should be low power, but in off state module eats about 4mA. I guess it is because of 3.3v to 12v converter on board.
Seeed Studio does not has this module anymore but has another one even smaller: OLED 128x64

Saturday, February 18, 2012

Desk lamp leds retrofit with diy constant current driver

Continuing my previous post about diy constant current boost driver for 9 leds in series, here is a mod for my burned out desk lamp.
I've designed new schematics with 4 mosfets in parallel, because this is only mosfets I had on hands and they are pretty low power with high Rdson. So I decided to use as many as I can.
New schematics:

Then I tear my desk lamp apart, throw internals away except power switch and measured insides how to fit driver pcb.
With this measurments I designed new pcb:

As long as this driver can drive 9-18 leds in series I want to use 3 modules in parallel with 9 leds in series each.
Here is one module pcb assempled:

What diy project without hotglue? Hotglued new driver assempled pcb in place.

New design has push button to switch power modes from low light to max output light. So I drilled a hole to fit this button in. It's pretty invisible and handy to switch light output.

3 led modules glued in place of cfl bulb:

And now it shines my desk, well actually just wall behind my lcd monitor =)

Sorry forgot to picture the whole build.
This project is Open Source and Open Hardware as all what I'm doing here. So take a peek inside the sources and schematics at bitbucket.org and fork if you want.

Thursday, January 19, 2012

DIY 9-18 series leds constant current driver

When my desk lamp died I decided it's time to upgrade it to led desk lamp.
I have several 8mm straw hat leds which are laying around unused for too long. So I thought to put those into lamp mod. Then I thought about how to drive these leds with as little power wasting as possible and come across to constant current drivers. Yes I can power leds with series resistors to limit current, but there is power wasting in resistors and I can't drive each leds with the same current. In this project I wanted to learn something about boost converters and opamps, this means I'm going to do a constant current driver with voltage boost converter to power many leds in series. That way I can keep the same current on all leds in the module.
I took ATtiny13A + some generic opamp and made it.

Shematics looks like this:

To test it I've made a pcb with generic white 5mm 9 leds in series and drive them with 20ma (ajustable in fw):



Yes it may look ugly, but it works. Push button is for changing power modes in final design. I've tested it on 9 leds in series with output around 27.5v and on 18 leds in series with output around 58v, works fine with not much current to leds.
Actual lamp mode and source files next time.

Thursday, November 3, 2011

TI LaunchPad Shield pcb template

Yes, it is a TI LaunchPad shield pcb design template I've made in Eagle for future projects.


It has two sizes wide and narrow and you can cut opening to show LaunchPad leds.
The source is at code.avrnoob.com hosted by Bitbucket.

Tuesday, October 18, 2011

Endless servo mod

Just a little endless mod for my GWS Sail Winch S125 6T servo, which is used to move automatic door in my chicken coop. This servo has 6 turns and this is enough to open the door, but I did this mod before automatic door to be sure.

So just open this servo, remove potentiometer, solder 10k trim pot in place of potentiometer.



Then set 1.5ms pulse on servo controller and turn trim pot till servo stops moving. This is it, servo is endless now. To move CW send >1.5ms pulses and to move CCW send <1.5ms pulses.

Or you can use 5k resistors instead of trim pot and then ajust pulse width to stop movement. And when you found needed pulse, just use lower or higher pulse width to move CW or CCW.


Monday, October 3, 2011

Diode fail

Two cheapo 10W led drivers, which I hacked (see previous post) to supply 1A current, just died. They make high frequency noise now. Checked components and found that output diode has failed. Diode is SR260, 2A shottky. I guess it's failed because of temperature inside driver enclosure. I made holes in second driver and it's failed too.
Replaced SR260 with 2x1N5819 in parallel, works for now, will test inside enclosure later.

Saturday, September 24, 2011

Lamp 10W Power LED Retrofit

I had a small side-project about power leds.
Received some 10W (advertized) warm and cool white leds. Yeah, it's bright! And hot too.
Then got some cheapo 10W constant current led drivers, which should drive a led with 900mA max (advertized).



But when I put it to the test, I saw just 580mA, sad. So I opened it and done a dirty hack - soldered a little resistor (75 Ohm on picture) across feedback optocoupler. Now, Viper22A (constant current driver ic) sees less feedback current and drives harder, delivering stable 960mA after warming up. It works a lot hotter now, needs ventilation holes at least.


Forgot to mention that my leds max current is 1 Amp (advertized), I don't know really if I'm overdriving these leds.
Then I found unused lamp which was bought to fit CFL inside, but as it turned out there is no place even for small 15w CFL. I removed E27 screw holder, scraped paint in center and polished. Then drill two holed to hold led tight and put led on polished area with some CPU heat grease/paste. Yea, backside of this lamp is made of metal, it acts as somekind of heatsink now. Double holes at top and bottom is for airflow purpose. Hot air goes up, sucking less cooler air from bottom and so on.


Screwed frosted glass lens back.


The glass lens is not that great quality, as you can probably see it has somewhat greenish tint.


Yea, color is not really correct on this picture, but it's a cheapo led afterall =)
Let it work for a night and in the morning it was not that hot (I mean backside), this is good. Driver was naked while test and was pretty hot, so ventilation holes absolutely need. This was warm white led. Next time I'm going to use smaller lamp for retrofitting.

Wednesday, August 31, 2011

Nokia accessory as a CB radio external speaker hack



I thought it's nice to have a backup speaker for CB radio in a car. When I saw old Nokia BHF-3 handfree which is not in use, I start thinking how to hack it.
I desoldered phone connector, opened the case and found sound-in pads which is marked as LSIn+/-. Soldered 3.5mm jack to that pads and turned handfree on to test sound, and there was no sound at all.
So this handfree somehow knows when phone connected or sending sound in and turning on an amplifier. Time to check datasheets for chips on pcb. There is a chip marked as K990 in DFN8 package and looks like datasheet for TS4990 from STM fits nicely. This audio amplifier have standby pin with low active. So I just added a wire from Mute pad (which have +5v) to transistor base which turning standby on and viola, I have nice external speaker :) Don't know if it's powerful for cb radio incar use though, need some test run.

Friday, June 10, 2011

OBD-II USB adapter to Bluetooth adapter hack



Hi. Yes, I was pretty busy or lazy to write something. There was not interesting projects. The last one was a battery backup switcher, it switches power source to battery when mains go down. Based on relay and transistor.

Today project is not a big deal too :) I have a cheapo OBD-II USB adapter and serial bluetooth module. As bluetooth module was not used anywhere for a long time I decided to hack OBD-II USB adapter and make it Bluetooth instead of USB.
Yea I know I can buy a cheap Bluetooth OBD-II adapter, but I like DIY.



So I opened the box and found PIC18F4 mcu inside and FTDI232RL UART to USB serial converter.



Then I desoldered FTDI chip with usb crystal. My bluetooth serial module needs 3.3v supply, so I had to add 3.3v regulator with couple of capacitors (took 5v from 78M05 voltage regulator on pcb). OBD-II box has 5 leds indicating rx/tx from car and serial and power status, BT serial module can indicate it's status with led too, so I drilled a little hole in the box top right under sticker and glued the led with hot glue.



When I finally soldered this mess-o-wires to adapter pcb in place of FTDI chip I found that is does not work, not receiving or sending any data, but bluetooth pairing works and BT status led works as it should. Took a bit of time to solder FTDI chip and crystal back for debug. Find out that it works as USB ok but not bluetooth. Then I take a look where tx and rx connects to PIC mcu and you probably guess already, I connected BT module tx to PIC tx and that's wrong :) Changed wires and soldered them right to the PIC mcu legs, that works. Time run away and I leave FTDI chip on pcb.

That's it, works great with my Android phone even better than windows scanner apps under wine in Ubuntu :)