Jump to content

R7 WSC's Blog

  • entries
    5
  • comments
    34
  • views
    212,084

Arduino Switch Controller - finished


Kit Car Electronics and Essex AO

26,609 views

blog-0403855001357144597.jpgWell the steering wheel transmitter and dashboard are almost finished - now I need the wireless switch controller so it all works...

Previous blog on button upgrade gave the basic details - this is a continuation.

The heart of the switch controller is an Arduino Nano micro-controller - this is going to be the interface between the dashboard switches, wireless steering wheel buttons and the car's lighting, indicators, windscreen wipers and DigiDash2 GPS stopwatch.

So far, I have got a 2.4GHz transceiver working with the Nano - receives all the steering wheel button presses:

IMG_2178_zps3e03319e.jpg

This should make it easy to have self-cancelling indicators, intermittent wipe, auto wipe on wash, plus can use multiple button presses to choose sidelight/ headlight or wiper speeds - any logic you like, really since its all software controlled. Also removes the need for any electronic hazard flasher or ballast resistors with LED lights, as the MOSFET should handle it all.

I've started on the wiring schematic for the controller - first time I've used MOSFETS, so should be interesting - any electronics enthusiasts please feel free to critique. :) I'm using the excellent (free) expressSCH software having previously drowned in untidy paper sketches...

 

Next step is to mount the voltage regulator and input/ output resistors on a stripboard and get the thing cased up, then put the transistors/ MOSFETS on a large heatsink that will attach beneath the scuttle somewhere and sort out the wiring mods to the Westield loom...

Here's an updated schematic that includes the circuit for low-side switching and component part numbers: I realised that it would be easy to use low-side switching on the wiper motor as the ground is accessible - the circuit is simpler and high current N-channel MOSFET's are cheap.

I'm going to start testing the circuits and writing the code this weekend hopefully... If I find anything wrong, I'll update the schematic in case anyone else plans to use it 😉

 

10/1/13 - tested all the circuits - no problems found, so I went ahead with the stripboard layout, about to start soldering up...

13/1/13 - stripboard finished, ordered a box and some pcb terminals to make it easy to wire in... Getting closer!

IMG_2181_zps59d4eb98.jpg

21/7/13 Distracted myself with some building projects at home, but back on the case now...

Added the pcb terminals and fitted to a case - ready for mounting in the car finally...

IMG_2183_zps4778db40.jpg

IMG_2182_zps1f93782a.jpg

Arduino sketch

29/12/13 Finally finished! I made a few changes to keep hazard and sidelight circuits working with the ignition off- the Arduino effectively just replaces the indicator switch and controls dipped and main beam relay. I also added a reed switch with single magnet on the steering column to cancel the indicators. So a single indicator press will switch on for up to 15 sec if the steering doesn't move, but if the steering returns to straight ahead then I wait 3 secs and cancel. This should work well for roundabouts or side turns. Otherwise, pressing the button again will turn off, or pressing the other side button will switch direction. It would be really easy (and cheap) to just make a self cancelling indicator controller better than any you can buy using the same method - perhaps I should draw a kit up?

Final version of schematic and stripboard layout.

I had planned to use the hazard feed with diode as shown on the schematic earlier, but in the end decided it would be easier and safer to hard wire the hazards as 'normal' but then use the normal 'Lucus switch' live indicator feed to supply the Mosfets. This means that even if the Arduino fails, the hazards still work.

For the sidelight, I've hardwired it with a latching changeover Durite relay, so it always toggles on/off/on/off/on/off with a savage momentary switch (could also have used a latching switch with a standard relay which is cheaper). Then I sense the 12V relay changeover (so HIGH when sidelights off, LOW when on) and use this to cycle headlights on and off. So with ignition off you get sidelight on/off/on/off, but with ignition on you get side+head/off/side/off/side+head/off etc. If headlights are on then main beam latches on or off with each button press, otherwise main beam is just a 1s flash. Seems to work well...

Dash nearly finished:

IMAG0202_zps4a45f41a.jpg

wiring about to be connected and tie wrapped – you can just see the reed switch inside heatshrink tied below the steering column top bracket.

IMAG0200_zpsad468ea4.jpg

Then I have a strong small magnet (8x5x2mm) attached to the shaft so the switch is closed around the straight ahead position:

IMAG0204_zps6bc2bc5e.jpg

MOSFET’s and wiper park relay

IMAG0195_zps90137a33.jpg

It’s working perfectly – takes about 2 seconds to boot from ignition on, which is fine. I’ve added all the diodes and resistors for the Savage lights so they all work nicely too.

17 Comments


Recommended Comments

FILFAN

Posted

I'm guessing it would be fed from a switched live. If so then you won't have any hazards unless the ignition is on. How about if you make the relay switch double gang (think that's what it's called) to provide a secondary switched live so you would always have hazards

Kit Car Electronics and Essex AO

Posted

Good point! The Savage hazard switch is a double pole latched one, so I can add a secondary live off a permanent feed like you suggest, thanks :-)

FILFAN

Posted

Not just a pretty face :)

Kit Car Electronics and Essex AO

Posted

I was too busy drawing pretty pictures to think about how to fit this - of course the car wiring is all high-side switched, so I need to change the N-type MOSFETS to P-type. Version 2 on it's way...

adamnreeves

Posted

I acutally bought an Arduino module last year with view to doing this.

Not had much time to do much with it other than writting some programs to control LEDs etc. So I am watching with interest.

Kit Car Electronics and Essex AO

Posted

I thought there'd be some other arduino 'enthusiasts' out there, Adam! I've ordered all the parts now, version 1.2 details coming soon...

Dave Eastwood (Gadgetman) - Club Chairman

Posted

Await with interest!

FILFAN

Posted

Hazard switch looks good :yes:

Sparkymart

Posted

Just seen this blog I'm well impressed I was thinking about making steering wheel switch setup but using slip rings.I've looked at the Arduino but never done any writing of code.so will the transmitter be self powered by its own battery if it is how long would it last ? Did it cost much for the components to build it.can the Arduino drive a LCD screen be cool to have warning indicator's displayed on a screen instead of plain dash lights

Keep up the good work

Kit Car Electronics and Essex AO

Posted

More info on my other blog on the steering wheel, but basically the battery should last a few years... I haven't added it all up, but will be much less than the cost of the buttons... LCD no problem, touch screen could also be possible instead of buttons...

Dave Eastwood (Gadgetman) - Club Chairman

Posted

Okey Dokey Arduino kit arrived yesterday, along with some test kit stuff to have a play around with before actually attempting to make an in-car controller.

 

Least that way I can thoroughly test the basics of it on the bench to make sure I've got programming/wiring correct!

ian clear

Posted

I have found this Blog very interesting. I built myself a self cancelling indicator unit and have purchased from Rally Design a steering wheel with two buttons which operate the indicators. My SW is removable so I connect it via a 3 pin cable. I am contemplating adding a horn button and headlight button but this would make the cable rather large, so WiFi may be the way to go. I already have an Aduino as I hope to one day build a performance monitor using the signals that supply my speedo from the Lobro joints. 

Dave Eastwood (Gadgetman) - Club Chairman

Posted

Good to see you've progressed!

 

interesting to see the code; just at the learning the differences stage at the moment. (Have done some work in C-like languages before, though not quite the same!)

 

Dave

Kit Car Electronics and Essex AO

Posted

All tested, apart from the mosfet speed control for the wiper motor, fingers crossed! Just need to make a heatsink plate now!

ian clear

Posted

The key to your system is your code for the Aduino. I have an Aduino Uno also a detachable steering wheel. I would be interested in seeing a copy if you are willing.

Kit Car Electronics and Essex AO

Posted

I've put the code up here as a pdf, Ian (last post in blog) - I can email you the actual Arduino sketches if you prefer - just pm me your address.

Hammy

Posted

great stuff this !

×
×
  • Create New...

Important Information

Please review our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.