GStwin.com GS500 Message Forum

Main Area => General GS500 Discussion => Topic started by: SK Racing on June 04, 2021, 06:51:58 AM

Title: How do I know if the engine is running (Auto Headlight Switch working)
Post by: SK Racing on June 04, 2021, 06:51:58 AM
I realize that I may get some funny answers, but I'll risk it. :icon_lol:

Is there a way to get a signal somewhere on the GS500 when and only when the engine is running? I.O.W. when the speed is above cranking speed.

I've been measuring the voltage of one phase of the alternator, but the R & R is messing me around. The alternator output (one phase) drops from about 11.9V to 4.9V once the battery is fully charged - at idling speed. I'm measuring AC volts in case someone is wondering.

Title: Re: How do I know if the engine is running - electronically
Post by: The Buddha on June 04, 2021, 07:31:10 AM
That's why they recomend testing the alternator without R/R plugged in.
I dont believe you can separate cranking from running in any case. Maybe with a ignition advancer that has only the dwell modified to be say 12 degrees at 1200 rpm, without the static advance of stock you would have literally rpm based advance so a 300-400 cranking rpm would result in 3-4 degree advance. However with that advancer you'd have a bike that may not even start.

Now, a CA advancer has the thing set to 5 degrees. Those do start the bike, and the instant it idles I'll bet the dwell based is 12 degrees. So you have likely 8 degrees at cranking rpm and 17 at idle.

Someone who knows more about this can correct me. IIRC the CA advancer is 5-28, and the 49 state is 12-28. So the interpretation I have is, 5 degree minimum set by angle of slot to the nose. Then the dwell based advance is added to it peaking at +28 about 4000 rpm. So at 300 rpm CA would be around 7 degrees while 49 would be 14 degrees. At 1200 rpm CA is ~15 and 49 is 22.

Someone who knows better pitch in please.

Cool.
Buddha.
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 04, 2021, 07:59:07 AM
Thanks for your reply, Buddha. The reason that I want to know when the engine is running is for something else, not for advancing the spark timing. So, most of what you wrote is of no concern to me. But you did confirm my latest idea - of using the spark signal.

While I was waiting for replies I did think of maybe picking up the spark signal from the igniter unit and counting the number of signals during a predetermined time slice - measured in milliseconds. If it exceeds a certain number of signals during that time slice, I can then deduce that the engine has started. Kind of how an electronic tacho works. I'll be using a microprocessor, so measuring, sensing and doing calculations will all be possible.

If anyone has any other ideas, I'd like to hear about them.

Btw, the reason for this is to switch the headlight on only when the engine is running, and having it off while starting - all done automatically. That part of my circuit is already working fine. I'm using a Mosfet to do the switching.
Title: Re: How do I know if the engine is running - electronically
Post by: Bluesmudge on June 04, 2021, 08:40:35 AM
Microprocessor and GS500 do not mix. I think you are over-thinking this. The 2006+ GS500 wiring already cuts off power to the headlight while starting, so you should just copy that from an '06+ wiring diagram. There is a headlight cutoff wired to the starter button so that any time the starter is running the headlight is not.

Another option, If you have a bike with an oil cooler, you could also wire in a hydraulic pressure switch to the oil cooler line. Have it trigger a relay for the headlight that passes current if oil pressure reaches the correct value.
Title: Re: How do I know if the engine is running - electronically
Post by: mr72 on June 04, 2021, 08:53:48 AM
I think if I read correctly, you want the headlight to go off when the key is on unless the engine is actually running, right? So the starter cutout won't get the job done.

I mean, if you really want to do this, and make it analog, then you can do it using an RC circuit (capacitor and resistor), and either a comparator or you can use your MOSFET. Use the ignitor output signal. Tune the RC time constant so that the voltage only stays above the comparator voltage when the frequency is high enough for the engine to be running, say over 500Hz. Comparator output goes high only when the input signal is above threshold voltage.

You could use a uP but why? analog will work.
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 04, 2021, 08:58:26 AM
Quote from: Bluesmudge on June 04, 2021, 08:40:35 AM
Microprocessor and GS500 do not mix. I think you are over-thinking this. The 2006+ GS500 wiring already cuts off power to the headlight while starting, so you should just copy that from an '06+ wiring diagram. There is a headlight cutoff wired to the starter button so that any time the starter is running the headlight is not.

Another option, If you have a bike with an oil cooler, you could also wire in a hydraulic pressure switch to the oil cooler line. Have it trigger a relay for the headlight that passes current if oil pressure reaches the correct value.

My GS is a 2004 model with oil cooler, but I would rather do it electronically - not with hydraulics.

I like playing with microprocessors (Arduino) and actually had the headlight auto switch working before, but due to the varying voltage output of the alternator, it is not reliable.

I will check out the 2006+ wiring diagram. Thanks for the heads up.  :thumb:
Title: Re: How do I know if the engine is running - electronically
Post by: mr72 on June 04, 2021, 09:01:04 AM
You can still feed your arduino with a comparator output, or a transistor, or whatever, based on an RC time constant coming from the igniter. It's just a DAC... or you can step it down and use a frequency counter in code.
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 04, 2021, 09:08:52 AM
Quote from: mr72 on June 04, 2021, 08:53:48 AM
I think if I read correctly, you want the headlight to go off when the key is on unless the engine is actually running, right? So the starter cutout won't get the job done.

I mean, if you really want to do this, and make it analog, then you can do it using an RC circuit (capacitor and resistor), and either a comparator or you can use your MOSFET. Use the ignitor output signal. Tune the RC time constant so that the voltage only stays above the comparator voltage when the frequency is high enough for the engine to be running, say over 500Hz. Comparator output goes high only when the input signal is above threshold voltage.

You could use a uP but why? analog will work.

Yeah, thanks for the analog idea. I'd rather use Arduino code ported to an ATtiny85 because I can make it really small. As I said, most of the circuit is working. It's just the voltage divider part that measures alternator voltage that is unreliable. I'd rather write C code than mess with a comparator.

Who said microprocessors and GS don't mix? What do you think is inside the Igniter? (That was meant for Bluesmudge)  :icon_lol:
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 04, 2021, 09:18:33 AM
Quote from: mr72 on June 04, 2021, 08:53:48 AM
I think if I read correctly, you want the headlight to go off when the key is on unless the engine is actually running, right? So the starter cutout won't get the job done.

That is exactly what I want. I've also built in a 3 second delay so the headlight only goes on after the engine has started properly.
Title: Re: How do I know if the engine is running - electronically
Post by: mr72 on June 04, 2021, 09:56:11 AM
Quote from: SK Racing on June 04, 2021, 09:08:52 AM

Yeah, thanks for the analog idea. I'd rather use Arduino code ported to an ATtiny85 because I can make it really small. As I said, most of the circuit is working. It's just the voltage divider part that measures alternator voltage that is unreliable. I'd rather write C code than mess with a comparator.


Sure. Then use the 12V igniter signal through a divider or better yet a transformer to step it down to 3V or whatever you can handle on the microprocessor, probably also with whatever signal conditioning you need to not blow up your microprocessor. I'm pretty sure I'd put a zener on it.
Title: Re: How do I know if the engine is running - electronically
Post by: Bluesmudge on June 04, 2021, 11:07:37 AM
Quote from: SK Racing on June 04, 2021, 09:08:52 AM
Who said microprocessors and GS don't mix? What do you think is inside the Igniter? (That was meant for Bluesmudge)  :icon_lol:

Yeah I know the GS isn't 100% analogue but its pretty close. Personally, I wouldn't want to make it any more digital but it sounds like this is a fun project for you. This thread has gotten over my head so I'll just be watching from here on out.
Title: Re: How do I know if the engine is running - electronically
Post by: sledge on June 04, 2021, 12:17:01 PM
Quote from: mr72 on June 04, 2021, 09:56:11 AM



Sure. Then use the 12V igniter signal through a divider or better yet a transformer to step it down to 3V

A DC transformer?.....so where can i get one?

:D
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 04, 2021, 12:32:58 PM
Quote from: mr72 on June 04, 2021, 09:56:11 AMSure. Then use the 12V igniter signal through a divider or better yet a transformer to step it down to 3V or whatever you can handle on the microprocessor, probably also with whatever signal conditioning you need to not blow up your microprocessor. I'm pretty sure I'd put a zener on it.

Both the Arduino that I use for development work and the ATtiny that will be used in the final product can handle 5V. So, you're right, the 12V signal will first go through a voltage divider and then a 5V Zener. That's all that's needed to not blow up the uP.

So I'll tap into the signal from the igniter for one cylinder and count the number of pulses in say 500 milliseconds (0.5 second). If normal cranking speed is about 400 RPM, as Buddha suggested, then I can expect 1.66 pulses for one cylinder per 500 ms period. If there are 2 pulses (480RPM) or 3 pulses (720RPM), then assume the engine has started and let the Mosfet switch on the headlight. That's easy enough.

Thanks to everyone who has replied so far. You helped steer me in the right direction.
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 04, 2021, 12:50:01 PM
I have to say that you guys are great. I was expecting some crazy suggestions. Like mounting a microphone near the exhaust and if the noise exceeded a certain level, then switch on the headlight.

That won't work because the headlight would come on if a HD passed within half a mile.  :icon_twisted:
Title: Re: How do I know if the engine is running - electronically
Post by: chris900f on June 04, 2021, 12:58:10 PM
Since you have an 2004, could you tap the 5v signal tach signal and then program the Arduino to turn the headlight on at a specific rpm voltage, eg. above 1000rpm?
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 04, 2021, 01:06:57 PM
Quote from: chris900f on June 04, 2021, 12:58:10 PM
Since you have an 2004, could you tap the 5v signal tach signal and then program the Arduino to turn the headlight on at a specific rpm voltage, eg. above 1000rpm?

Now that is a good idea! Wow, thanks.  :thumb:  :woohoo:
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 04, 2021, 02:11:51 PM
Looking at the 2004 wiring diagram, I see there is a 12V wire going into the tach. Why is that? There is also a signal wire and a ground.

(https://i.imgur.com/FPivAhs.jpg)
Title: Re: How do I know if the engine is running - electronically
Post by: chris900f on June 04, 2021, 10:00:14 PM
12v is for the tach light and probably the base power for the tach needle and the signal wire B/R is the 5v tach send from the ECU

(https://iili.io/BQ81yu.jpg)
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 04, 2021, 11:14:31 PM
Quote from: chris900f on June 04, 2021, 10:00:14 PM
12v is for the tach light and probably the base power for the tach needle and the signal wire B/R is the 5v tach send from the ECU

Thank you.  :thumb:
Title: Re: How do I know if the engine is running - electronically
Post by: chris900f on June 04, 2021, 11:35:30 PM
No problem  :cheers:
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 05, 2021, 02:57:27 AM
The tach signal doesn't make any sense to me. It measures (varies a bit) around 6.9VDC and it is not AC - I checked. Revving the engine it comes down to about 6.2V, bit it is not consistent. It jumps around a lot. I'm measuring between the B\R (which definitely is tach signal) and GND.

Does anyone know how the tach signal works?
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 05, 2021, 06:34:10 AM
From what I can gather on the Internet, it could be a pulsed signal. Most probably a pulse every time there is a spark. I don't have a scope, but I'll put a circuit together on breadboard and see if I can count the pulses on the Arduino and take it from there.
Title: Re: How do I know if the engine is running - electronically
Post by: chris900f on June 05, 2021, 11:41:21 AM
Damn, I expected you would get a 0/5v square wave pulse. Maybe it never drops to zero, but still has a 5v swing?
Title: Re: How do I know if the engine is running - electronically
Post by: mr72 on June 07, 2021, 08:11:02 AM
all depends on how you measure it. You need an oscilloscope. If you use a regular volt meter either set to AC (RMS) or DC it will read something like the RMS or DC equivalent voltage. A DMM is designed to measure voltage at a max of about 400 Hz so it's effectively low-pass filtered, so your >1.2kHz square wave for a running motorcycle pulsed ignition signal is going to look a lot like DC.

Someone should tell Sledge that square waves going between 0V and 12V are not DC. That's why you use a transformer, keeps you from frying your low voltage sensing circuitry. All electrical signals are analog, you can treat them as digital but internally your device uses a transistor or comparator with a trigger voltage to differentiate between 1 and 0. You have to AC couple signals from a source like this somehow to keep the reference at 0V otherwise you get baseline drift. Lots of signal quality stuff you need to deal with to do a good job of sensing. I know you are quick and dirtying this thing but to make it reliable you need to build an analog circuit that will result in a persistent steady voltage above the input threshold when it's running and consistently below the threshold when it's not running. That's an analog problem. It's a filter.
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 07, 2021, 09:01:13 AM
I have gathered that it must be a 12V square wave signal and I'm busy doing research online to measure the frequency with Arduino/ATtiny. There are a few examples that might work, but it will take some time to get a working circuit and sketch together. I'm just a hobbyist programmer/tinkerer, but I've cobbled together some amazing Arduino/ATtiny projects in the past.

The main problem is it is so far in between projects that I have to relearn a lot of stuff again every time. But I'll get there. It's just a fun project anyway.

I'm not sure if a voltage divider and zener will let me safely sense the pulses, as the Arduino can only take up to 5V signals. Logic tells me that it will be adequate and no need for a transformer.
Title: Re: How do I know if the engine is running - electronically
Post by: chris900f on June 07, 2021, 10:09:10 AM
Checkout the Speeduino forums/ manual, since they also use the Arduino Mega with various conditioner circuits to take different levels/types of
input pulse voltage as the drive signal for those systems.

https://wiki.speeduino.com/en/wiring/system
Title: Re: How do I know if the engine is running - electronically
Post by: mr72 on June 07, 2021, 10:26:09 AM
The Arduino likely has some reference trigger voltage so noise doesn't result in triggering on a digital input pin. Ideally it's probably 0V  or +5V but in reality there is noise in any circuit and you wind up with some signals above 0V on the pin (like, induced noise from motorcycle ignition, which is not going to be small) and you also need to make sure it doesn't go above 5V, the application note or datasheet for the part should tell you how to correctly couple the signal. But that's assuming you already have an ordinary digital signal in the first place, and you don't.

There are a ton of ways to do this properly. In a motorcycle you need to understand that the electric field from the ignition is going to wind up putting noise on everything, which is usually not a problem except when you put digital stuff in there that will pick it up.

At a very minimum you need a buffer. But once you are building a buffer, you might as well build a filter. Look on the internet, this is a problem someone else has solved. But this isn't as simple as taking an analog reactive switching signal like the one coming from the igniter to the tach and with only resistive divider feeding it into an ardiuno. That's hardly a plain square wave. It has overshoot and undershoot and varying pulse width an duty cycle, all of which the analog tach doesn't care about but your microprocessor will hate.

Think of it this way. First, you need to create an isolated version of this tach signal, with a transformer or optocoupler or something so you don't screw up the tach. Then you need to take that square wave and turn it into a sine wave at the frequency you care about. That's because the square wave edge will fly right through any HPF you make. Then HPF that sine wave at something like 600 Hz, so the 400Hz cranking is effectively blocked. Then the resultant signal is a >600 Hz sine wave, rectify and filter that to ~5VDC. In reality, you'll have a variable DC between something less than 5V when you are cranking to near 5V at idle and probably 5V steady at above idle if you have built your regulator right. Then you can turn this into a real digital signal by running that DC signal into a comparator. You adjust the trigger voltage so that the DC you create when cranking at 400 Hz, maybe 2-3V?, is below the threshold. The output of the comparator will put out a solid 0V or 5V. Run that through a 10K or 100K or whatever resistor is called for by the Ardiuno design guide into your input and Bob's your uncle.
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 07, 2021, 12:07:41 PM
Thanks Chris900f and mr72. Most of that is over my head. Fortunately, there are some examples for Arduino rev counters online. I'll look at ideas and just wing it. I'll report back here when I have something working.
Title: Re: How do I know if the engine is running - electronically
Post by: SK Racing on June 22, 2021, 01:55:43 AM
Ok, this is what has transpired since my last post. I tested the tach signal from the GS igniter using an Arduino breadboard circuit. With the output displayed on the serial monitor, this is what I found:
With the Arduino sketch (program code) ported to the Attiny85 chip (top right in the picture), and the firmware behaving satisfactorily, I focused my attention on designing a circuit board. After first considering a simple stripboard (Veroboard) version, I thought, nah, let's do it properly and fired up KiCad - which I haven't used for a number of years. After a few iterations I came up with the board shown below. In order to make it as tiny as possible (within reason), some SMD components found their way onto the board. Right now, an Asian fab house is busy making the boards. By the time it arrives, the components should be here also. The pcb size is 21x41mm.

(https://i.imgur.com/9Ue040l.jpg)


And here is the temporary setup that I used to refine the circuit and code.
The Arduino Uno is only there to get live test readings onto a laptop screen via the Arduino serial monitor.

(https://i.imgur.com/3d3jcE3.jpg)
Title: Re: How do I know if the engine is running - electronically (Solved)
Post by: SK Racing on June 23, 2021, 02:58:07 AM
This is a sample of the serial monitor output. It begins with the engine not started yet, and when the engine starts there is about 2.5 - 3 sec delay before the headlight comes on.

At the end, the headlight goes off as the engine speed drops below 800 RPM when I hit the kill switch.


Headlight Switch V2.0 - 8 Jun 2021

infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
21.32Hz   Duty: 51%   Dur: 46906.00   373.50 rpm
19.32Hz   Duty: 51%   Dur: 51771.00   1380.50 rpm
24.36Hz   Duty: 60%   Dur: 41046.00   1360.50 rpm
20.29Hz   Duty: 51%   Dur: 49286.00   1912.50 rpm
Headlight ON
17.27Hz   Duty: 52%   Dur: 57899.00   1272.00 rpm
20.16Hz   Duty: 51%   Dur: 49604.00   1307.50 rpm
20.06Hz   Duty: 53%   Dur: 49848.00   1214.00 rpm
19.46Hz   Duty: 52%   Dur: 51382.00   1355.50 rpm
18.79Hz   Duty: 53%   Dur: 53214.00   1148.50 rpm
19.22Hz   Duty: 52%   Dur: 52035.00   1445.00 rpm
19.49Hz   Duty: 50%   Dur: 51299.00   1182.50 rpm
17.35Hz   Duty: 53%   Dur: 57639.00   1164.00 rpm
17.99Hz   Duty: 52%   Dur: 55588.00   1128.00 rpm
24.80Hz   Duty: 59%   Dur: 40321.00   1136.50 rpm
17.16Hz   Duty: 54%   Dur: 58277.00   1299.50 rpm
19.79Hz   Duty: 51%   Dur: 50524.00   1200.00 rpm
21.01Hz   Duty: 51%   Dur: 47600.00   1380.50 rpm
17.26Hz   Duty: 51%   Dur: 57945.00   1191.00 rpm
20.73Hz   Duty: 51%   Dur: 48245.00   1192.00 rpm
17.14Hz   Duty: 55%   Dur: 58358.00   1066.00 rpm
18.27Hz   Duty: 51%   Dur: 54736.00   1113.00 rpm
19.12Hz   Duty: 54%   Dur: 52288.00   1199.00 rpm
39.59Hz   Duty: 81%   Dur: 25261.00   1651.00 rpm
23.48Hz   Duty: 52%   Dur: 42591.00   1577.50 rpm
26.90Hz   Duty: 52%   Dur: 37180.00   1660.00 rpm
30.76Hz   Duty: 61%   Dur: 32515.00   1692.00 rpm
31.95Hz   Duty: 60%   Dur: 31298.00   1754.50 rpm
26.67Hz   Duty: 52%   Dur: 37500.00   2365.50 rpm
28.07Hz   Duty: 52%   Dur: 35626.00   1623.00 rpm
25.09Hz   Duty: 53%   Dur: 39854.00   1617.50 rpm
26.89Hz   Duty: 53%   Dur: 37195.00   1650.00 rpm
24.22Hz   Duty: 51%   Dur: 41289.00   1590.50 rpm
30.71Hz   Duty: 60%   Dur: 32559.00   1634.00 rpm
37.88Hz   Duty: 81%   Dur: 26396.00   1678.50 rpm
23.14Hz   Duty: 53%   Dur: 43218.00   1660.50 rpm
25.45Hz   Duty: 51%   Dur: 39291.00   1573.00 rpm
24.05Hz   Duty: 52%   Dur: 41583.00   2012.50 rpm
31.11Hz   Duty: 60%   Dur: 32144.00   1802.50 rpm
27.15Hz   Duty: 53%   Dur: 36839.00   2411.50 rpm
36.91Hz   Duty: 81%   Dur: 27093.00   2308.50 rpm
26.07Hz   Duty: 51%   Dur: 38357.00   1714.00 rpm
31.77Hz   Duty: 61%   Dur: 31480.00   1821.50 rpm
38.31Hz   Duty: 81%   Dur: 26100.00   1983.00 rpm
29.88Hz   Duty: 60%   Dur: 33470.00   1670.00 rpm
26.92Hz   Duty: 52%   Dur: 37141.00   1647.50 rpm
36.53Hz   Duty: 81%   Dur: 27375.00   1914.00 rpm
17.94Hz   Duty: 54%   Dur: 55752.00   1216.50 rpm
26.94Hz   Duty: 81%   Dur: 37124.00   1260.00 rpm
18.68Hz   Duty: 51%   Dur: 53542.00   1311.00 rpm
16.70Hz   Duty: 51%   Dur: 59889.00   1206.00 rpm
17.97Hz   Duty: 55%   Dur: 55651.00   1151.50 rpm
16.64Hz   Duty: 51%   Dur: 60113.00   1135.00 rpm
19.29Hz   Duty: 51%   Dur: 51838.00   1181.00 rpm
24.17Hz   Duty: 60%   Dur: 41382.00   1515.00 rpm
19.69Hz   Duty: 51%   Dur: 50775.00   1244.00 rpm
18.99Hz   Duty: 51%   Dur: 52652.00   1659.00 rpm
16.66Hz   Duty: 56%   Dur: 60027.00   1247.00 rpm
.
.
.
.
.
.
.
18.84Hz   Duty: 52%   Dur: 53077.00   1175.50 rpm
21.04Hz   Duty: 51%   Dur: 47536.00   1194.00 rpm
21.18Hz   Duty: 44%   Dur: 47207.00   1277.50 rpm
18.29Hz   Duty: 52%   Dur: 54675.00   1183.00 rpm
19.29Hz   Duty: 53%   Dur: 51846.00   1232.50 rpm
26.75Hz   Duty: 29%   Dur: 37380.00   1032.00 rpm
22.67Hz   Duty: 59%   Dur: 44112.00   1340.50 rpm
17.53Hz   Duty: 52%   Dur: 57049.00   1241.00 rpm
17.07Hz   Duty: 53%   Dur: 58590.00   1260.50 rpm
17.80Hz   Duty: 52%   Dur: 56195.00   1189.50 rpm
18.23Hz   Duty: 51%   Dur: 54841.00   1311.50 rpm
24.21Hz   Duty: 60%   Dur: 41312.00   1295.50 rpm
17.77Hz   Duty: 48%   Dur: 39291.00   948.33 rpm
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
infHz   Duty: 0%   Dur: 0.00   0.00 rpm
Headlight OFF
Title: Re: How do I know if the engine is running - electronically (Solved)
Post by: herennow on June 23, 2021, 09:55:59 PM
Nice work!
Title: Re: How do I know if the engine is running - electronically (Solved)
Post by: SK Racing on June 24, 2021, 09:05:04 AM
Quote from: herennow on June 23, 2021, 09:55:59 PM
Nice work!

Thanks.

Some folk may be wondering why go to all that trouble just to switch a headlight on. Here are some reasons...

A stock headlight draws about 4.5 amps on low beam. On high beam it's more like 9 amps. On the GS the headlight comes on the moment you turn the key. If the battery battles to crank the engine on a cold winters morning, an additional 4.5A is a lot and can be the difference between starting, and cursing at a bike that doesn't want to start while you're running late for work.

But it can also be used to switch on spotlights, running lights, etc. Anything that you only need while riding. The MOSFET that I'm using can handle 30 amps.
Title: Re: How do I know if the engine is running - electronically (Solved)
Post by: SK Racing on July 20, 2021, 09:30:36 AM
Good news - the headlight switch is working. The prototype is installed on my bike and will likely stay there because it is working nicely. The pcbs took a very long time to arrive from Hong Kong, but when the package showed up yesterday, I promptly populated one board.

(https://i.imgur.com/Z2qzq1x.jpg)

The fab house has a deal of ten boards (100mm x 100mm) for $5, so I had lots made in two different formats. One size and shape to suit the mounting holes that I provided under the seat of my GS500 Street Tracker, and a smaller format to hopefully selling it to a friend who has an auto-electrical shop for bikes. He showed interest, so I'll give him one built board for testing tomorrow.

(https://i.imgur.com/FcjqTiw.jpg)
Title: Re: How do I know if the engine is running - electronically (Solved + switch built)
Post by: herennow on July 20, 2021, 02:07:34 PM
Nice. I'd get one if they would not fail me during the "controle technique" for the light not coming on when they test it on the bench...
Title: Re: How do I know if the engine is running - electronically (Solved + switch built)
Post by: SK Racing on July 20, 2021, 03:36:05 PM
That could be a problem, but a bypass switch will solve that.

The second board is populated. Tomorrow I'll take it to my auto electrician friend for testing and evaluation and possibly selling a few to his customers. I would like to recuperate the costs incurred for the making of the PCB's at least.

(https://i.imgur.com/XuSOsxL.jpg)
Title: Re: How do I know if the engine is running - electronically (Solved + switch built)
Post by: SK Racing on July 21, 2021, 06:39:07 AM
The Automatic Headlight Switch unit is now installed on my bike and works flawlessly. It is wrapped in transparent heatshrink and sealed at the ends with clear nail lacquer to seal it from moisture. Mounting with rubber grommets reduce vibration.

This form factor fits the two mounting points that I have provided under the seat of my custom GS500. I also had some rectangular pcb's made like the one shown in the previous post.

(https://i.imgur.com/XuJMSQo.jpg)