Author Topic: Detecting when vehicle is running.  (Read 3563 times)

0 Members and 1 Guest are viewing this topic.

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3317
  • Country: au
Re: Detecting when vehicle is running.
« Reply #25 on: April 14, 2022, 05:07:59 am »
What about a contact microphone attached to a relatively noisy area of the engine, e.g. valve gear cover?
 

Offline BrokenYugo

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: us
Re: Detecting when vehicle is running.
« Reply #26 on: April 14, 2022, 05:13:57 am »
"Key on power" is the automotive term.
 

Offline fordem

  • Regular Contributor
  • *
  • Posts: 234
  • Country: gy
Re: Detecting when vehicle is running.
« Reply #27 on: April 14, 2022, 12:18:18 pm »
If you want to know when the engine is running, monitor the voltage at the oil pressure switch - if you have 0V or close to it, the engine is either not running or will be very soon.

The oil pressure switch closes (short circuit to the engine block/chassis ground) when there is no oil pressure, and opens when the oil pressure is above approximately 3~4 psi, the circuit is usually pulled high by an incandescent lamp wired between the switch and ignition power.  Depending on ambient temperature, oil viscosity and in some cases the oil filter in use, it is possible to have low oil pressure for the first few seconds after the engine has started, but generally speaking, most engines will have enough pressure to extinguish the light before the key leaves the start position.
 

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: Detecting when vehicle is running.
« Reply #28 on: April 14, 2022, 12:19:40 pm »
Why can't you just take power from a permanently powered circuit and take the activation signal from an ignition powered circuit.

All cars have multiple circuits which are permanently powered and multiple circuits which are powered only when the ignition switch (or equivalent push-button system) is set to "run". These are easy to access from the fuse box with fuse taps - just have 2 fuse taps, one to an always on circuit (e.g. interior lights) and one to an ignition powered circuit (e.g. cigarette lighter, electric windows, ECU, etc.). Many in-car accessories, such as dashcams work this way.

The problem with battery voltage monitoring is that many (most?) modern internal combustion engine cars have start-stop features or some type of alternator management (where battery charging is periodically stopped to save fuel).

The start/stop feature seems to only be a feature of cars, so far.  I haven't seen trucks, SUVs, or RVs that have this feature, and it isn't just modern vehicles that are having their catalytic converters stolen.

The whole point is to make something that is somewhat idiot proof, in terms of installation, for the majority of situations.  I would like your average moron to be able to install it without having to hire someone.  Tapping into the CAN bus, oil pressure sensor, installing an additional knock sensor, etc. can be tricky, even for someone like me, who is extremely familiar with the systems.  On the other hand, if it has to be connected to the battery anyway, we might as well use that, if it can be done.  If it won't work for certain vehicles, they still have a key fob they can arm and disarm the system with.
 

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: Detecting when vehicle is running.
« Reply #29 on: April 14, 2022, 12:30:47 pm »
Not necessarily, the radio can also be turned on by CAN bus.
The automotive electronics has changed so much between 1974 and today, that an universal solution may be hard to find.
Simple switches have turned into sensors, a lot of stuff is connected via busses.
Why can't you design your circuit to use so little power that can be left active all the time?
By the way 78L05 is not suitable for automotive.
Did you also consider all the required input protection against spikes, load dump, reverse polarity?
What about temperature measurement on the exhaust maybe in combination with a motion sensor?
I had been annoyed by an unreliable theft alarm on my last car so much that I removed it.
I'm not looking for a universal solution.  I already resigned myself to the fact that this might not work.  It would be nice to find something that works in the vast majority of situations though.

As for it being active all the time, it's a catalytic converter alarm.  Other existing systems use vibration, sound, or PIR sensors to set off the alarm.  These things would be triggered while driving the vehicle.  My sensor, while not being based on vibration, sound, or motion, would still be triggered when the vehicle is running.

Ultimately I could forego this whole line of thought, and just make everyone arm and disarm with a key fob, but I thought it might be a simple thing to implement something that made things easier for most users.  I don't know about you, but fumbling around with my key fob would seem to be a bit more aggravating if I had to do it with two fobs.
 

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: Detecting when vehicle is running.
« Reply #30 on: April 14, 2022, 12:34:26 pm »
If you want to know when the engine is running, monitor the voltage at the oil pressure switch - if you have 0V or close to it, the engine is either not running or will be very soon.

The oil pressure switch closes (short circuit to the engine block/chassis ground) when there is no oil pressure, and opens when the oil pressure is above approximately 3~4 psi, the circuit is usually pulled high by an incandescent lamp wired between the switch and ignition power.  Depending on ambient temperature, oil viscosity and in some cases the oil filter in use, it is possible to have low oil pressure for the first few seconds after the engine has started, but generally speaking, most engines will have enough pressure to extinguish the light before the key leaves the start position.
This would suffer from the same drawbacks as detecting voltage change.  Not all vehicles run all the time.  When they are off, they would not have any oil pressure.  This would possibly work on more vehicles, as those that reduce charge to increase mpg would be covered, but not enough vehicles to make it worth causing additional installation challenges for the technically uninclined.
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1996
  • Country: is
Re: Detecting when vehicle is running.
« Reply #31 on: April 14, 2022, 12:38:08 pm »
What kind of Cat Converter alarm, the fact that it is missing, stolen or just not working up to par? Your zener driving the fet is bollocks. The fet gate has megaohms of high impedance and a zener has leakage and a somewhat soft knee. You could use A.C. coupling to the battery circuit and amplify the ripple caused by the charging circuit. The ripple will be there even when the battery is fully charged since all systems are actually powered by the alternator while the car is running. It seems you are creating a circuit with no real purpose or need. My ECU tells me the health of my converter and if you are trying to do a 'missing or stolen' circuit what are you going to attach to the converter that can stand the heat? What if your unprofessionally designed circuit catches fire and the car and/or garage/house the car is parked in is a total loss?? Got any good lawyers on your payroll?

Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline fordem

  • Regular Contributor
  • *
  • Posts: 234
  • Country: gy
Re: Detecting when vehicle is running.
« Reply #32 on: April 14, 2022, 01:06:16 pm »
This would suffer from the same drawbacks as detecting voltage change.  Not all vehicles run all the time.  When they are off, they would not have any oil pressure.  This would possibly work on more vehicles, as those that reduce charge to increase mpg would be covered, but not enough vehicles to make it worth causing additional installation challenges for the technically uninclined.

I recognize that there is a difference between vehicle running and engine running - you may have noticed that I prefaced my suggestion with the phrase "if you want to know when the engine is running".

Now that you have told us what you're trying to achieve, how about a simple relay with normally closed contacts, fed from the accessory (ACC) circuit  - accessory power goes live, relay engages opening the circuit shutting down the alarm, switch off and the relay drops out closing the circuit and powering up the alarm.

You want ease of installation - plug it into a USB port or power outlet, those go live when the ACC circuit powers up.
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 8007
  • Country: us
Re: Detecting when vehicle is running.
« Reply #33 on: April 14, 2022, 01:06:47 pm »
Is there a better way to do what I'm trying to do?  Is there a better mosfet/zener combination to accomplish this?
 

I didn't really look at this diagram before.  If you've decided to use a voltage threshold to activate your device, you need a different plan.  Assuming V_OUT is the vehicles battery voltage, turning the MOSFET off will float up the ground of the 7805 regulator and increase it's output voltage to 12 volts or so.  It's not clear what you are doing with those voltages, but it will probably toast everything that is expecting 5 volts.  As for using zeners and VGS to determine a threshold, that won't work very well.  The zener will have some leakage and the MOSFETs will vary a bit and the VGS threshold isn't sharp and so on.  A better way to to this that is easy to understand is with a voltage comparator circuit using an op-amp.  If you have regulated voltages already at 3.3V, you just feed the + input of the op-amp the 3.3V and the - side gets the vehicle battery voltage through a voltage divider of ratio 13.7:3.3, which is 4.15:1, or as close to that as you can get with commonly available 1% resistors.  Or you can use a separate reference voltage if your regulated supplies are too noisy or not accurate enough for the characteristics you want.
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: Detecting when vehicle is running.
« Reply #34 on: April 14, 2022, 06:30:11 pm »
What kind of Cat Converter alarm, the fact that it is missing, stolen or just not working up to par? Your zener driving the fet is bollocks. The fet gate has megaohms of high impedance and a zener has leakage and a somewhat soft knee. You could use A.C. coupling to the battery circuit and amplify the ripple caused by the charging circuit. The ripple will be there even when the battery is fully charged since all systems are actually powered by the alternator while the car is running. It seems you are creating a circuit with no real purpose or need. My ECU tells me the health of my converter and if you are trying to do a 'missing or stolen' circuit what are you going to attach to the converter that can stand the heat? What if your unprofessionally designed circuit catches fire and the car and/or garage/house the car is parked in is a total loss?? Got any good lawyers on your payroll?
I am fine to not use the zener driving the fet.  It was just an idea that I didn't have the parts to test yet.  Ripple is a good idea, and I considered it, but thought it would be more complicated to implement than something that would detect the voltage.

As for what I'm going to attach to the converter, I'm not going to attach anything to it, so heat is not an issue.  The method I am using is unique as far as I can tell, at least for alarming cars, and took me a long time to work the bugs out, so I'm not wanting to share it online for someone to beat me to the punch.  It isn't meant to detect if the cat is missing or stolen though.  It is meant to alert if someone tries to steal it.  It is pointless to alert someone if their cat is already stolen.  They will find out as soon as they start their car.
 

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: Detecting when vehicle is running.
« Reply #35 on: April 14, 2022, 06:40:37 pm »
I didn't really look at this diagram before.  If you've decided to use a voltage threshold to activate your device, you need a different plan.  Assuming V_OUT is the vehicles battery voltage, turning the MOSFET off will float up the ground of the 7805 regulator and increase it's output voltage to 12 volts or so.  It's not clear what you are doing with those voltages, but it will probably toast everything that is expecting 5 volts.  As for using zeners and VGS to determine a threshold, that won't work very well.  The zener will have some leakage and the MOSFETs will vary a bit and the VGS threshold isn't sharp and so on.  A better way to to this that is easy to understand is with a voltage comparator circuit using an op-amp.  If you have regulated voltages already at 3.3V, you just feed the + input of the op-amp the 3.3V and the - side gets the vehicle battery voltage through a voltage divider of ratio 13.7:3.3, which is 4.15:1, or as close to that as you can get with commonly available 1% resistors.  Or you can use a separate reference voltage if your regulated supplies are too noisy or not accurate enough for the characteristics you want.
Thanks for looking at it.  V_OUT is 12V unregulated from the vehicle.  It simply passes through reverse voltage protection prior to this.  I have a couple linear regulators in there, which I will likely be changing out for buck converters.  In this configuration, I figured I would just shut off the power to the regulators, so there would be no voltage available other than 12V.  I guess that isn't critical though, and the op-amp idea sounds very good.  It would certainly deal with all the issues.

Thanks
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Detecting when vehicle is running.
« Reply #36 on: April 14, 2022, 10:03:43 pm »
The start/stop feature seems to only be a feature of cars, so far.  I haven't seen trucks, SUVs, or RVs that have this feature, and it isn't just modern vehicles that are having their catalytic converters stolen.

Lots of trucks and SUVs have that idiotic "feature" too, I remember seeing a product specifically sold to disable it on Ford trucks. Start/Stop is a gimmick to game the way emissions are measured in the USA and possibly other places, nothing more. The amount of fuel saved is negligible and it greatly reduces the life of the battery and other components.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Detecting when vehicle is running.
« Reply #37 on: April 14, 2022, 10:07:02 pm »
As for what I'm going to attach to the converter, I'm not going to attach anything to it, so heat is not an issue.  The method I am using is unique as far as I can tell, at least for alarming cars, and took me a long time to work the bugs out, so I'm not wanting to share it online for someone to beat me to the punch.  It isn't meant to detect if the cat is missing or stolen though.  It is meant to alert if someone tries to steal it.  It is pointless to alert someone if their cat is already stolen.  They will find out as soon as they start their car.

Cat thieves are in and out often in a minute or less. I don't see an alert doing much good, by the time you can throw your shoes on and run out there they'll be gone, and there have been an alarming number of cases of thieves shooting at car owners who confront them.

IMHO the way to stop cat theft is by making it almost impossible to sell one for money unless you are a licensed dealer and have a paper trail. I would go so far as to make simple possession of more than a couple of them without paperwork a crime. Enforce severe penalties on any individual or business that buys cats without the required paperwork.
 

Offline PoDuckTopic starter

  • Regular Contributor
  • *
  • Posts: 78
  • Country: us
Re: Detecting when vehicle is running.
« Reply #38 on: April 15, 2022, 01:15:28 pm »
Cat thieves are in and out often in a minute or less. I don't see an alert doing much good, by the time you can throw your shoes on and run out there they'll be gone, and there have been an alarming number of cases of thieves shooting at car owners who confront them.

IMHO the way to stop cat theft is by making it almost impossible to sell one for money unless you are a licensed dealer and have a paper trail. I would go so far as to make simple possession of more than a couple of them without paperwork a crime. Enforce severe penalties on any individual or business that buys cats without the required paperwork.
That is true, and an alarm by itself isn't going to do much, other than annoy the thief, but the person asking me to do this insures storage areas, where lots of vehicles are stored.  They had to deal with one lot where 17 vehicles had their cats stolen in one night.  In a situation like that, alarms would certainly be helpful in mitigating the amount of damage that can be done at one time.  His idea is that his company will charge more to insure vehicles that have no deterrent installed.  The alarm would be the least intrusive means for that.  They would get a further discount if they introduce some system for making stealing the cat take more time and effort.

There is no solution that can totally prevent theft.  Making it illegal to possess too many of something has never really served as a deterrent either.  There are several ideas that have been floated, such as serializing the converters to link them to vehicles, but that does nothing for converters that are already on the market, unless the owner of the vehicle has an aftermarket serialization done.  There are already systems, like "Leads online" where you can have companies that purchase things from the public list identifying information, along with serial numbers, on their database, where police can access it and sometimes catch the thief, and even less times recover the stolen property.  That could go a long way, especially if the cat was stamped with the vin of the vehicle they were attached to.  But, what happens to the aftermarket for vehicle parts?  Could you no longer use a salvaged cat, since it will be serialized to a different vehicle?

Beyond that, where there is money to be made, you will find people that evade measures to catch them.  You can't sell a stolen vehicle, yet people do it anyway.  They have VIN numbers that are unique, but vehicles are stolen every day.  Often they end up in other countries.  If you can't stop people from shipping entire vehicles out of the country, which are very difficult to hide, how are you going to prevent catalytic converters from being shipped out disguised in a load of scrap steel, for instance?

Anyway, it's all well and good to talk about the best way to stop it, but those methods aren't in place yet.  Until then, people have to do what they can to deter thieves themselves.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Detecting when vehicle is running.
« Reply #39 on: April 15, 2022, 07:30:08 pm »
People steal them because it is easy to sell them. Make it hard to sell them and fewer people will steal them. Engraving them with individual serial numbers seems like a really good idea and would aid in tracking them. I still think it would be worthwhile to make possession a crime, if someone has a pile of them in the back of their truck it's no longer necessary to prove they are stolen in order to put the person in jail. On top of that it would help a great deal if we would stop coddling criminals and get rid of the revolving door. I don't know if it's true everywhere but around here crooks are back out on the street before the police officer has finished the paperwork.
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5432
  • Country: us
Re: Detecting when vehicle is running.
« Reply #40 on: April 15, 2022, 07:48:06 pm »
People steal them because it is easy to sell them. Make it hard to sell them and fewer people will steal them. Engraving them with individual serial numbers seems like a really good idea and would aid in tracking them. I still think it would be worthwhile to make possession a crime, if someone has a pile of them in the back of their truck it's no longer necessary to prove they are stolen in order to put the person in jail. On top of that it would help a great deal if we would stop coddling criminals and get rid of the revolving door. I don't know if it's true everywhere but around here crooks are back out on the street before the police officer has finished the paperwork.

A law passed here to make individual sales of catalytic converters to recyclers illegal.  You have to be a licensed auto recycler or repairer.  While this may reduce the theft of converters, the other effect it had was to make it difficult or impossible to recycle mine when I replaced the failed units on my vehicle. 

Just another installment in the diary of why we can't have nice things. 

 

Online themadhippy

  • Super Contributor
  • ***
  • Posts: 2967
  • Country: gb
Re: Detecting when vehicle is running.
« Reply #41 on: April 15, 2022, 07:49:40 pm »
Quote
I still think it would be worthwhile to make possession a crime, if someone has a pile of them in the back of their truck it's no longer necessary to prove they are stolen in order to put the person in jail.
And what about the legit  trader transporting them being pulled over by a copper who only half understands the law.A colleague of mine spent  several hours in custody for having a drum of red high voltage cable on the back of his truck,because according to the police only the electrical suppliers can obtain this cable so he must of nicked it.
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9924
  • Country: gb
Re: Detecting when vehicle is running.
« Reply #42 on: April 15, 2022, 08:13:33 pm »
You could always try the ebay passive protection approach.  :-DD
Best Regards, Chris
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Detecting when vehicle is running.
« Reply #43 on: April 15, 2022, 09:15:16 pm »
A law passed here to make individual sales of catalytic converters to recyclers illegal.  You have to be a licensed auto recycler or repairer.  While this may reduce the theft of converters, the other effect it had was to make it difficult or impossible to recycle mine when I replaced the failed units on my vehicle. 

Just another installment in the diary of why we can't have nice things.

That's just a case of a poorly written law. It should either allow an individual to sell one to a recycler with paperwork showing the vehicle it came from, or allow an individual to recycle it for free without getting money for it.
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5432
  • Country: us
Re: Detecting when vehicle is running.
« Reply #44 on: April 15, 2022, 10:55:05 pm »
A law passed here to make individual sales of catalytic converters to recyclers illegal.  You have to be a licensed auto recycler or repairer.  While this may reduce the theft of converters, the other effect it had was to make it difficult or impossible to recycle mine when I replaced the failed units on my vehicle. 

Just another installment in the diary of why we can't have nice things.

That's just a case of a poorly written law. It should either allow an individual to sell one to a recycler with paperwork showing the vehicle it came from, or allow an individual to recycle it for free without getting money for it.

You are right.  But your fixes still have flaws.  You can only reduce the drag on law abiding people, not eliminate it.   A perfect law is kind of like an ideal diode.  Easy to describe, sometimes not to hard to approximate, but always flawed.
 
The following users thanked this post: james_s

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Detecting when vehicle is running.
« Reply #45 on: April 15, 2022, 11:10:34 pm »
You are right.  But your fixes still have flaws.  You can only reduce the drag on law abiding people, not eliminate it.   A perfect law is kind of like an ideal diode.  Easy to describe, sometimes not to hard to approximate, but always flawed.

You're right of course, but converter theft has reached epidemic proportions, it's happening even in nice low crime areas. There is a balance point and IMO we are not there yet. I suspect they are being bought by a limited selection of unscrupulous scrappers, a few sting operations might put a big dent in it. They could also do bait stings and park a truck somewhere with a nice big juicy catalytic converter easily accessible and wait.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6226
  • Country: es
Re: Detecting when vehicle is running.
« Reply #46 on: April 15, 2022, 11:41:56 pm »
You know the battery light indicates wether the alternator is working or not, right?
If the alternator works, the engine is running, so the lamp goes off.

Then, all you need is to check is contact state and battery light.
Code: [Select]
Contact   Battery light
OFF       OFF             Everything off
OFF       ON              Wtf? Run!
ON        ON              Only contact (Engine stopped)
ON        OFF             Engine running

R1/R2 and R3/R4 avoids that any weird voltage turns the transistors on.
With 100K/10K you need at least ~6Volts.

But beware, in old cars the battery light is connected between 12V and the alternator winding, the lamp will turn off because the alternator self-feeds, thus the signal will be reversed (Active low)
That's why there're two circuit versions!
« Last Edit: April 16, 2022, 12:54:23 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline vu2nan

  • Contributor
  • Posts: 40
  • Country: in
    • Amateur Radio - VU2NAN - Nandu
Re: Detecting when vehicle is running.
« Reply #47 on: April 16, 2022, 03:24:57 am »
In older vehicles the D+ terminal on the alternator would serve the purpose.



With the engine running, +12V  available on the D+ terminal could energise a 12V automotive relay to turn off the device.



Nandu



Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf