Go Down

Topic: Variable 5V input ...help (Read 1 time) previous topic - next topic

strykeroz


It looks like it will work!

That's always a relief  ;)  But read on and you'll see why I'm glad you think so!

Dont know why but when I have the board hooked up Led #2 & 11 are not lighting up? and to get the progression of lights we just have to change "i==" line?

Actually that's entirely my fault.  I changed everything but the remapping of count, which still has the old range.  Make it instead:
Code: [Select]
  int count = map(val, 0, 1023, 2, 11);
...and that should work a little better than before.

All the best with your test,
Geoff
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Linc

Hi Geoff,
Well after putting it on three differant cars...no good ]:) I guess there is other comunication going on that circuit, that my DVOM just doesnt see.
So  guess i am back to make a seperat reostat for the input.
That is unless you can think of something more to try.

Linc

strykeroz


Well after putting it on three differant cars...no good ]:) I guess there is other comunication going on that circuit, that my DVOM just doesnt see.

That's a real shame.  In the case of the brake pedal I don't understand why it might be more complex than a switch - what does your multimeter tell you ?

On the accelerator I'm not at all surprised, especially if it's a newer car.  Don't know if you've seen articles like this one http://www.instructables.com/id/Hacking-Automotive-Ultrasonic-Sensors/ which talk about all the cool traffic going on inside a GM vehicle on what appears to be a very busy serial data bus. I'd not expected there to be a point-to-point analog circuit to the engine management if it's a newer vehicle (sorry don't know the cars you mention above). 

Some kind of reostat, rotary encoder etc might be in order to step outside the car's systems, agreed. 

Geoff
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Linc

Yea I use a lot of GM sensors for other projects I do. I race a 1975 Honda Civic 1200 with fuel injection on it and I have used lots of GM sensors.

I have a friend that is an instructor at the local uni here, I am going to ask him if he could hook up a Honda CRX to see if he can find the frequencies they use for the TPS signal, the car I am working on is a 1988 Honda CRX.

The brake switch is a normal open switch, 12 volts when closed so I will need to go with a voltage divider to bring it down to the 5 volts required. The code…it should be an analog input or digital seeing as how it's a simple ON/OFF input? Your thoughts…
Or just use the 12 volts,  a resistor and the LED

Linc

strykeroz

Hi Linc

Scary to find another Hondaphile.  I used to drive an 89 Civic hatch, which over here was closely related to the CR-X.  I couldn't tell you how the throttle was connected.  I do know it was electronically controlled, with vaccuum actuation on dual carbs.  A kind of halfway step to PGM-FI that was just too scary for me to ever pull apart  :smiley-eek:

I'd have thought for a vehicle of that age the brake pedal would be a simple switch, so yes a voltage divider down to 5V for the Arduino digital input will do the trick.  Using (say) 10k and 15k as your resistor values will get you down to 4.8V which is right in the zone you need.

Sounds like you're well on the way now.
Geoff
"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Go Up