Go Down

Topic: Combining analog input (Read 2 times) previous topic - next topic

Grumpy_Mike

Do not use a voltage regulator to cut down a signal from a sensor into an arduino, it is totally the wrong thing to do.
You need to use either a potential divider, transistor or opto isolator.

Quote
that combine the voltage regulator and capacitors

No.

DragoslaV

#21
Mar 07, 2011, 10:59 pm Last Edit: Mar 07, 2011, 11:08 pm by DragoslaV Reason: 1
Thanks alot for pointing out that noob mistake :smiley-sweat:
What is the best practice for a nooby?

Also let me remind you that the indicators are no sensor, just plain v12 battery going to a lamp.

Grumpy_Mike

Take the sensor output put it through a 10K resistor into the base of a transistor. The connect the emitter to ground and the collector to the input. Finally in the software enable the internal pull up resistor.

jackrae

You might also want to consider fitting decoupling capacitors (0.1uF) across Vcc and Gnd on each of the chips to prevent noise affecting operation of the signals.  These should be fitted as near the chips as possible.
jack

DragoslaV

#24
Mar 19, 2011, 08:34 pm Last Edit: Mar 19, 2011, 08:43 pm by DragoslaV Reason: 1
Sorry I been away for a while. Thanks for the replies!
If I understand you correct Grumpy_Mike I will get the follow result (in a nutshell)?



Code: [Select]

void setup() {
  Serial.begin(9600);
 pinMode(19, INPUT);
 digitalWrite(19, HIGH);
}

Go Up