Arduino interface project

Audio, Electronics and Lighting questions and answers

Moderators: timk, Stu, zombie, Andrew, -alex, miata

User avatar
droo
Fast Driver
Posts: 286
Joined: Fri Apr 18, 2008 10:32 am
Vehicle: NA8
Location: The People's Republic of Bendigo

Re: Arduino interface project

Postby droo » Thu Jan 24, 2013 12:41 am

okies, it's been a while, and i've not really made time the past month on fine tuning my coding nor building more electronics for this, but in the month since posting originally, i've done a fair bit..

The mess of ribbon cable in my dash and centre console was starting to get to me, so i finally pulled my finger out tonight and completed the switch array. Currently, i'm using only 3 of 10 switches to control the arduino. The other 7 will be put to good use, more to be revealed later. With the switches in place, i've now reclaimed my cup holder area!

The switch bank was made by dicing up an old home stereo and using it's switches. This was the whole spark to the project a few months ago when i realised that it would actually fit in the 0.5 din gap left underneath my double din stereo.

The ergonomics arent perfect but not awkward. In time, i'll have the switches placed above the headunit instead of below and that would fix up any accessibility issues.

working several hours tonight on it, i wasnt able to get any decent photographs but did manage to take one quick video clip with my camera which i've slapped into a pseudo crappy video here..

http://youtu.be/iCdxZ_MMr64

I'll make something a little more polished when i've got it entirely completed..
But this gives a taster of some of the extra menus i've coded in since starting this.

User avatar
droo
Fast Driver
Posts: 286
Joined: Fri Apr 18, 2008 10:32 am
Vehicle: NA8
Location: The People's Republic of Bendigo

Re: Arduino interface project

Postby droo » Thu Jan 24, 2013 10:20 am

and a demo of the GPS menu in action.

http://www.youtube.com/watch?v=xCX0C2wLk_U

User avatar
droo
Fast Driver
Posts: 286
Joined: Fri Apr 18, 2008 10:32 am
Vehicle: NA8
Location: The People's Republic of Bendigo

Re: Arduino interface project

Postby droo » Thu Jan 24, 2013 1:08 pm

This post shows what i've done to make use of the ugly fail gap underneath the 2din headunit in the centre dash and turning it into WIN.
Its too small to make a tray and too big to put a blanking plate in without being distracting.

So, i had an epifanny a few months back at my parents place looking at two old radio boxes i'd used for electronics scavenging when i was a kid there. The switches on the boxes were arranged horizontally, and then i thought - what if... what if i cut it out, what if it could actually fit in the roadster... What if i actually had a life and did social things like normal people? What if i didn't care too much about that and wanted to do another "something different" on my car. The latter resonated with me more.

Essentially this was the start of the arduino project.. Without having this installed, controlling the display would be an afterthought and messy.

The pic below is the spare empty shell. Outlined in red was my exciting thought area..
The other radio box had more electronics in it still and is what i ended up using.

Image


I saw that the row of switches was pretty much already the right height for the 0.5Din gap beneath my headunit. I angle ground it down and made it fit..
Then realised the frame moulding for the plastic buttons were a little large, so i trimmed them too.
Then cut the circuit board.
Originally, the fascia clipped onto the plastic switch frame, and then snapped into the circuit board via clips.
Because the plastic was so fiddly to work with, three of the 4 clips ended up breaking. GRR.

so i epoxy resined it all together. Its unlikely it'll ever break now and extremely unlikely i'll ever need to do change the wiring on it.

This shows the cut out from the other radio casing.

Image



I've soldered the switches - common earth, then debounce circuitry located against the microcontroller via a rainbow ribbon cable.
yes its "gay" (get over it) but its heaps easy to identify which switch is which with the colour coding.
Image



here i've overlayed the cut out, the switch frame and the circuitboard together, and epoxy glued the cut out to the circuitboard.
Image

side view
Image

front view
Image

other side view
Image



and finally - all installed and working. (only using the right hand most 3 switches for the microcontroller at the time being.
Image

the four left buttons will be:
passenger one touch window down
passenger one touch window up
driver side down
driver side up

middle round buttons:
rear fog lights
front fog lights
parking assist cameras. (thats another thread i'm yet to post about)

and the right three buttons for the microcontroller display control:
menu down
menu select
menu up.

The group of 4 buttons on the left are easy to get to esp with your arm on the left of the gear stick. Easy access for passengers to use as well.
The middle buttons arent so ergonomic but as they're not accessed that often, thats ok.
The right group of 3 are easier accessed when your arm is on the right of the gear stick.

The buttons each have their own textures and are easy to identify each grouping by touch.
When the rest of the circuitry and programming is complete, i'll get the plastic labelled with each function.

Theres still a while to go but with the switch casing in, access to my cup holders has returned on the aft side of the gearstick (where i was hosting all the circuitry the past 2 months). I've got my programming USB cord rolled up in there and my headunit's iPhone charge cable is available again too! woot.

User avatar
Okibi
Speed Racer
Posts: 10898
Joined: Thu Aug 21, 2003 11:00 am
Vehicle: NB SE
Location: Perth, Western Australia
Contact:

Re: Arduino interface project

Postby Okibi » Thu Jan 24, 2013 7:44 pm

Great work droo, always wanted to build a similar system.

Not being good with electronics i've decided to start with a Raspberry Pi, hoping i'll have some time to work with it. The more I look at the electronics the more I think .. "what if".

First project is to have our garage door and gate able to be operated via mobile app but the sensors i've bought might lead me to consider building my own timing gear... if I ever find some spare time.

Very keen to watch your progress. Also watched a few videos where they'd pulled the data from the ODBII port but with Micks old car you don't have that luxury.
If you had access to a car like this, would you take it back right away? Neither would I.

User avatar
xatz
Driver
Posts: 69
Joined: Fri Jan 02, 2009 8:01 pm
Vehicle: NA6
Location: Newcastle
Contact:

Re: Arduino interface project

Postby xatz » Thu Jan 24, 2013 8:21 pm

Very nice man. I've been working on an arduino based logging solution for my 5. Currently gets speed and accelerometer data and logs to an sd card. Got it synced with a camera too. Next step is getting it to log on my phone via bluetooth and build in rpm logging.

Are you interfacing with the stock AFM or do you have an aftermarket computer?

And Okibi, make sure you are using 3.3V logic sensors with the Pi they don't like 5V much :P
JD

User avatar
droo
Fast Driver
Posts: 286
Joined: Fri Apr 18, 2008 10:32 am
Vehicle: NA8
Location: The People's Republic of Bendigo

Re: Arduino interface project

Postby droo » Fri Jan 25, 2013 12:27 pm

xatz - its reading (via an opamp for impedance isolation) from the standard na8 AFM - which is electrically stock, but i've modified for more airflow.

In time i have enough data lines free to interface an SD card addition for logging but I'm not doing track or lap times so currently have no need to explore those results.

Okibi - google has been invaluable, and reading through other forums and even youtube demos have pretty much provided me with either direct answers or a good direction with what i've picked up on this. Many of the additions dont require any interfacing electronics, they just wire into the arduino directly - or if they do, its one or two components (usually resistors) which are outlined exactly what value to use and exactly where to place it in the circuit. The GPS and temp sensors literally wire direclty into the arduino with nothing else added. Each only use 4 wires - 2 of which are +ve and gnd.

The rest of it is code to make it work. There are LOADs of demo codes online and i've essentially found, modified and adjusted them to suit exactly what i'm doing.
Give it a go! It's pretty empowering to see a result and your mind opens up to more possibilities with various additions to it.

Driving to Melbourne via the hilly Calder Highway last night, keeping my airflow reading at or below 50% (which means the vehicle slowing to 70 going up large inclines), my TPS at 10-12% (typical for 100kph speeds on flat ground in 5th gear) i was able to do 160km travelled with the fuel needle then touching the second line from full. Thats about 12 litres used from my mapping of the tank, and a value of 13.3km/L (7.5L/100) which is the best mileage i've achieved to date. One day i'll do a flat highway drive just to see exactly the best economy it will do.

While i could be driving similarly according to a vacuum gauge, i can see my throttle values with this setup which is originally what i wanted. Such incredibly slight movements on the throttle can make instant changes of 15-20% on airflow in any gear - more air - more fuel being used. bam..
Keeping the airflow below 50% all the time around city driving equates to very pedestrian acceleration but is acheivable in traffic conditions without being a hinderance. I know there'll be an angle of people saying who cares etc, and most of the time i don't, but it's been a goal of every car i've owned to learn it enough to drive it well at speed, and for best economy.

Johnnytheknife
Driver
Posts: 25
Joined: Sun Aug 11, 2013 4:21 pm
Vehicle: ND - 2 GT

Re: Arduino interface project

Postby Johnnytheknife » Fri Nov 08, 2013 11:50 am

I'm wanting to build a similar unit, but as a data logger using the logging shied, and probably also a gps shield.

Would it be possible for you to post a schematic for the circuit you used to prevent the arduino from interfering with the ecu and filter the output on the tps and afm connections? You mentioned you used op amps and not a voltage divider (presumably because the divider impacts the feed to the ecu), but I'm struggling to visualise how this would be configured.

I have some electronics knowledge, but am new to micro controllers. I do have some professional background in programming.

Thanks,

JtK


Return to “MX5 Audio, Electronics & Lighting”

Who is online

Users browsing this forum: No registered users and 234 guests