I need some advice on interfacing a 12v 20% duty cycle to a propeller pin
Capt. Quirk
Posts: 872
in Propeller 1
The project is a tachometer for a watercraft using a MSD total loss ignition. The MSD
provides a wire to drive a tachometer. The signal from the MSD is a 12v, 20% duty cycle.
The project is nearly complete, except I am not sure how to connect the Propeller to the
tachometer wire. I have been thinking of using a voltage divider, or possibly a voltage
divider with a 1k resistor before the propeller pin.
My first problem is the watercraft is 250 miles away. I am trying to build it, and then let
my friend install it. I have thought about trying to simulate the MSD signal with a pnp
transistor controlled by a Propeller. There is simulation software available in the obex
that I should be able to modify to use a transistor, but frankly I am worried that my
idea of a circuit may be to simple? and endanger the Propeller.
Any help is greatly appreciated.
Bill M.
provides a wire to drive a tachometer. The signal from the MSD is a 12v, 20% duty cycle.
The project is nearly complete, except I am not sure how to connect the Propeller to the
tachometer wire. I have been thinking of using a voltage divider, or possibly a voltage
divider with a 1k resistor before the propeller pin.
My first problem is the watercraft is 250 miles away. I am trying to build it, and then let
my friend install it. I have thought about trying to simulate the MSD signal with a pnp
transistor controlled by a Propeller. There is simulation software available in the obex
that I should be able to modify to use a transistor, but frankly I am worried that my
idea of a circuit may be to simple? and endanger the Propeller.
Any help is greatly appreciated.
Bill M.
Comments
Would I need to put a schmitt trigger or a comparator before the propeller
pin?
-Phil
Erlend
btw, to reply to your impressions that optos don't output a "square wave" that is partially correct IMO. Very few have active push-pull output and rely on pull-ups on the output, even when they have schmitt trigger buffers. Passive pull-up by its very nature means that the rising waveform will take longer than the active pull-down. There are however push-pull optos as well as solid-state isolators, the latter being the type I prefer these days for many reasons. But in saying all this I am not advocating nor recommending the use of any of these devices for this application of yours.
I'm working on a project that has two steppers and a 12V power supply. When the steppers run slow they get louder so I put a PNP transistor between the load and the positive side of the power supply and used PWM at 20khz to reduce the duty cycle when my steppers run at low speeds.
In short, I would test a 20% duty cycle by placing a PNP transistor between the positive side of the power supply and the load. I would then use either an 'opto' or an NPN transistor to drive the base of the PNP.
tachometer. There are no coils or anything that I am aware of that could cause
unwanted characteristics.
Something I don't understand, a 100k resistor still sends a 12 signal to the Propeller
pin. But it limits the current to 60ua. I was trying to square this in the Propeller data
sheet, and it said max pin voltage was ~3.6v.
I suppose I have been doing the same thing, when I use a 1k resistor to protect a
Propeller pin from 5v ?
All these years, and I never used ohm's law to test it.
Would a 6k resistor work as good or better than the 200k resistor? the amps would
be ~2ma and the watts ~25mw. That is similar to using the 1k/5v to protect a pin.
I realize the 200k would be very safe, is there any drawbacks using the 200k resistor
for detecting a rising edge on the Propeller?
Thanks
I have something I need to get off my chest, that doesn't seem to have a home in the
new generation forums?
It has been a long time since I posted, and while the people that answer posts on
these forums have always been what makes this site great, but the new site IMO is
lacking. I really dislike having to read posts that stretch at least 4/5ths of my screen
from left to right. That is why I try to post with ~15 word sentences.
Where is the "Basic Stamp Experience" that seemed important in the past. An imaginative
transparent background would go a long way to improve the white Levis look (Just like my
old pit pants to try and make a bunch of mechanics look professional).
Bill M.
There doesn't seem to be much that Parallax is willing to do but why can't it just be "open source" to a registered group of forumistas? We could all contribute while following Parallax guidelines. We are already providing the content, let's improve the framework and experience too.
Btw, I picked 100k as starting value but you can go down to 18k and still limit the current to under 500ua. The CMOS structure does not start clamping for another 0.3V above Vdd, so 3.6V, but the voltage won't be clamped solid to 3.6, it will rise with current to the point where other structures will conduct at just over 4V.
EDIT: Just to confirm what I am saying here is a simulation using LTSpice of the effects of a 12V signal driving via a simple current limit resistor. The clamp diodes are not zeners, they are like schottky diodes and simply start conducting around 0.3V above whatever the Vdd is, which in turn could be affected by this current too. Pad and track capacitance I set at around 20pF for this sim and I have reduced the series resistor down to 22k. The signal shown for the 12V pulse is passed through a voltage divider simply for the purposes of displaying the signal at around the same amplitude in the sim.
V1 = 12V 20kHz 20% pulse
V(ref) = input pulse (scaled)
V(iopad) RED = what the Prop would see (remember its switching threshold is half Vdd)
I(D1) = the clamp current (<400ua)