Search This Blog

Showing posts with label twi. Show all posts
Showing posts with label twi. Show all posts

Friday, 16 July 2021

 Reverse Engineering an LCD Display

I have a DAB radio which started to irritate me in various ways. Finally fed up with it, I bought another radio and decided to free up the space that the old radio takes up by tearing it down.

This is the DAB radio taken apart:


 

Nice display 16 char 2 line dot matrix.


Looking at PCB, it seems to have a three wire interface:


Scoping up the lines, one looks like a reset:

Others have data and clock:


Looking at the data, there's a different voltage level in there. I2C has an ACK which comes from a different computer to the one generating the data, so different level makes sense.

As this is probably I2C, switching on the decoder in the scope shows what is being sent:


Now we know the I2C slave address and some data. It does look like I2C. What device is it though? Searching the internet gives a few options. It could be a standard I2C GPIO expander attached to an LCD controller.

After power up there's an initialisation sequence:

That's the first byte in a longer sequence that goes:

0x39, 0x14, 0x7f, 0x57, 0x6b, 0x0c, 0x01,0x06, 0x38, 0x40.

There also seem to be two bytes for every bte of data transmitted, the initialisation bytes have a ledaing byte of 0x00, the data bytes have a value 0f 0x40.

Using this sequence we could maybe find the controller that is used. After more searching there's a possible match. The Winstar WO1602I-TFH- AT module has an initialisation sequence that is similar.  The datasheet  shows the initialisation sequence to be:

0x38, 0x39, 0x14, 0x74, 0x54, 0x6f, 0x0c, 0x01

This is similar enough to probably be the same controller with a slightly different LCD attached. The datasheet is useful. It says the controller is an ST7032, and the first byte of the two that are sent is a control byte. It holds Co and RS. RS is the command/data bit, while Co is a continuation bit that allows more than one control byte to be sent. The datasheet shows the RS bit as bit 6 which matches the trace on the scope. It looks like this is indeed the controller in the display.

Excellent, we have enough data to probably drive this display.









Wednesday, 9 March 2016

OLED Watch V2

The second version of the OLED watch PCBs turned up yesterday, so this morning I assembled a board and programmed the firmware. The boards are in a nice blue colour this time:






The assembled board is quite neat:





The firmware ran first time, as I had altered the breadboard version to match the layout and adjusted the firmware. Let's see how well it works...




Wednesday, 15 April 2015

Dehydrator MK 2

After success with Dehydrator MK 1, I decided that the cardboard box would probably give out after a while, but before that happened the supply of 100W light bulbs would run out. Several bulbs failed and they are now difficult to buy, so I decided to build a more solid solution.

I'd need a heat source, a fan, and something to control it all. In the end I added a temperature sensor and a humidity sensor, and attached an LCD panel that I had hanging around. An Arduino Uno controls everything.



The power for all the circuitry comes from a slightly modified power supply PCB from an old video recorder. I modified a couple of supplies to get 12V and 5V and added voltage control from one of the Arduino PWM ports so that I could control the fan speed using firmware.

Video recorder PSU PCB

The electronics is in a separate area to the drying chamber, with a hinged front panel to allow access.


The arduino and the display are on one panel:


The fan and power supply and the power resistor controller are on a second panel:




The heat source I settled on was a 200W wire wound resistor that was connected across the mains supply using a triac with an opto isolated trigger from one of the Arduino GPIO lines. The algorithm works on a 30s cycle, altering the duty cycle of the power drive between 0% and 100%, in order to get different power outputs from the power resistor.

I also added an I2C temperature and relative humidity sensor so that I can attempt some form of automation in the future. All the power settings and readouts from sensors fits on the LCD display:



The trays fit in from the top (something I may change in a dehydrator MK 3, as it's a bit fiddly but it does make the air flow easier) and are wooden frames with plastic mesh on them.

I've dried apple, tomatoes and mango in the drier so far and the results are pretty good, I can't tell dried mango from the dehydrator from shop bought dried mango.