Go Down

Topic: 9v to 5v for arduino pro mini (Read 2248 times) previous topic - next topic

Grumpy_Mike

Quote
im just worried that the power going into the arduino through the digital pin from the sensor is damaging the arduino,

Yes it is.

Quote
so if you know the value of resistor that would be best for turning 9v into 5v so that it is the same as the output on a normal arduino board?

There is no such thing as a single resistor being able to do this.
We NEED to know what sort of tilt switch it is in order to tell you how to wire it up because there are lots of different types.

CrossRoads

If the 328 itself is getting hot, that's usually a sign an output pin has been blowm, and its just a matter of time until the rest of the chip fails.

"there is a tilt sensor attached directly to  the 9v pin, the power shouldn't damage the sensor, im just worried that the power going into the arduino through the digital pin from the sensor is damaging the arduino,"

If the 9V was going thru the tilt sensor to an input pin, that could damage it. A voltage divider could be used there to change the voltage swing seen from 0-9v down to 0-5V.
Do you have a link to the tilt sensor? And even better, a schematic of your setup?

And you should download a copy of the Promini schematic, shows the 5V pin (called VCC) that is an output from the Regulator.
This could be 3.3V or 5V,  so it is labelled Vcc to be either.
http://arduino.cc/en/uploads/Main/Arduino-Pro-Mini-schematic.pdf
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

sholtob

http://www.oomlout.co.uk/tilt-switch-p-243.html
this is the tilt switch, it is very simple and basic and cheap, thanks for explaining about the vcc pin, i thought that that was only input, that might make it work

retrolefty


http://www.oomlout.co.uk/tilt-switch-p-243.html
this is the tilt switch, it is very simple and basic and cheap, thanks for explaining about the vcc pin, i thought that that was only input, that might make it work


That is a simple switch contact type sensor. Easiest way to interface it to your pro-mini is to wire one terminal of the sensor to arduino ground pin, the other terminal to your desired input pin. Then enable the internal pull-up resistor for that input pin. Results will be if digitalRead returns a 0 then sensors is 'tilted', if it returns a 1 then it's not 'tilted'. That way you need no external voltage or resistor for the sensor.

Lefty

sholtob

thanks very much, it works now, i had just about got it to work with my origianal method but it was very prone to getting set of by accident, i tried what you said and its working much better  :)

Go Up