Revisiting the OS96016PP08MB2B10 OLED Display (available in the Kemo Electronic S043 lucky bag) with a new demo - one for text.
This OLED does not have a built in character set so text needs to be stored in a lookup table of some sort on the PICAXE. I used the lookup command with data taken from here but M2 parts have 512 bytes of table memory so that can be used instead for a more limited character set.
The schematic
The schematic assumes use of the breakout board shown in the blog entry and positioning of the OLED Display at the far right of said breakout board as shown in this picture. The pin numbers that are shown in my schematic match those in the datasheet.
The 7660s are due to not having the correct inductor to use the built-in voltage boost circuit, but you can use the voltage boost circuit if you get the right inductor (see datasheet) or even use a 9V battery as long as it is not connected to the OLED when the low voltage power (3V) is not present (a transistor could be used for this).
If you obtain suitable components (required properties are shown in Table 3 (in the datasheet) such as the inductor needing >0.5A current rating), then you should be able to get a working voltage booster circuit to generate the voltage required for the OLED once you use the command to turn on the voltage booster circuit:
If it's a project where you want to blank the OLED when not in use to save power, then you can turn off the DC-DC converter - you can find out how to do this in the datasheet.
Inserting the resistor values from the datasheet (they're what I used) into this formula for the output voltage of the booster Vcc = 1.2*(R1+R2)/R2 results in a calculated voltage of 12.1V. However when I measured the output of the booster using a multimeter (whilst the booster was powering the OLED with contrast set to $7F) the voltage was 12.2V when there was normal text on the display but when all the pixels were turned on it dropped to 11.6V.
It's likely that a component I used has an inferior property that I overlooked compared to the components they chose. This has no noticeable effect on brightness but it's consuming 90mA at 3.3V and just 3-4mA (varies according to screen content) at ~12V is being consumed by the display making it less than 20% efficient. I used a 1N5817 diode, BS170 MOSFET and capacitors and resistors with the same values. Can anyone help with this?
Just to clear up any confusion, any pins on the OLED board that are 'touched' by a wire in the schematic are connected to that wire. One of the i2c lines are connected to two pins on the OLED because the OLED uses separate pins for serial data input and serial data output and these need to be kept separate for SPI or connected together for i2c which uses a bidirectional data bus. This demo uses i2c and a PICAXE-14M2.
The Demo
This demo displays the message you see below, then a screen with all pixels lit, then it shows all the characters in the character set on screen in groups of 32 (16 per line).
[Click for high resolution]
The correct part number is OS96016PP08MB2B10 but that is 17 characters, so can't all be displayed on one line. therefore only the first 16 characters are shown in the picture.
An unfortunate drawback of the PICAXE system is that due to the slow interpreter you can see the characters being sequentially written to the OLED. This could be improved by use of a 64MHz X2 part or a smaller character set, but it's never going to be perfect on a PICAXE. At least it's not intolerably slow.
OLED commands that use more than one byte have their extra bytes sent in the same hi2cout command as the first byte, without any extra 0s.
Now I have to split this up into two posts because of the text length limit in forum posts - this post is too long now that I have added the bit about the voltage booster circuit.
This OLED does not have a built in character set so text needs to be stored in a lookup table of some sort on the PICAXE. I used the lookup command with data taken from here but M2 parts have 512 bytes of table memory so that can be used instead for a more limited character set.
The schematic
The schematic assumes use of the breakout board shown in the blog entry and positioning of the OLED Display at the far right of said breakout board as shown in this picture. The pin numbers that are shown in my schematic match those in the datasheet.
The 7660s are due to not having the correct inductor to use the built-in voltage boost circuit, but you can use the voltage boost circuit if you get the right inductor (see datasheet) or even use a 9V battery as long as it is not connected to the OLED when the low voltage power (3V) is not present (a transistor could be used for this).
If you obtain suitable components (required properties are shown in Table 3 (in the datasheet) such as the inductor needing >0.5A current rating), then you should be able to get a working voltage booster circuit to generate the voltage required for the OLED once you use the command to turn on the voltage booster circuit:
Code:
hi2cout 0,(%10101101,%10001011) 'Turn on DC-DC
Inserting the resistor values from the datasheet (they're what I used) into this formula for the output voltage of the booster Vcc = 1.2*(R1+R2)/R2 results in a calculated voltage of 12.1V. However when I measured the output of the booster using a multimeter (whilst the booster was powering the OLED with contrast set to $7F) the voltage was 12.2V when there was normal text on the display but when all the pixels were turned on it dropped to 11.6V.
It's likely that a component I used has an inferior property that I overlooked compared to the components they chose. This has no noticeable effect on brightness but it's consuming 90mA at 3.3V and just 3-4mA (varies according to screen content) at ~12V is being consumed by the display making it less than 20% efficient. I used a 1N5817 diode, BS170 MOSFET and capacitors and resistors with the same values. Can anyone help with this?
Just to clear up any confusion, any pins on the OLED board that are 'touched' by a wire in the schematic are connected to that wire. One of the i2c lines are connected to two pins on the OLED because the OLED uses separate pins for serial data input and serial data output and these need to be kept separate for SPI or connected together for i2c which uses a bidirectional data bus. This demo uses i2c and a PICAXE-14M2.
The Demo
This demo displays the message you see below, then a screen with all pixels lit, then it shows all the characters in the character set on screen in groups of 32 (16 per line).
[Click for high resolution]
The correct part number is OS96016PP08MB2B10 but that is 17 characters, so can't all be displayed on one line. therefore only the first 16 characters are shown in the picture.
An unfortunate drawback of the PICAXE system is that due to the slow interpreter you can see the characters being sequentially written to the OLED. This could be improved by use of a 64MHz X2 part or a smaller character set, but it's never going to be perfect on a PICAXE. At least it's not intolerably slow.
OLED commands that use more than one byte have their extra bytes sent in the same hi2cout command as the first byte, without any extra 0s.
Now I have to split this up into two posts because of the text length limit in forum posts - this post is too long now that I have added the bit about the voltage booster circuit.
Last edited: