Printable Version | Subscribe | Add to Favourites
New Topic New Poll New Reply
Author: Subject: Anyone good with designing Electronic Circuits ?
Tris

posted on 5/6/11 at 09:45 PM Reply With Quote
Anyone good with designing Electronic Circuits ?

Evening all,

Looking for some help with a little electronic project of mine

I need to create a 'circuit' which monitors 7 individual voltages, and depending on which of the 7 voltages was the lowest (compared to the others), produces a single output signal which alters in voltage depending on which of the 7 inputs was the lowest.

For example, if input 1 was the lowest, the output voltage would be 2v. If input 2 was the lowest, output would be 3v. etc etc. This is for a car application, so everything needs to run off 12v.

Could anyone give me some guidance or any idea's where to start ?. I have got a electronic background (although many years ago), so i can hopefully muddle through most things.

Cheers
Tris

View User's Profile Visit User's Homepage View All Posts By User U2U Member
HowardB

posted on 5/6/11 at 10:09 PM Reply With Quote
sounds like a job for a PIC, 8 channel I/O, should do. google PIC.

hth





Howard

Fisher Fury was 2000 Zetec - now a 1600 (it Lives again and goes zoom)

View User's Profile View All Posts By User U2U Member
michael92

posted on 5/6/11 at 10:11 PM Reply With Quote
I shall have a go just working on it now with my "previous" knowledge haha

its going to fry my brain that's for shure!

going to play with a few multiplexers etc etc

may i ask what is the application?

Michael

View User's Profile View All Posts By User U2U Member
Madinventions

posted on 6/6/11 at 12:35 AM Reply With Quote
A simple PIC application sounds like a quick solution. Download MPLAB (free PIC develoment environment) and you'll find it comes with a version of a C compiler. There's loads of help on Google for this, but as a quick guess you'd basically want to to read 7 channels of ADC data into seven variables, compare them, and then set the PWM module to generate an output voltage depending on the result of your comparison. Because you're operating from 12V, you'll need some simple resistor dividers on the inputs to make sure that the maximum signal into the PIC is +5V, and a bit of extra circuitry on the the output to convert the PIC's 0-5V output to 0-12V.

U2U me if you need a hand or get stuck.

Ed.





Mojo build diary: http://www.madinventions.co.uk

Solo music project: Syrrenfor http://www.reverbnation.com/syrrenfor

View my band website:
http://www.shadowlight.org.uk

http://www.eastangliankitcars.co.uk/

View User's Profile Visit User's Homepage View All Posts By User U2U Member
Tris

posted on 6/6/11 at 09:36 AM Reply With Quote
The circuit is to allow my dash (Race Technology) to interface with my engine wiring loom to determine gear position. The bike has a rotary switch which is connected within the gearbox, which earth's one of 7 pins (Natural, 1-6), which the ECU normally holds high.

The resistance between this switch and earth can vary however, as the connection is via or 'through' the gearbox. So its more a case of finding the pin with the lowest voltage, rather than which pin is directly connected to gnd.

Never played about with PIC's, but i like the idea of using this opportunity to learn - is there a starter kit that i can get ?

Cheers and thanks for the help so far.

View User's Profile Visit User's Homepage View All Posts By User U2U Member
craig1410

posted on 6/6/11 at 10:05 AM Reply With Quote
I'd strongly suggest rethinking your approach to this as you are making it much more complex than it needs to be in my opinion. I appreciate that the resistance between the switch and earth can vary but surely when one of the gearbox connections is "low resistance", the others are open circuit are they not?

If so then you can solve this more easily with just 8 resistors and it becomes a simple case of doing some arithmetic to determine the best value for those resistors.

Something like this (I'll try to do this in ASCII art):

1 ----- R1 ------|
2 ----- R2 ------|
3 ----- R3 ------|
4 ----- R4 ------|------A---- R8 -----B
5 ----- R5 ------|
6 ----- R6 ------|
7 ----- R7 ------|

So, if you connect each of points 1 through 7 to the gearbox connections and point B to 12V, then point A will vary in voltage depending on which connection (1-7) is earthed and upon the resistor divider ratio defined by R1-7 and R8.

The voltage on point A will be defined by the formula: VB x Rn / (Rn + R8) where Rn is any one of R1 through R7. I can help you work the values out if you can first confirm if the gearbox outputs are open circuit except for one of them which is a low resistance. It would help if you can take a resistance reading of each connection for both "active" and "inactive" states just to be sure there are no surprises. It would also be helpful to know the input characteristics of the dashboard instrument although I would tend to assume that it will not require much current and therefore won't affect the above circuit as long as we choose sensible values (ie. K ohm range not M ohm range)

I just looked at the Race Technology DASH2 user manual online and it seems that it can learn the analogue voltages associated with each gear so you don't need to calculate resistors to match a particular voltage, you can just use a range of resistors which will give good spacing of voltages and then let the dash learn what they are. I'll work out some good values and report back - give me 10 mins.

Craig.

[Edited on 6/6/2011 by craig1410]

View User's Profile Visit User's Homepage View All Posts By User U2U Member
02GF74

posted on 6/6/11 at 10:21 AM Reply With Quote
quote:
Originally posted by Tris

The resistance between this switch and earth can vary however, as the connection is via or 'through' the gearbox. So its more a case of finding the pin with the lowest voltage, rather than which pin is directly connected to gnd.




If you are saying the earth circuit is going via components in the gear box hence it can vary, that variance will be quite small due to having farily big chunks of steel (i.e. the gears/shafts etc).

Why can't you use the pin that is grounded? It could be done using a single op-amp with resistors chose so that that the output voltage represents a gear - it would be far simpler and cheaper than a PIC.






View User's Profile View All Posts By User U2U Member
craig1410

posted on 6/6/11 at 12:16 PM Reply With Quote
Hi again,

Okay, I've done a few calculations (sorry I took longer than 10 mins as I had a couple of phone calls between times):

If VB is 12V and R8 is 4700ohms then the following resistances for R1-R7 will give the corresponding voltages:

1. 470ohm = 1.09V
2. 910ohm = 1.95V
3. 1600ohm = 3.05V
4. 2400ohm = 4.06V
5. 3300ohm = 4.95V
6. 4700ohm = 6.00V
7. 6800ohm = 7.10V

Taking one of these as a worked example for illustration:

5. VA = VB * R8 / (R8 + R5) = 12 * 3300 / (4700 + 3300) = 12 * 3300 / 8000 = 4.95V

It doesn't matter if the resistance of the gearbox rotary switch is 0.1ohm or 10ohm or even 100ohm. It will affect the voltage at point A but if your dashboard can learn the voltages as per the DASH 2 unit then it won't be a problem. As long as the gearbox switch resistance isn't any higher than 100 ohms or so when closed and as long as it is open circuit when not closed.

Let me know if you need any more help.
Cheers,
Craig.

View User's Profile Visit User's Homepage View All Posts By User U2U Member
Tris

posted on 6/6/11 at 01:43 PM Reply With Quote
Hello All,

Sorry, its been a busy day at work, and ive only just had time to read through this thread.

Its correct that the pins are Open Circuit at the bike end when not in use, but they are powered / held high by the ECU by some unknown circuitry within the ECU itself. I have previously tried the 'resistor' approach and it worked, but i got issues running this circuit in parallel with the ECU, as i was somehow effecting how the ECU monitors which gear was in use.

Of interest the resistance through the gearbox does change quite a bit, but in the grand scheme of things didn't effect it really.

I then started thinking about a 'passive' approach which just monitored the voltage on each of the 7 wires, hence this post.

Cheers
Tris

View User's Profile Visit User's Homepage View All Posts By User U2U Member
craig1410

posted on 6/6/11 at 02:25 PM Reply With Quote
quote:
Originally posted by Tris
Hello All,

Sorry, its been a busy day at work, and ive only just had time to read through this thread.

Its correct that the pins are Open Circuit at the bike end when not in use, but they are powered / held high by the ECU by some unknown circuitry within the ECU itself. I have previously tried the 'resistor' approach and it worked, but i got issues running this circuit in parallel with the ECU, as i was somehow effecting how the ECU monitors which gear was in use.

Of interest the resistance through the gearbox does change quite a bit, but in the grand scheme of things didn't effect it really.

I then started thinking about a 'passive' approach which just monitored the voltage on each of the 7 wires, hence this post.

Cheers
Tris


Okay I understand. The ECU is probably just using "pull-up" resistors but it is likely that they are being pulled up to logic level (ie. 5V) rather than 12V. Can you verify this by measuring the voltage on an inactive pin? If that is the case then the 12V coming through R8 and one of the Rn resistors would tend to drive the ECU pin voltage higher than 5V. To avoid this you could introduce a diode between each of the gearbox pins and the corresponding ECU pin. The anode should connect to the ECU and cathode to the gearbox. The resistor R1-7 would then connect to the diode cathode.

That will allow the ECU pin to float high and prevent it from being pulled too high by the resistor network. The only downside is that the ECU pin low level voltage won't be quite as low (approx 0.6V higher than it was) but this should be okay as it will still be below the low level threshold I think.

Something like this:

ECU1----- >| ------ (GB1) ----- R1 ------|
ECU2----- >| ------ (GB2) ----- R2 ------|
ECU3----- >| ------ (GB3) ----- R3 ------|
ECU4----- >| ------ (GB4) ----- R4 ------|------A---- R8 -----B
ECU5----- >| ------ (GB5) ----- R5 ------|
ECU6----- >| ------ (GB6) ----- R6 ------|
ECU7----- >| ------ (GB7) ----- R7 ------|

A general purpose signal diode should do: eg. 1N4148

I would definitely persevere with analogue electronics rather than going down the road of PIC chips etc. I've built plenty of PIC circuits in my time and they are great but it shouldn't be necessary here.

Cheers,
Craig.


[Edited on 6/6/2011 by craig1410]

View User's Profile Visit User's Homepage View All Posts By User U2U Member
Tris

posted on 6/6/11 at 08:09 PM Reply With Quote
Thanks craig - My iva is tomorrow but after that little hurdle i will give your suggestion a try

Cheers
Tris

View User's Profile Visit User's Homepage View All Posts By User U2U Member
craig1410

posted on 6/6/11 at 08:10 PM Reply With Quote
quote:
Originally posted by Tris
Thanks craig - My iva is tomorrow but after that little hurdle i will give your suggestion a try

Cheers
Tris


Good luck tomorrow, I hope it goes well!

View User's Profile Visit User's Homepage View All Posts By User U2U Member

New Topic New Poll New Reply


go to top






Website design and SEO by Studio Montage

All content © 2001-16 LocostBuilders. Reproduction prohibited
Opinions expressed in public posts are those of the author and do not necessarily represent
the views of other users or any member of the LocostBuilders team.
Running XMB 1.8 Partagium [© 2002 XMB Group] on Apache under CentOS Linux
Founded, built and operated by ChrisW.