Author Topic: [AVR] How to monitor external circuitry for a car project? ATMega 8-bit  (Read 12025 times)

0 Members and 1 Guest are viewing this topic.

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: [AVR] How to monitor external circuitry for a car project? ATMega 8-bit
« Reply #25 on: April 23, 2014, 09:18:23 am »
a while back i designed "starter cutoff while engine on" circuit without mcu, just relays and passive components. has been installed in my car for about a year or so, worked wonderfully, nobody (including me, the wife and the kids) will be able to crank the starter during engine ON again. tap the tacho line from ecu to the speedmeter, its PWM, iirc PWM freq = engine RPM / 60, 12V or 5V maxed logic 1 output iirc... feed it to buffer opamp and then low pass it to get average voltage. feed to a comparator with adjustable Vref to cutoff relay if RPM go to some threshold, i set at 500RPM. you can modify the lowpassed output to your mcu and decide by comparing ADC on the spot whenever you like, no need interupt no need clock counting. if your car is modern dont worry of thing like welded contact. the starter line in your car key (below the steering top of your lap) is actually another relay drive driving bigger starter relay outside in the bonnet, so you are fedding relay drive into your relay circuit, ie low ampere there. if your car is old, wear proper dressing and glove while driving to avoid electrocution during driving. please drive safe ;) YMMV.

Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: [AVR] How to monitor external circuitry for a car project? ATMega 8-bit
« Reply #26 on: April 23, 2014, 11:00:32 am »
Quote
PWM freq = engine RPM / 60, ... then low pass it to get average voltage.

Wow!

That's one wacky PWM signal for sure, :)

================================
https://dannyelectronics.wordpress.com/
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4706
  • Country: au
  • Question Everything... Except This Statement
Re: [AVR] How to monitor external circuitry for a car project? ATMega 8-bit
« Reply #27 on: April 23, 2014, 11:12:21 am »
I agree, very odd, to be that low frequency your really in the electrical noise of the system, I'm guessing yours was a V8 with a divide by 4 converter hidden somewhere, as I've only seen frequencies that low when people get fancy with aftermarket ignition control modules, (I've seen at least a dozen V8 vehicles with 2 bastardized V4 controllers running in parallel and voodoo magic linking them together)

Also Pro-tip to the op, you will want my fancy filtering if your looking at the low side of an ignition coil, 300V spikes are common, and forget direct high side measuring, better way is to wrap your test lead around one of the spark plug leads, and induce the signal,
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: [AVR] How to monitor external circuitry for a car project? ATMega 8-bit
« Reply #28 on: April 23, 2014, 03:01:22 pm »
i found the old capture (engine at 1000rpm)... the exact value is pwm_freq = rpm / 30.... but i believe its specific to my car brand and model, yours maybe different. i dont care as long my cutoff circuit works and the speedometer showing the right rpm ;) or maybe you or i misunderstanding between rev/min and rev/sec? 1000rpm = 16.7rps, so its about there ;)

edit: my mistake, the main circuit was not a mere low pass pwm-to-v, but actually freq-to-voltage converter using 555 i found in the net last time.
« Last Edit: April 23, 2014, 03:10:22 pm by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: [AVR] How to monitor external circuitry for a car project? ATMega 8-bit
« Reply #29 on: April 23, 2014, 03:27:45 pm »
Quote
the main circuit was not a mere low pass pwm-to-v, but actually freq-to-voltage converter

Glade that you figured that out. It would have been a miracle for a low-pass filter to generate a voltage output that varies with input frequencies.
================================
https://dannyelectronics.wordpress.com/
 

Offline expertmaxTopic starter

  • Regular Contributor
  • *
  • Posts: 51
Re: [AVR] How to monitor external circuitry for a car project? ATMega 8-bit
« Reply #30 on: April 26, 2014, 02:23:18 pm »
Would you guys have any circuitry for that ? Parts list ? I'm not very good at op-amps, comparators, voltage followers, etc... I really need to buy a scope.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf