Pages: [1]   Go Down
Author Topic: Digital Transistor?  (Read 546 times)
0 Members and 1 Guest are viewing this topic.
Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


 I am wanting to simulate a rotary switch circuit that has 6 different resistors on it. As the switch rotates a different resistor is selected letting an engine ECU know what gear a motorcycle engine is in.

 I need a way to simulate the switch with changing resistance. It will be a series circuit, with current being the variable.

 Is there a chip or device that could be ran with I2C or SPI that could do this task. If a transistor is the only choice I will make that work.

Any suggestions are welcome.
Thanks,
Mark
Logged


Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17292
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, there are I2C and SPI 'programmable pot' chips avalible that allow one to set it's input to output resistance via software. You will have to see if the voltage input and maximum current limits are compatible with your application however.

Lefty
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 618
Posts: 33938
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
As the switch rotates a different resistor is selected letting an engine ECU know what gear a motorcycle engine is in.
That sounds like heavy current, not the sort of thing you can get a chip to do.
Have you measured the current or do you know the resistor values and voltage?
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks with the replies so far.

 The voltage range would be "open" 0 volts to a maximum of 5 volts from the supply.

 I know that one resistor is 6.8k ohm, I am looking into what the rest of them are. I will get back to thread with that info. I am sure it is low current as this circuit is just for signals and not relays.
Logged


Offline Offline
Edison Member
*
Karma: 33
Posts: 1307
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
am wanting to simulate a rotary switch circuit that has 6 different resistors on it. As the switch rotates a different resistor is selected letting an engine ECU know what gear a motorcycle engine is in....

...with current being the variable.
Six transistors connected to 6 different resistors should work.

Quote
That sounds like heavy current, not the sort of thing you can get a chip to do.
Maybe not...  If I understand correctly, he is only (simulating) sensing which gear is selected, he's not actually moving a gear lever.

Quote
Have you measured the current or do you know the resistor values and voltage?
Right... He has to know what value & wattage resistors to use.
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


 Here are the resistors, and calculated current I would have to simulate with a supply of 5 volts.

1.Gear  0.6 Kohm  = 8.3ma

2.Gear 0.9 Kohm   = 5.5ma

3.Gear 1.6 Kohm   = 3.1ma

4.Gear 3.0 Kohm   =  1.67ma

5.Gear 7.5 Kohm   = .67ma

6.Gear  16. Kohm
Logged


0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12048
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A schematic of how this switch connects to the 12V supply and ECU would be useful...
Logged

[ I won't respond to messages, use the forum please ]

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


   GND (-)............selected resistor.....ECU with 5volt sensor power.

  I don't know what circuit is in the ecu. I may have to take a measurement with a resistor in place.
Logged


United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6613
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As the resistors are connected to ground, I would consider using 5 or 6 2N7000 small signal mosfets driven from digital pins. Bipolar transistors might work, but the saturation voltage of a bipolar transistor voltage might cause problems, depending on how the ECU senses the resistance.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7183
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As the resistors are connected to ground, I would consider using 5 or 6 2N7000 small signal mosfets driven from digital pins. Bipolar transistors might work, but the saturation voltage of a bipolar transistor voltage might cause problems, depending on how the ECU senses the resistance.

GND to transistor source pin, arduino pin to transistor gate pin, resistor one side to transistor drain pin. Then five resistors other side all connected together and to ECU. It's nice to learn something (motorcycles use resistors to indicate gears) right at quitting time.
Logged


Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


 Thanks for the replies. So far I have the pins available to use the transistors so that is definitely and option.

 I hope to do more testing tomorrow.

Logged


Pages: [1]   Go Up
Jump to: