18x & 4D systems OLED display Automotive Gauge - FINISHED

nbw

Senior Member
Awesome!! Great work indeed. One small thing... the steering wheel's on the wrong side of the car ;-)
 

papaof2

Senior Member
Awesome!! Great work indeed. One small thing... the steering wheel's on the wrong side of the car ;-)
Looks fine on this side of the pond ;-)
I've been driving on that side for 40+ years (less two weeks in the UK a few years ago).

John
 
Last edited:

nbw

Senior Member
Where did you get that OLED juve? Nice and compact. Very impressive that a wee 18x can drive it too.
 

juve021

Member
Where did you get that OLED juve? Nice and compact. Very impressive that a wee 18x can drive it too.
Thanks for the compliments...
The oled and other sized/optioned displays are made by 4D systems (australia). I purchased mine from another vendor but they are readily available throughout the world.
 

nbw

Senior Member
Good stuff. How many bytes of code did it take to produce that nice display, with the different colours / digits / etc?
 

nbw

Senior Member
Is the OLED number 4DOLED-282815? I'm seriously thinking of having a go sticking one of these on a picaxe project. Was it very hard to intfc the screen to the 18X?
 

juve021

Member
The one I got is this one: http://www.4dsystems.com.au/prod.php?id=9

Very easy to interface to the 18x. You can get by with literally 3 wires to the LCD, +5, Ground and Rx. Of course, there is also a Tx from the display so that the 18x can verify reception and/or errors from the display.

Biggest thing is timing of the "initialization" Power on is critical so you may, depending upon your environment, have to compensate for this. For example, I had to add extra circuitry for a delayed +5 on to compensate for the ignition of the automobile going On-Off-On. The screen didn't like that.
 

nbw

Senior Member
Wow, I like it. Did you have to develop the characters / numerals yourself, and tell the OLED what colour to display them, something like that? Or does the display have a set of instruction codes the 18X passes it? I see 4D have quite a few modules. They have OLED at US29 instead of US49 for the one you used - I suspect the cheaper ones are also not as whizzy :)
 

juve021

Member
Wow, I like it. Did you have to develop the characters / numerals yourself, and tell the OLED what colour to display them, something like that? Or does the display have a set of instruction codes the 18X passes it? I see 4D have quite a few modules. They have OLED at US29 instead of US49 for the one you used - I suspect the cheaper ones are also not as whizzy :)
Yeah, the screen comes with 1 font in 3 different sized characters. All you need to do is send the oled the specific command for writing "text" or a "character" then send the character itself. In my pics above, the "Temp-f" is an example of such a built in font. The "Oil" and actual temperature readings are bitmaps I created (0-9 and "OIL") which are saved on the onboard micro SDcard and which are called by the 18x for display. Its really simple to hook up and program, honestly. Initialization is one command, wait a few ms and then start to send commands to the oled. Look at the manual/spec sheet of the OLED display you want to purchase for all the available commands.
 

eclectic

Moderator
That looks a really impressive project.
$49 for the display. Hmm? Sounds OK.

Could you post some code to help get us started?

e
 

juve021

Member
That looks a really impressive project.
$49 for the display. Hmm? Sounds OK.

Could you post some code to help get us started?

e
Sure, its pretty simple.

Here is some really crude code to get you going. Step #1, you must wait 500ms for the power to initialize to the OLED display before sending any commands.
Code:
'wait at least 500ms for power to initialize to OLED
pause 550
Step #2: If you don't send any commands within 5 seconds (I think its 5) the OLED displays its own splash screen/marque. So, you send an "auto baud rate" detect command to the OLED to detect the operating baud rate of the serout of the PICAXE. Also, the OLED's manual says it takes from 1 to "several" milliseconds for the OLED to respond to commands. So I chose to wait 50ms between commands. You could probably do with shorter.
Code:
 ' Initialize OLED - auto baudrate detect
 serout 2, T2400, ("U")
 pause 50
Step#3: Now that you have the PICAXE OLED connected and talking, its time to display whatever. For this, you can view the manual of commands and display text as a string or single character, images from the onboard microSD card, or even videos from the onboard microSD card. Of course, it also supports commands as putpixel, line, triangle, rectangle, polygon etc. For example, I can draw two horizontal lines running the width of the display, one at the top and one at the bottom of the display, in a yellowish/green color.
Code:
serout 2, T2400, ("L",$00,$00,$5F,$00,$7F,$80)
pause 50
serout 2, T2400, ("L",$00,$3F,$5F,$3F,$7F,$80)
pause 50
Thats the gist of things. Like I previously posted, you can get by with hooking up +5, ground and Rx pins on the OLED (so its a 1 wire hookup to the PICAXE, PICAXE sends out commands on a serout compatible pin) however if you want to receive acknowledgements from the OLED, you need to receive them from the OLED and hook up the Tx from the OLED to an input pin on the PICAXE.

Here's a schematic:

Let me know if guys would like to know anything else!
 
Last edited:

MPep

Senior Member
I like that alot.
Don't have any use for it this project myself, but offer congrats to a job well done.
 

nbw

Senior Member
That is really good. US49 is a little heavy but I'm wondering if some of their other ones might work... I think I spotted a US29 one. Or I could wait until Fathers' Day!!
 

juve021

Member
Thanks juve, for the info in post#12

e
Hey no problem guys. BTW, don't worry about the "reset" line, it is not necessary.

And yes, $49 is alittle much but honestly, IMO the display is so sharp, clear and bright I think its worth the extra than the regular LCD.
 

GreenLeader

Senior Member
Juve,
I like this one, might give it a go myself.
How did you delay the power-up of the OLED display?
The OLED manual says you should issue a power-down command before you take the power off to avoid damage - did you do that, if so how?
 

juve021

Member
Juve,
I like this one, might give it a go myself.
How did you delay the power-up of the OLED display?
The OLED manual says you should issue a power-down command before you take the power off to avoid damage - did you do that, if so how?
Hey Green, sorry for the late response...been hectic around here lately.

The power on circuit is a simple cap/resistor delayed on circuit you can find anywhere.

Yeah, for the power off command, I came across a simple cap, resistor, relay circuit on the web that provided power for x seconds after main power was cut off. In that x seconds, I detect that the main power is cut off via an interrupt with the picaxe and then my program interrupts to the interrupt subroutine which sends the power down command.
 
Top