Honkytonk's Black P-Shed

For you to showcase what you've done to your car and give other members ideas and inspiration.
User avatar
Honkytonk
Club Member
Club Member
Posts: 578
Joined: Mon Mar 11, 2019 10:52 pm
RX-8: PZ
Colour: Brilliant Black
Location: Salisbury, Wiltshire
Has thanked: 142 times
Been thanked: 228 times

Re: Honkytonk's Black P-Shed

Post by Honkytonk » Thu Nov 28, 2019 2:28 pm

Soo some of my bits have arrived, but not all, and I'm absolutely rammed at work at the moment and with family illness, wedding planning, and less hours of daylight available, have had barely any time when I'm out of it to get anything done on the car. At the moment, I'm essentially the reverse Vj4sothername.

I still haven't fitted;

1. My new battery
2. The mousemat
3. A replacement rear box for the exhaust (it's not unbearably loud luckily, just a bit...blowy at about 3.5k rpm)
4. Or even had a chance to glance at the headlight levelling system and see how crocked that is...

However, I've just purchased new front tyres for fitting (at work!) Monday, as my friendly neighbourhood tyre man gave me a deal on a pair of 225/45R18 Eagle F1 Aysmmetric 5's that made them virtually the same price as one(!) PilotSport (sorry to the Michelin lobby). Couldn't really turn that down, so on they go! I'll be matched front and back then, so can give a decent review. Bearing in mind the Potenzas put on by previous owner were apparently new in January, they really haven't lasted that well, as they're getting a bit thinner than I'd like and haven't even lasted a full year. Buy cheap, buy twice...

Over my lunch just now at work I did knock together the following circuit and code on Tinkercad, picture attached. Caveats here; I'm not really sure about pressure conversion yet, and will have to run some tests with voltages to make sure everything marries up happily for both that and Temp when I have my 'real' sensors. I'm buying an I2C and also an SPI OLED to see which works best in the setup, but couldn't see anything other than LCD's on tinkercad so LCD for the mockup it is.

All that aside, I'm quite happy with it bearing in mind I'd not even looked at how Arduino coding works or messed about with wiring the thing till an hour ago!
arduino dash.jpg
Code's spoilered below if for whatever reason you wanted to replicate my work and don't want to squint. It's by no means finished or fancy, but hey, it works virtually, so it can't be all bad! I'll probably end up working the adafruit OLED libraries, as they're pretty standard across everything on ebay. Plus you can do things like draw shapes and create animations easily, which gives me ideas...
Spoiler:

Code: Select all

/*
  The circuit:
** LCD1
 * LCD RS pin to digital pin 7
 * LCD Enable pin to digital pin 6
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)
**LCD2
  * LCD RS pin to digital pin 13
 * LCD Enable pin to digital pin 12
 * LCD D4 pin to digital pin 11
 * LCD D5 pin to digital pin 10
 * LCD D6 pin to digital pin 9
 * LCD D7 pin to digital pin 8
 * LCD R/W pin to ground
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

--------------------
 
 */


// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd1(7, 6, 5, 4, 3, 2);
LiquidCrystal lcd2(13, 12, 11, 10, 9, 8);
//initializing variables
int value=0;            
float volts=0.0;      
float temp=0.0;      
float tempF=0.0;
float volts2 =0.0;
float pres=0.0;


void setup() {
  pinMode(3,INPUT);      //setting arduino pin3 as input for lcd1
  pinMode(9,INPUT);     //setting ardunio pin9 as input for lcd2
  Serial.begin(9600);   // opens serial port, sets data rate to 9600 bps
  lcd1.begin(16,2);      // set up LCD1's number of columns and rows
  lcd2.begin(16,2);     // set up LCD2's number of columns and rows

}

void loop() {
  //read from A1
  value=analogRead(A1);        
  volts=(value/1024.0)*5.0;      //conversion to volts
  temp= volts*100.0;             //conversion to temp Celsius
  tempF=temp*9/5+32;             //conversion to temp Fahrenheit
  
  //read from A0
  value=analogRead(A0);         
  volts=(value/1024.0);          //conversion to volts as above
  pres=volts*175;                //chose a random value here

//display temp lcd1

  Serial.print("temperature= "); 
  Serial.println(temp);
  lcd1.setCursor(0,0);
  lcd1.print(temp);
  lcd1.print(" C");
  lcd1.setCursor(0,1);
  lcd1.print("RX-8 OIL TEMP");
 
//display pres lcd2

  Serial.print("pressure= "); 
  Serial.println(pres);
  lcd2.setCursor(0,0);
  lcd2.print(pres);
  lcd2.print("Psi");
  lcd2.setCursor(0,1);
  lcd2.print("RX-8 OIL PSI");
  
  delay(20);
}
In all honesty I'm probably not going to have nearly as much time as I need to get things done on the car, so priorities for January MOT (it's due on the 24th, with the Vectra on the 2nd Feb #-o, meaning I'll be pushing the 8 as early in Jan as possible to spread out the pain) are to get the exhaust done and clear my headlight level code so it can get through that.

And we'll just not even think about the rust and maybe it'll go away?!
These users thanked the author Honkytonk for the post (total 2):
Paul_13 (Thu Nov 28, 2019 8:09 pm) • Vj4sothername (Thu Nov 28, 2019 8:12 pm)
Have a gander at my slightly rusty pride and joy in
The P-Shed Project Thread

Vj4sothername
Club Member
Club Member
Posts: 395
Joined: Fri Sep 06, 2019 6:40 pm
RX-8: 231
Colour: Brilliant Black
Location: Oxford
Has thanked: 184 times
Been thanked: 61 times

Re: Honkytonk's Black P-Shed

Post by Vj4sothername » Thu Nov 28, 2019 8:25 pm

I found not sleeping is a great way to get more time and then use the normal waking hours to redo late night mistakes.

Looking really good. I'm going to be stealing bits of your code for the LCD conversation! So don't rush as I'll have to roll my sleeves up once you've got yours sorted.
These users thanked the author Vj4sothername for the post:
Honkytonk (Fri Nov 29, 2019 11:11 pm)
S1 - 231 - brilliant black
Feb 08 built,
Fake Toyosport back box,
Dents,
Scratches,
Replacement engine,
Smiles

User avatar
zippyonline
Club Member
Club Member
Posts: 1298
Joined: Mon May 05, 2014 11:16 am
RX-8: Evolve
Colour: Copper Red
Location: Essex/Suffolk
Has thanked: 48 times
Been thanked: 86 times

Re: Honkytonk's Black P-Shed

Post by zippyonline » Sun Dec 01, 2019 5:34 pm

Nice work! Once you have it all working, I may well steal your code and copy exactly what you've done electronics wise. I'm capable enough to copy, but I don't know enough to do that from scratch!
Copper Red Evolve - viewtopic.php?f=104&t=71400

User avatar
Honkytonk
Club Member
Club Member
Posts: 578
Joined: Mon Mar 11, 2019 10:52 pm
RX-8: PZ
Colour: Brilliant Black
Location: Salisbury, Wiltshire
Has thanked: 142 times
Been thanked: 228 times

Re: Honkytonk's Black P-Shed

Post by Honkytonk » Mon Dec 02, 2019 10:35 pm

Woke up a very chilly looking shed this morning to get her new shoes fitted.
received_1420062591476230.jpeg
The spoiler is apparently a fantastic place for ice crystals to form.
received_2412312549096946.jpeg
I was originally going to get the tyres fitted through a mobile fitter, but he phoned to say he was unable to make it (I presume not due to a flat tyre...), so sent me to the Protyre guys on Churchfields. My third visit there and I really rate the place, the manager is an 8 fan and checked I was happy with how they'd treated the car before I left. They're a bit... hectic, but they do a good job. Had a free tracking check, just to get some numbers for interest's sake.
received_565698357548559.jpeg
As expected, they set the hunter to 'Standard' not 'Sport', but here's some numbers for people to judge. Bearing in mind the tracking was last vaguely looked at when Tim at RX Motors swapped my front suspension, other than being a bit on the wonk steering wise (which will be pothole related) I think it's a testament to his work.
received_2618607821696169.jpeg
My OLEDS also arrived today, I ordered a couple of sizes to see what the difference would be like. Here's the smallest, with a green Quality Street (I mean, it is December...) for scale.
received_521850135072892.jpeg
The bad news, having had a fiddle around with them this evening, is that even the smallest won't fit behind where I'd like to mount them in the gauge. And the dash plates I was hoping was translucent plastic painted black, is unfortunately black plastic with translucent areas. I think I have thought of a way around this, but I'll need to go and have a stroke of the beard for a while until I can mock something up.

The good news though, is that the OLEDS are bright, crisp, cheap, and not much more difficult to code than LCD. I'll pop some code up when I've got something to share (at the moment I'm just working through basic display commands). The ones I've already bought won't go to waste. There are also even tinier ones on banggood...

I just need me damn oil temp sensor to arrive and I can start getting some real world mockups testing.

I will say right now to anyone who is completely ignorant of coding or electronics but wished they could do either - Arduino is a really great place to start. There are so many kits and tutorials out there based on pretty much anything, that it won't take you long to build something from scratch you never thought you'd be able to. And it's dirt cheap too!
These users thanked the author Honkytonk for the post (total 2):
Vj4sothername (Tue Dec 03, 2019 6:03 am) • Paul_13 (Tue Dec 03, 2019 7:18 am)
Have a gander at my slightly rusty pride and joy in
The P-Shed Project Thread

doobedoobedo
Club Member
Club Member
Posts: 32
Joined: Sun Sep 15, 2019 10:52 am
RX-8: 192
Colour: Brilliant Black
Location: Milton Keynes
Has thanked: 0
Been thanked: 6 times

Re: Honkytonk's Black P-Shed

Post by doobedoobedo » Mon Dec 02, 2019 11:13 pm

Love those little oleds. I'd heartily recommend Oli Krauss' u8glib/u8g2 if you're using arduino it's much more flexible than the adafruit library.

User avatar
Honkytonk
Club Member
Club Member
Posts: 578
Joined: Mon Mar 11, 2019 10:52 pm
RX-8: PZ
Colour: Brilliant Black
Location: Salisbury, Wiltshire
Has thanked: 142 times
Been thanked: 228 times

Re: Honkytonk's Black P-Shed

Post by Honkytonk » Tue Dec 03, 2019 7:14 am

doobedoobedo wrote:
Mon Dec 02, 2019 11:13 pm
Love those little oleds. I'd heartily recommend Oli Krauss' u8glib/u8g2 if you're using arduino it's much more flexible than the adafruit library.
Ooh, I'll investigate. I'm currently using the SSD1331 library as I've bought full colour OLEDs and that was simply the recommended one from the sellers.

I may have bought a 0.49"monochrome whilst half awake this morning...
Have a gander at my slightly rusty pride and joy in
The P-Shed Project Thread

doobedoobedo
Club Member
Club Member
Posts: 32
Joined: Sun Sep 15, 2019 10:52 am
RX-8: 192
Colour: Brilliant Black
Location: Milton Keynes
Has thanked: 0
Been thanked: 6 times

Re: Honkytonk's Black P-Shed

Post by doobedoobedo » Tue Dec 03, 2019 9:10 am

I'll admit I've mainly used the monochrome ones. It looks like his Ucglib has support for colour and that controller.

User avatar
Honkytonk
Club Member
Club Member
Posts: 578
Joined: Mon Mar 11, 2019 10:52 pm
RX-8: PZ
Colour: Brilliant Black
Location: Salisbury, Wiltshire
Has thanked: 142 times
Been thanked: 228 times

Re: Honkytonk's Black P-Shed

Post by Honkytonk » Wed Dec 04, 2019 10:56 pm

I had some spare time at lunch so whacked together this crude nonsense. I'm thinking of some boot animations on the OLEDs which will be synced. The repeating sequence was a first attempt at animation, and it's worked terribly. :lol:

I won't post code for this yet as it's a mess. Feel free to ask for it if you really want to, but I'd wait for a bit.



I need to find some sensible way to refine the animation but otherwise I've got the display of images down, the display of readings down, and so am pretty much set barring the arrival of the rest of the components. Oh, and mounting the thing, which may well mean creating a custom fascia plate unless I can think of a better way of doing it using the original components.
These users thanked the author Honkytonk for the post (total 2):
Vj4sothername (Wed Dec 04, 2019 11:35 pm) • Paul_13 (Thu Dec 05, 2019 5:57 am)
Have a gander at my slightly rusty pride and joy in
The P-Shed Project Thread

doobedoobedo
Club Member
Club Member
Posts: 32
Joined: Sun Sep 15, 2019 10:52 am
RX-8: 192
Colour: Brilliant Black
Location: Milton Keynes
Has thanked: 0
Been thanked: 6 times

Re: Honkytonk's Black P-Shed

Post by doobedoobedo » Thu Dec 05, 2019 12:29 am

Nice :).

Are you using bitmaps for the animation or plotting?

User avatar
Honkytonk
Club Member
Club Member
Posts: 578
Joined: Mon Mar 11, 2019 10:52 pm
RX-8: PZ
Colour: Brilliant Black
Location: Salisbury, Wiltshire
Has thanked: 142 times
Been thanked: 228 times

Re: Honkytonk's Black P-Shed

Post by Honkytonk » Thu Dec 05, 2019 7:14 am

Bitmaps, but I'm starting to think it won't refresh through quick enough, at least with the Adafruit SSD1331 libs. Most of the examples have static images bouncing around the screen rather than having a series of images one after the other like I would think of as traditional animation. I'll get there, benefit of working on this kind of thing is I can do it in 10 minute bursts when I get time.
Have a gander at my slightly rusty pride and joy in
The P-Shed Project Thread

User avatar
Honkytonk
Club Member
Club Member
Posts: 578
Joined: Mon Mar 11, 2019 10:52 pm
RX-8: PZ
Colour: Brilliant Black
Location: Salisbury, Wiltshire
Has thanked: 142 times
Been thanked: 228 times

Re: Honkytonk's Black P-Shed

Post by Honkytonk » Sun Dec 08, 2019 10:55 pm

You ever have those weekends that just feel like you haven't really had any time off? I managed to squeeze in a little bit of development yesterday morning luckily, and have a functioning temperature measurement system now.



Before you ask - no my kettle is not that effective. I was just multiplying read temperatures by 3 to provide some testing values in the rough range of 'good' temps. Out of interest, what would people expect that range to be? I've chosen about 75-115C but would be interested to hear opinions on what a 'Good' temp range would be. I've since merged this and the slightly improved animation code and tweaked it to make it easier to read. I'll pop that code up tomorrow.

Unfortunately my testing was halted by a minor accident involving a laptop (and the setup attached to it) being pulled to the floor by an accidentally yanked power cable. Something's broken somewhere on either the Arduino or the OLED, as after some coaxing I've got the former working again but the latter just heats up and refuses to display. Replacement pair of those are on the way...

Pressure sensor is my next step. I have this digital sender which arrived along with a cheap LCD gauge(less than a tenner...);

Image

And just need to work out how it wires up. I'm presuming it's a one wire setup with reference to ground and +ve coming from the gauge's connection to the car's power , but there's no documentation with the gauge.

Two weeks and I should have some time to sort out some more mechanical niggles, like the headlight levelling and exhaust. I'm half tempted to just drop it into RX Motors just to get it done and kocher for MOT, but I'm stubborn, and don't like giving in that easy.
Have a gander at my slightly rusty pride and joy in
The P-Shed Project Thread

Post Reply

Return to “Personal Car Projects and Mods”