Log in

View Full Version : Electrical mods - ideas wanted


skumlerud
18-08-08, 06:35 PM
I'm in the process of changing the electrical system on my curvy. Instead of the traditional harness, I'm going to replace most of the wiring with a couple of microcontrollers and a databus. There will be one microcontroller in the front of the bike, this will read the status of the handlebar switches and control a small LCD display as well as the idiot lights. There will also be one microcontroller in the rear (possible in the tail light) which will control all lights on the bike. These microcontrollers will communicate using a simple serial protocol. By doing this I'll loose a lot of wiring and be able to do all sorts of fancy stuff with the lights, LCD, idiot lights etc. For now I won't do anything with the ignition and starter circuits, but that might change.

I'm also going to replace all lights except the headlight with LEDs (bought 200 ultrabright white LEDs a while ago, have to use them for something!) as these respond a lot quicker than bulbs.

By using a microcontroller to control the lights, I can do all sorts of tricks. I can modulate all lights except the headlight, switch/fade/modulate each light individually, adjust the intensity of the lights automatically depending on how dark it is etc. There is also the LCD which will be mounted next to the gauges, this can be used for all sorts of things.

Due to illness (hurt my back a while ago, and recently had some spinal surgery done) I can't work on my bike for quite a while. So I have this laptop, a couple of Arduinos, breadboards and various electronic components next to my bed and want to make something useful. I've made a mock-up of the final system using LEDs to represent the various lights, and I'm now working on the software. So far I'm aiming to implement the following features:

Flashing the indicators. Hazard-lights. Self-canceling. The indicators will not simply flash on/off, but flash on and fade out.
The tail light will be modified, I'm going to remove the bulbs and replace them with loads of LEDs. The LEDs will be divided into four areas, each of them can be controlled individually. So I'm going to run these at a steady low intensity when operating as a normal tail light, and do something fancy when operating as brake light. E.g. flashing from left to right (Knight rider style), pulsing, rapid flashing etc.
I'll replace the sidelight with some ultrabright LEDs and modulate it when the head light is switched on.
Head light (dipped beam) will always be on whenever the engine is running. Will use the oil pressure signal to determine if the engine is running or not. Switching it off while running the starter helps starting when it's cold.
The LCD (a simple, two-line character based display with backlight) will replace most of the idiot lights, the exception will be the oil pressure and temperature lights which I'll keep hardwired just to be safe. I already have a Trailtech Vapor so I won't implement a speedo or tachometer.
Welcome-message on the LCD and flashing lights when the ignition is switched on.
Any ideas on what else to do? I'm pretty much free to do whatever I want, as all lights are completely controlled in software. I just need some fresh ideas :)

riktherider
18-08-08, 06:42 PM
have a rear fog light option....REALLY bright for those foggy days!
could also do some sort of pattern with the LED's int he rear light with the touch of a switch.

Woz
18-08-08, 06:46 PM
could also do some sort of pattern with the LED's int he rear light with the touch of a switch.

Something that says "BACK OFF TO$$ER!" :D

ooger
18-08-08, 07:00 PM
8 gang surge strip for those demanding camping days

St0rmer66
18-08-08, 07:03 PM
Don't think you can legally have the indicators fading in and out, they have to flash.

skumlerud
18-08-08, 07:24 PM
have a rear fog light option....REALLY bright for those foggy days!

Good idea! I'm not sure how to switch on the fog-light though, I was hoping to use only the stock handlebar switches to keep a "factory" look.

could also do some sort of pattern with the LED's int he rear light with the touch of a switch.

I'm afraid that the microcontroller I'm using is not able to do something like this. There's a lot of dirt-cheap LED-displays on eBay though. A friend of mine put one of those on the back of his plate, and whenever he used the pass-switch the plate would flip 180 degrees and show the LED-display.

riktherider
18-08-08, 07:26 PM
[quote=skumlerud;1598754]Good idea! I'm not sure how to switch on the fog-light though, I was hoping to use only the stock handlebar switches to keep a "factory" look.


could use some sort of thermal/enviromental switch which know when its foggy, set in the seat unit somewhere, if it exists that is.

skumlerud
18-08-08, 07:26 PM
Don't think you can legally have the indicators fading in and out, they have to flash.

They will flash on, but fade (quite rapidly) out. I don't think this will be a problem. Anyway, there's no such thing as a MOT for motorcycles here in Norway :)

skumlerud
18-08-08, 07:30 PM
could use some sort of thermal/enviromental switch which know when its foggy, set in the seat unit somewhere, if it exists that is.

I'll look into this. I plan to automatically adjust the brightness of the lights depending on light-conditions anyway, this will be a variant of this. A fog-light is a good idea.

St0rmer66
18-08-08, 09:53 PM
They will flash on, but fade (quite rapidly) out. I don't think this will be a problem. Anyway, there's no such thing as a MOT for motorcycles here in Norway :)
Ah, sorry didn't see you were in Norway. I assumed it was in the UK.

fastdruid
18-08-08, 10:02 PM
If you use CANBus[1] then you might be able to buy bits intended for cars and modify them (eg take the gubbins out of a car tail light).

Good luck though and keep us updated!

Druid

[1] I believe the modern ducati's use it.

Mr Speirs
18-08-08, 10:15 PM
You should have a test mode that you could switch on where it will randomly flash multiple lights to create a Vegas like light show. Utterly useless but it would be a good way to show people what you have done with all this technology without going into too much detail.

skumlerud
18-08-08, 10:51 PM
If you use CANBus[1] then you might be able to buy bits intended for cars and modify them (eg take the gubbins out of a car tail light).

I've used to work with cars using CANbus, and for this project it will be more work using CANbus and hacking existing parts than making it from scratch. The Arduino boards are extremely easy to work with, and I only need a few external parts (a few MOSFETs basically) to interface with the lights on my SV.

skumlerud
18-08-08, 10:59 PM
You should have a test mode that you could switch on where it will randomly flash multiple lights to create a Vegas like light show. Utterly useless but it would be a good way to show people what you have done with all this technology without going into too much detail.

Indeed :) In fact, this was the first thing I did, although with more emphasis on testing than on show-off. Doesn't look too impressive with the puny red LEDs I'm using for the prototype though!

fastdruid
18-08-08, 11:00 PM
I've used to work with cars using CANbus, and for this project it will be more work using CANbus and hacking existing parts than making it from scratch. The Arduino boards are extremely easy to work with, and I only need a few external parts (a few MOSFETs basically) to interface with the lights on my SV.

I thought as much but thought it was worth mentioning in case. :)

Druid

Nicky S
18-08-08, 11:22 PM
this sounds well gd m8 well lik the idea my m8s got a LED panel under his number plate that he can put msages on

vjones777
19-08-08, 06:01 AM
One thing you could do if you integrated a speed sensor would be auto-cancelling indicators. Turn 'em off after, say, 10secs unless you're stationary at a junction.

Hope you get better soon.

Sid Squid
19-08-08, 06:54 AM
My ancient GT550s had self cancelling indicators, an electromechanical system of course with a link to the speedo.

Interesting project - keep us posted.

AndyL
19-08-08, 07:08 AM
A small speaker and the night rider (kit) voice would be quiet cool and funny :smt043

skumlerud
19-08-08, 09:03 AM
One thing you could do if you integrated a speed sensor would be auto-cancelling indicators. Turn 'em off after, say, 10secs unless you're stationary at a junction.

I've already implemented auto-canceling indicators, but I only use a timer so they turn off even when stationary. I never thought of using a speed sensor to avoid this, a clever idea! I might tap into the Vapor speed sensor, that should work.

Hope you get better soon.

In a couple of weeks I'll be able to exercise again, hopefully that will speed things up. I probably won't be able to ride my SV anymore this year though. With some luck I can ride my wife's ER-5 (a very comfy and relaxing bike, atleast compared to my SV) before winter kicks in!

skumlerud
19-08-08, 09:24 AM
A small speaker and the night rider (kit) voice would be quiet cool and funny :smt043

It would, but it would also add a lot of complexity to the project so now audio for now :(

phil24_7
19-08-08, 08:35 PM
You gotta post pics and vids of this when ya get it all up and running!

skumlerud
19-08-08, 10:27 PM
You gotta post pics and vids of this when ya get it all up and running!

I will :) I will also make all source code and schematics available if there is any interest. The Arduino boards can be programmed by anyone with a PC with a serial or USB connector, no special equipment is necessary.

dotted
20-08-08, 12:47 AM
- Shifting down turns brake light on for a second

- 2 quick touches on the brake lever . turn the brake light on for 4 or 5 seconds

- maybe use pressure switches to toggle the above options on/off , like pressing left blinker switch for 5 seconds to toggle the status of shift-braking , and use the lcd to see what the current status is.

- One click to enter dealer mode , like holding a switch for x seconds , or just a combo of switches
ohh wait.. you have a curvy .... :P

skumlerud
20-08-08, 11:50 AM
- Shifting down turns brake light on for a second

Not a bad idea, although I would need to keep track of both speed and RPM to do this. I really would prefer to not have to deal with RPM. But I could use a G-sensor to detect acceleration/deceleration, and use this to switch on the brake light.

- 2 quick touches on the brake lever . turn the brake light on for 4 or 5 seconds

What's the purpose of this?

- One click to enter dealer mode , like holding a switch for x seconds , or just a combo of switches
ohh wait.. you have a curvy .... :P

Yes, I have the good looking kind of SV :p What is "dealer mode"? Some sort of service mode in the gauges or ignition/injection controller? How do you enter this mode?

tigersaw
20-08-08, 11:55 AM
My citroen had a databus system to control everything, water got in and all hell broke loose. Wipers on, lights on, beeping noises, just glad the airbags didn't go off.

skumlerud
20-08-08, 12:09 PM
My citroen had a databus system to control everything, water got in and all hell broke loose. Wipers on, lights on, beeping noises, just glad the airbags didn't go off.

All modern cars have this. It's a necessity due to all the extra functionality compared to older cars. By using a data-bus you reduce the wiring dramatically, thus eliminating a lot of potential sources of errors.

Btw. my uncle used to own a Citröen SM in the 80's. Fragile Citröen suspension combined with a fragile Maserati engine. That was a truly troublesome car, but what a fantastic ride :) Citröen engineering has always amazed me.

dotted
20-08-08, 12:58 PM
Not a bad idea, although I would need to keep track of both speed and RPM to do this. I really would prefer to not have to deal with RPM. But I could use a G-sensor to detect acceleration/deceleration, and use this to switch on the brake light.



What's the purpose of this?



Yes, I have the good looking kind of SV :p What is "dealer mode"? Some sort of service mode in the gauges or ignition/injection controller? How do you enter this mode?

err... sorry all my ideas are useless on a curvy , on a pointy there is a sensor on the gearbox for gear position.

And the 2 clicks on the brake , is just something im used to do to catch the attention of drivers on my back when im about to slow down. I'm to lazy to use the brakes , and most times use only the throttle/engine braking to slow down


The dealer mode on the pointy lets you see FI error codes , and do some minor injection tuning .

Baph
20-08-08, 01:41 PM
The dealer mode on the pointy lets you see FI error codes , and do some minor injection tuning .

It also allows you to retrieve the last running data from the bike, which can be used to produce nifty graphs of speed, gear, RPM, all sorts of wonderful things.

I know this because I was, err, caught out. :oops:

skumlerud
20-08-08, 01:51 PM
on a pointy there is a sensor on the gearbox for gear position.

Are you saying that the gear position sensor on the pointy will detect all gears? That's very interesting, especially if the sensor will fit a curvy!

Baph
20-08-08, 01:53 PM
Are you saying that the gear position sensor on the pointy will detect all gears? That's very interesting, especially if the sensor will fit a curvy!
You could pretty easily make a similar sensor & mount it to the gear shaft.

A simple counter really, move the mecahical connections one way (anti-clockwise around the shaft?), and decrement a byte value. Move the other way & increment the same value.

That's all that happens inside the ECU of the pointy, though I can't remember where the sensor lives.

sparkymarky
20-08-08, 02:19 PM
Not sure if you could incorporate this, but a lean angle sensor / indicator would be really cool - a bit like they show sometimes on the moto gp TV coverage.

carsounds_dan
20-08-08, 02:50 PM
you could make an alarm into it also? 12v waterproof sirens are cheap, all you'd need is a tilt sensor, which basically require 12v input, ground and then the last wire connets to earth when tilted. you could then use things like the ignition on input as a signal etc.. if you want more info let me know as I fit car alarms back here in the UK and know a bit about it..
and btw, airbag systems have been using a canbus style system for years but theres is MUCH more advanced that the type that run lighting etc.. some of the cars with 18 airbags etc now will only fire the airbags that will help the people inside to help reduce the rebuild costs if the car is a write off.

skumlerud
20-08-08, 07:14 PM
Not sure if you could incorporate this, but a lean angle sensor / indicator would be really cool - a bit like they show sometimes on the moto gp TV coverage.

It would be easy to implement, but quite useless as you really don't want to be looking at the dash while leaned over ;) I might connect an accelerometer though (for activating the brakelight. I'm currently investigating various accelerometers.), so I could display the G-forces without any extra effort.

skumlerud
20-08-08, 07:27 PM
you could make an alarm into it also? 12v waterproof sirens are cheap, all you'd need is a tilt sensor, which basically require 12v input, ground and then the last wire connets to earth when tilted. you could then use things like the ignition on input as a signal etc..

That would be pretty easy, as long as there's enough available inputs on the microcontroller. It has 14 digital inputs/outputs and 6 analog inputs, and so far I'm using 19 pins. So there's one left, which I guess isn't enough for an alarm. I'm investigating another way of interfacing with the LCD which might free up two pins though.

An alarm would make an interesting stand-alone project though. It's possible to monitor tilt angle, G-forces, battery voltage, sound, movement and even if someone just touch your bike. I know very little about alarms though, and you might even be able to purchase such an alarm for little money. Building it using a Freeduino and some sensors would probably cost about £40-50.

skumlerud
09-09-08, 10:18 AM
Just an update:
I've pretty much finished the software, but I won't be able to test it on the bike for a while yet. In the meantime I'm going to switch to a much more powerful microcontroller, which will enable me to add more features and save space. I've also ordered a couple of really fancy displays, which hopefully will let me design a really cool speedo/tach/dash.