Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does this creature exist / Is this possible ?? slightly urgent...

Status
Not open for further replies.

iso9001

Automotive
Nov 15, 2003
9
0
0
US
First off, I'm extremely new at this... but I aint no fool. And sorry about posting in different forums, but couldnt figure out where the best place was to post.

I need a chip/curcuit (maybe single chip??) to read in 3 different wires and for each wire output two others (ie: 3 in | 6 out), but they all need to be different resistances... so for example:

Wire1 is sending a 5V signal at 4.5ohm... this goes into the chip, and then the chip sends out two wires, one at 4.5ohm and the other at 9ohm... (ohm numbers are just for example)

What chips have instruction sets to do this ?? Do any exist ? Cheap easy programming is a serious plus. (Does a 28F020 have logic sets like this ?)

Can analog or digital ICs read in and output resistances ???

TIA
 
Replies continue below

Recommended for you

You need to describe this in terms of current and then we will be able to understand what you need. Measuring resistance (reading in) is done effectively by applying a known voltage and measuring the current or comparing resistors in a bridge circuit.

Outputing resistance as you put it is achieved by producing a proportional value of current in the output circuit.

There are a number of ways to achieve these things. I don't think there is an of the shelf solution. You can use a processor which means you have to take on board the programming as well as the hardware design, or you can achieve it using descrete circuit elements - the hardware only route.

Rgds, Boxxy
 
You can acheive a "resistance" output with switched capacitor circuits, D/As and solid state potentiometers but not as low as 4.5 ohms. Basic ohms law says you are handling over 1 amp and over 5 watts! You could implement some circuit using power fets driven by some sort of servo circuit behind instrumentation amps on your inputs. The instrumentation amps allow a "floating" reference for a two wire transmit. This is provided the common mode voltage of your two wire circuits is within a reasonable range of the input reference ground. I think Analog Devices may have some differential drivers that come close to what you want in their applications for DSL.
 
To clear this up, I'm getting input from switches where each switch sends a 5V signal at a different resistance to a processor that reads that resistance then performs an action...

My problem is I'm changing processors to a similar design but with a 'failsafe' system that requires all the signals coming in to be redundant but I can not change the swithes (its not a life critical application, designers

(ie: the original switch sends 1 signal wire and 1 ground wire to a chip... I changed chips but not switches (cant), so now I have a processor looking for 2 signal wires and 1 ground but switches that only send 1 signal wire....)

I'm a software programmer, and have only hit the surface of hardware. So... I'm kinda at a loss on where to start this.

I sort-of get the idea about measuring current to determine resistance, but i know all signals in the system will be 5V... Not sure about the wattage or amps.

This is getting more and more urgent everyday so I'm about to start stressing.

Anyhow... (This might be important) It seems that this 'failsafe' system is kind of a joke... The original system takes in a X resistance into the processor, while the new system is waiting for X and 2X (that is double the resistance of the first signal)... The problem is still that I have a 6 or 7 resistor system and i know it could be pretty complex trying to do this on a hardware only route. Which is why I posted about the chip at first.

Assuming i can figure out the current... Can a PIC chip do this? (easier method prefered)


 
One approach would be to take each of your inputs and run them into op-amps with feedback resistors of the same value to get unity gain and the multiplex the signals into A/D.

If you had gobs of money, you could get the analog stuff all on one chip, possibly like an analog ASIC. OTherwise, it'll be simply to build the three op amps with a mux and A/D and run that into whatever processor you're using.

TTFN
 
Ok... that was a little (lot) over my head :)


Here is what I'm thinking now...

Voltage = Current * Resistance right ? (v=ir)

So then my system doesnt really care what the resistance is... It cares what the voltage is after hitting the resistor. (This is a revelation for me) So all i need is a chip with 1 input and 2 outputs... then inside the chip if I see 4.5V coming in (where i know i should be getting 5V) I know that a resistor of whatever has been hit (switch pressed) and i need the chip to output a 4.5V and a 2.25V signal to make the new processor think everthing is working smoothly.

Does this seem correct or am I totally mangaling electronic theory...
 
If I understand you correctly, you are trying to read what the current is from different sources. What you need is to read the voltage that goes into a "current sense" resistor. Since you are working with currents that high, I assume that these currents are from devices that are "ON". In this case the "current sense" has to be low enough so that you will not lose the voltage for your devices. Say no more than one volt of loss.
Then if for example your max current is 5 amps, what you need is a 0.2 ohm resistor. What you need then is a microcontroller that has an integral A/D converter that can read this voltage. A good example is the Zilog Z8 Encore (cheap with a full "C" development environment almost for free). It has several A/D inputs.
Then, I'm not sure what you expect your microcontroller to output after it had read the inputs? You need to output 4.5V and 2.25V to who? Another processor? Do you need to drive a high current too?
I'm just about to design a microcontroller module for automotive supply voltages. I want to know more about your application. Who knows...
Felix
 
I'm the tricking the new processor using the old switches game...

The voltage is 5V always (reference) and the amps... well, I dont know the amps right now, but its low... like .5 or 1... think car switches... thats a good example.

The Z8 Encore looks a little much for this application... I dont think i need THAT much... I figured a silly ol pic chip would work.

I only have 1 wire going in to my contraption and 2 need to leave it, but the V of the two new wires depend on the wire going into my chip/board thingie

So thats where the logic comes in... Do i NEED a a/d converter to do this ?

What exactly is A/D doing anyhow ?
 
Let's try to clarify what you want. The old chip produced 2 outputs for a processor, 1x the input value and 2x the input value. You now need a circuit which will simulate that action and it needs to be simple.

Could you use a simple analogue switch like the dirt cheap CMOS 4066 operated by your mechanical switch, in turn switching a potential divider chain to produce the outputs you need. You get 4 switches in a 4066 pack. You will need to scale up your output resistances to Ks.

If you take 3 resistors in series connected across a 5v supply, numbered from the top R1, R2, R3, the volt drop across the bottom one R3 will be (R3/(R1+R2+R3)) x 5v. By choosing the values correctly you can scale the voltages at R3 and R2 by shunting them (switching one or more other resistors in parallel with them) and applying the above formula at each stage. Having done that you need to take into account that your load will shunt these voltages and could significantly lower them unless it has a very high input impedance. You may need to buffer them with a simple op-amp unity gain buffer achieved by connecting the point in your resistor network to the +ve pin of the op amp and connecting the output of the op-amp and its -ve pin together. The output will then reproduce the input voltage at the +ve pin but at low output impedance and capable of driving several mA into your load.

Using a 4066 should not be beyond you - it's important to consider the on resistance of the (semiconductor) 4066 switches and to make your potential divider circuit values at least 2 orders of magnitude greater.

You can get the data sheets you need from many websites, eg. On-Semi. Chose a low cost op-amp like the LM324 which will work from a single 5v rail but take into consideration the temperature range this circuit has to operate in.

Hope that helps a bit.

Regards, Boxxy
 
I had a system that used a gnd and a signal... then new system wants a gnd and two signals... Signal1 is the same, signal2 (new) is 1/2 signal 1...

I sort of (almost kinda) understand what your saying, but just cant see any reason not to make a chip to do this... I'm thinking now of using a PIC w/ built in A/D and internal timer.

I had some other things that need to happed w/ this new system, but this is the hardest so it was what i started the thread about... I just dont see the reason not to make the pic...

When I posted this originally I had no idea what a A/D was... Now i am a little more confident this will work... Anyone know what PICs have A/D, that program easily ?
 
Something is still not clear to me. These signals that you have to read, are they static? Can they stand anywhere between the voltage limits that you said? do they have a frequency content? Or are they just either zero or full scale? What error, induced by the intermediate box, will be tolerated? Will your outputs need to drive low resistors like the ones that you described?
I'm trying to figure out if you really need a microcontroller to do the job. And make sure that you're not spending energy at the wrong place.
You said "think switches". Maybe we're getting too complicated. If you only need to detect the on or off state of a switch, represented by a voltage of zero or something, then everything can be much simpler. You just need a comparator, with its logic output used to trigger two voltages out. Each driving at the on and off at the desired state. And repeat this three times. And forget about A/D and MCUs. Yes? No? I undestand that you may not want to tell too much details, but it does not help us to help you.
 
Most PIC's have ADC's, I like the 16F818.
4 10bit ADC's ,internal rc oscilator (no xtal needed)
1k of flash, 18 pins all for about $2 .

Here's a link to their line card.

What do you mean by program easily?
I use assembler and I think it's easy.
Or are you talking about ease of programming the chip.
I.E. Incircuit serial programming.

I've followed this post and I still don't quite know
What you want to do. Maybe if you link to a schematic.

If you have one voltage in and want that voltage and 1/2
of it out can't you just use a divider?


Vin Vout
>----------------------------->
|
|
1k
|
---------------> 1/2 Vout
|
|
1k
|
>-----------------------------> Rtn

You may want to add opamps depending on your load.
Or maybe I'm completely lost.
 
I think that 1/2V divider thing would work out pretty well... i THINK then new signal is 1/2 of the first (it SHOULD be) but not certain... I'l keep that in mind tho.

The load is very small... its all running to a computer, so all it needs is enough power to travel the distance of the wire.

Dividers, A/D, D/A, OpAmps, all very new to me.

The reason I want to do this in a chip is b/c I have 2 or 3 other things that need to be done as well... the 2 wire >> 3 wire system thing is the hardest so I figured I'de post a question about that.


More about the 2 to 3 wire system: the signals are read... If i use a chip for this I can use the internal A/D to get the voltage coming in. The entire system is 5V, but I have these switches w/ 3 or 4 positions per switch and it cant use just 0V or 5V b/c there are too many options, so it runs the 5V though different resistors for each position on the switch (makes sense ?)

All I need is a way to read in what switch was pressed (by checking that voltage... say 4.5V, 2.0V, 1.3etc etc) and then send out TWO signals based on what ever was switch was pressed.

I think I'de need a D/A if i use a chip... but I'm not sure how a D/A works.

The chip also (this seems like kinda minor stuff) has to:

1. continually check a signal, when it seeing 5V, i need 1 output to ground for as long as the 5V is coming in (easy)

2. I need another input waiting for a momentary signal and when it seeing it, it turns an output to 5V... but if it sees it again it has to turn that output off (easy)

3. I have a sensor creating a Hall Effect that sends pulses into a computer to determine speed of a cam... I need a way to get a signal in and modify it to be 2-4 times faster. i THINK this is a 3.3V sensor, and when the cam is moving is makes a .2V or so increase in the signal (it has a mini-coil inside it)... so the computer will be waiting for an alternating 3.3|3.5|3.3|3.5|3.3|3.5 signal at a variable speed... I need to read that in and duplicate it 2-4 (or so) times faster. (this is hard i think)

But again, I'm good with C and have a C/ASM compiler so... I think all these things can be done.
 
You're adding complexity to your project eh? The more you add the more it will be prone to failure. As you're in the automotive arena, remember this. But I'm starting to think that doing all what you want to do without an electronics guy to assist you is getting risky. This is more than tips and tricks that you need to bring your project to an end.
- yes, no problem to use switches with resistors to make it a voltage divider to read multiple settings with an A/D. This is a good way to get multiple switch readings with just one wire. I've done this in the past. It works!
- a D/A is even easier. Output a digital number to it, and the D/A makes it a proportional analog voltage. You can generate one from your MCU if it has a PWM output also. A simple low-pass filter will transform the PWM signal into an analog voltage proportional to the duty-cycle of your PWM signal.
- your item one looks like just an inverter. If you have an MCU with pins available, why not use it.
- your item two looks like a "divide by two" circuit. Easy to do if you have spare pins on your MCU too.
- I would do differently your item three: go see on the web a company called Allegro. They make temperature-compensated hall-effect sensors for the automotive market. With it you drive an input of your MCU that has a "timer/capture" capability. This will allow the MCU to do a digital measurement of the frequency going out of your cam sensor. Then to emulate a different frequency output, your MCU should have another timer unit that you can use a a frequency generator output. The frequency will be easily controllable from your MCU code.
By the way, with all these additions, you will need more than the cheapest MCU on the market. Take a second look at the Zilog Z8Encore. (no I don't work for Zilog) I started a project, with their smallest model, 20 pins, and as the project went on, my customer never stopped adding functions as he realized what he could do. We are now using the largest Z8Encore model. If you like "C", you will love its programming environment. Full "C" compiler, sample code, and the whole development kit costs $60.
Good luck.
Felix
 
i know this is 12 months old,but i'm new to this site.i think everybody is looking too deep into this question!because of how it was worded!!!in basic terms...you are looking for a (eg) 5 ohm (on 1 wire) & a (10 ohm) reading from another,after a switch has closed 5 volts.no matter what happens,the processor is going to see 5 volts.the fact we have 2 resistive values & a set voltage indicates to me that the processor is asking for 1amp for the first wire & 0.5amp for the second wire.it is just not saying it in terms we regard as nomal.asking for a switched reference of ohms is uncommon with a voltage applied.i may be wrong in what i'm suggesting,because i'm new at this game.
just an idea to consider though......
 
Status
Not open for further replies.
Back
Top