G oog le BadWeB | Login/out | Topics | Search | Custodians | Register | Edit Profile


Buell Motorcycle Forum » Quick Board Archives » Archive through August 12, 2009 » Circuits question « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Interex2050
Posted on Sunday, August 02, 2009 - 10:00 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

Working on a little project, and being a non-electrical engineering type, I have a little question...
Or really make sure that I am not doing something that is considered taboo

I just need to take a signal that is roughly 13V +/- 1V
and pull a "5V" logic out from it...
This seems almost too easy to work:


The first chip in the logic circuit will sense a "high" anywhere above 3.5V
so this should trigger it, and since the logic input does not really draw any
current the logic out voltage should remain unchanged.

The logic side of things will have a voltage regulator as a supply so everything
that comes after the first chip is a non-issue.

I've considered using a voltage regulator for the input, but that just doesn't
seem very elegant...

So really the question is, should I be burned at the stake as a heretic for thinking this is a logical approach?
Top of pagePrevious messageNext messageBottom of page Link to this message

Ratyson
Posted on Sunday, August 02, 2009 - 10:37 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

It is a simple voltage divider circuit.
The voltage from the input of J1-1 to ground will be equal to the voltage across R2 to ground, which is R2/(R1+R2) * 13V = 4V

There is nothing at all taboo about this approach.

Is the 13V a clean signal?
Also, is the logic circuit protected from surges?
If not, a 100 microfarad capacitor from the input of the logic circuit to ground will help to keep the logic circuit from "jittering" due to spikes in the power line.
Think of it as a steering damper for the logic circuit.
Top of pagePrevious messageNext messageBottom of page Link to this message

Interex2050
Posted on Sunday, August 02, 2009 - 10:38 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

while I am at it...

may need a debouncer, although may not need one

if there is something funny or strange about it... do share

many thanks
Top of pagePrevious messageNext messageBottom of page Link to this message

Interex2050
Posted on Sunday, August 02, 2009 - 10:42 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

thank you Russell
that is a very good point about filtering the input, although the input may be clean enough... but more protection certainly wouldn't hurt
Top of pagePrevious messageNext messageBottom of page Link to this message

Ducbsa
Posted on Monday, August 03, 2009 - 08:28 am:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

R2 needs to be 62.5% of R1.
Top of pagePrevious messageNext messageBottom of page Link to this message

Lemonchili_x1
Posted on Monday, August 03, 2009 - 10:32 am:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

"So really the question is, should I be burned at the stake as a heretic for thinking this is a logical approach?"
Many moons ago I worked in an electronics lab where we custom made our own circuit boards and we did this sort of thing all the time (assuming the power supply was clean as suggested). Cheap, simple, and doesn't take up much space either : )
Top of pagePrevious messageNext messageBottom of page Link to this message

Reepicheep
Posted on Monday, August 03, 2009 - 01:27 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

The two problems with that approach (that aren't always problems) are:

1) If you are drawing a lot of current, the power dissipation of R1 is going to become an issue fast. P = I*I*R. If that's a 1/4 watt resistor, more then 17 mA and you are smoking things.

2) The voltage divider isn't determined by just those two resistors, its the top resistor and the bottom resistor with the load in parallel. The net effect is that as the load changes, the voltage changes, as you are drawing more current through R1 (V dropped = I * R).

So if you only need a little current, and the load is constant, you could get away with it.

But instead of two resistors, you could a single 5v fixed regulator and a capacitor. Still just two components.

5v low dropout fixed 5v regulators in a little transistor sized package are 50 cents, very common, don't require external components beyond maybe a capacitor, and handle quite a bit of current. By a bag of 50 of them and have them always on hand.

I got some neat metal can ones at Mendelsons (an electronic surplus place here in Dayton) that are gold and chrome, and look *incredibly* cool. They had a big box, I bought a couple thinking (but not knowing for sure) that they were 5v fixed regulators... they were, so next time I am there I'll buy a big handful.
Top of pagePrevious messageNext messageBottom of page Link to this message

Hootowl
Posted on Monday, August 03, 2009 - 03:28 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

The input impedance of an exclusive or gate is typically quite high, shouldn't affect the voltage divider significantly.
Top of pagePrevious messageNext messageBottom of page Link to this message

Interex2050
Posted on Monday, August 03, 2009 - 04:01 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

The signal does not have to be exactly 5V
high: 3.5~6.5V
low: -0.5~1.5V

At the "low side" the raw signal is 12V
reduced signal is 3.7V
On the "high side" the raw signal is 14V
reduced signal is 4.3V

so it would a good idea to bump up the reduced signal, as the 3.7V is cutting it a bit close...

The range of current is also acceptable for 1/8W resistors, 9mA~11mA
with 0.11W max through the 900ohm

Fortunately since its just a logic signal
the "load" draw is only 5uA, so as far as the divider is concerned it will make no difference.

Bill,
So the voltage regulators do not mind being cycled on/off, if used for signal pre-processing?

I must say I do have an affinity for shiny things...
although for this project, I am thinking of going surface mount all the way

again thank you guys
Top of pagePrevious messageNext messageBottom of page Link to this message

Reepicheep
Posted on Monday, August 03, 2009 - 06:24 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

I don't think they would mind the cycling.

Now that I actually read the problem you are trying to solve ( ; ) ), you could also just just slap a reverse biased zeener diode in place of the bottom resistor. Pick something around 5v. Same parts count, reasonable voltage regulation, even if the VR dies and you suddenly are seeing 30 volts on there...

But like Hoot says... the voltage divider would actually work pretty good for this, provided your source voltage never went through the roof.

I designed something similar for a temp sensor on a PIC microcontroller, and ended up choosing the zeener... you can kill the PIC cpu if your A2D input goes too high. I didn't want a spike to come in and kill something...
Top of pagePrevious messageNext messageBottom of page Link to this message

Interex2050
Posted on Saturday, August 08, 2009 - 05:39 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

Bill,
Using a zener is a brilliant idea!
I may very well go with that.

Good to know about the voltage regulators
not caring about being cycled, would the
same apply for timers (i.e. 555, etc)?

I have been meaning to get into microcontrollers,
aside from the basic stamp, interrupt capabilities
would be nice. Any advice as to where would be a
good starting point for playing around with that?

Thanks,
Peter
Top of pagePrevious messageNext messageBottom of page Link to this message

Reepicheep
Posted on Saturday, August 08, 2009 - 08:07 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

The 555 might be more of an issue going on and off, I haven't played with them much.

Definitely do the microcontrollers. If you have a few bigger projects, or just a few projects, go with something like the Audrino. $20 or so each, but lots of goodies and capabilities.

I want something I can build a lot of copies of and sell or give away, so I went with the PIC16 family. $3 or less per chip, another $3 or so of external components, and you have something doing something useful.

I started with this programmer:

http://www.amazon.com/PIC-Programmer-Experimenter- Kit/dp/B000LQDK3C/ref=pd_rhf_shvl_1

The first picture is the wrong one, but the customer picture is the one I got (and the one you want). It is a little fussy about serial ports, it worked with one of my laptops but not the other. The USB programmers are nice as well, haven't tried one yet, I should get one. I don't know all the voodoo about which do what with what software... I just stuck with the setup that worked.

They are easy to program, and PM me offline and I'll give you some code I wrote that does cool stuff, and that is really well documented with comments, that should make it a LOT easier to get started.

The learning curve isnt bad, in a week of evenings you will be making lights blink. Not bad, considering getting an analog circuit to do half as much would take a year of learning.

You program them in C, so if you don't already speak C, that may be an issue... in that case stick to the Audrino or something, it requires less knowledge to program.

www.sparkfun.com is a great place to start as well...

The KDX fired up today. then siezed. but it was only the kick starter, so I un friction welded it, used some valve grinding compound to make it a bearing again, and then started it and it ran! Woo Hoo! So when that project is done, I'll be back to playing with Pics again. There will be some cool things coming for Buells... I have some good designs already sketched out.
Top of pagePrevious messageNext messageBottom of page Link to this message

Easy_rider
Posted on Saturday, August 08, 2009 - 11:02 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only)

I'm not sure I consider a regulator un-elegant. Especially since you're driving 3 inputs. You've got three heat sources instead of one.
The zener route is good. I'm a bit rusty, but you need to size the resistor to make sure that there's not excess current going through the zener. Otherwise the zener will have a fairly short life. (13V - 5.2V)/(highest expected current draw)=R

Sorry, too late to look up current draw at this point.
« Previous Next »

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image

Username: Posting Information:
This is a private posting area. Only registered users and custodians may post messages here.
Password:
Options: Post as "Anonymous" (Valid reason required. Abusers will be exposed. If unsure, ask.)
Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Tree View | Search | User List | Help/Instructions | Rules | Program Credits Administration