Pages: [1]   Go Down
Author Topic: Lower the voltage comming into the Arduino Pins?  (Read 918 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am connecting piezolectric material (https://www.sparkfun.com/products/9196) to an arduino through a voltage sensor. The largest voltage sensor i found could detect up to 50V, but the piezoelecric material produces a max of 90V. And i dont know how much voltage the arduino can handle comming through its data pins. What is the best way for me to hook up a piezoelectric sensor that will produce a low voltage and not blow up the arduino?
Logged

Grand Rapids, MI, USA
Offline Offline
Sr. Member
****
Karma: 10
Posts: 282
Yes, I remember
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Voltage Senor? Why?

Your Arduino already has lots of voltage sensors.  Each digital pin senses whether a voltage is high or low (5V or 0V) and the analog pins will give you a value between 0 and 5V.

A piezo can generate a lot of voltage but VERY little current.  This means that if there is a resistance connecting the two terminals the voltage will be significantly less than the 90V it specs for an open voltage.  According to the product comments a 1Meg Ohm resistor will bring it down to the 5V limit of your analog input pin.  This depends somewhat on your application, so if it is too high just use a smaller resistor and vise-versa. 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i need a voltage sensor because i want to detect the voltage comming from the piezo from different pressures. so i want the exact number, not just O or 5V. Will the resistor impact the voltage readings? like if the piezo gave off 90v and 45V could the arduino detect that the second voltage given off was half the amount as the first?
Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2395
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See analogRead(), this uses the inbuilt ADC to give a value between 0 and 1023 for a voltage of 0 to 5 on one of the analog pins. Take very great care to ensure that the voltage applied does not exceed 5V or you will need a new Arduino.

Mark
Logged

Offline Offline
Edison Member
*
Karma: 37
Posts: 1352
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First, since 90V can kill your Arduino  I'd recommend a pair of protection diodes* and a series resistor.   (This circuit will knock-down the voltage in a non-linear fasion, so it's just protection against over-voltage...  It is not used to attenuate a 0-90V signal down to 0-5V inearly...   i.e. 90V or 45V would both read "5V".)

Then, you'll need to measure the voltage output under your real-world conditions.    You can experiment with a parallel resistor (probably in the in the megohm range) to knock-down the signal (linearly), if necessary.    You are unlikely to get 90V and you might end-up getting less than 5V depending on your pressure & physical configuration.   (But, I'd still recommend the protection diodes.)   

Or, you can use a regular 'ol voltage divider (again along with the protection diodes).   But, with the high source impedance of piezo will create a 3-way voltage divider, and your signal will be reduced by more than the calculated amount...    A lot more if you use low-value resistors in the voltage divider.

Quote
i need a voltage sensor because i want to detect the voltage comming from the piezo from different pressures. so i want the exact number...
That's only gong to work for quick pressure CHANGES.   A constant pressure (with no physical movement) is NOT going to generate a constant voltage.**   I believe the piezo acts like a small capacitor, so it might sort-of hold the voltage for a several microseconds as it discharges through the load resistance.


* The Arduino has built-in protection diodes, but they are rated for low current and are only there as a "last resort" in case something unexpected happens (such as static discharge).   If you are experimenting with something that puts-out more than 5V in normal operation, you should take steps to reduce the voltage before it hits your Arduino.

** Conservation of energy...   Gravity can generate electricity as water flows down and through a generator.  But, you cannot use the static pressure of water behind a dam to generate electricity.


« Last Edit: January 28, 2013, 07:22:53 pm by DVDdoug » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First, since 90V can kill your Arduino  I'd recommend a pair of protection diodes* and a series resistor.   (This circuit will knock-down the voltage in a non-linear fasion, so it's just protection against over-voltage...  It is not used to attenuate a 0-90V signal down to 0-5V inearly...   i.e. 90V or 45V would both read "5V".)

Then, you'll need to measure the voltage output under your real-world conditions.    You can experiment with a parallel resistor (probably in the in the megohm range) to knock-down the signal (linearly), if necessary.    You are unlikely to get 90V and you might end-up getting less than 5V depending on your pressure & physical configuration.   (But, I'd still recommend the protection diodes.)   

Or, you can use a regular 'ol voltage divider (again along with the protection diodes).   But, with the high source impedance of piezo will create a 3-way voltage divider, and your signal will be reduced by more than the calculated amount...    A lot more if you use low-value resistors in the voltage divider.

Quote
i need a voltage sensor because i want to detect the voltage comming from the piezo from different pressures. so i want the exact number...
That's only gong to work for quick pressure CHANGES.   A constant pressure (with no physical movement) is NOT going to generate a constant voltage.**   I believe the piezo acts like a small capacitor, so it might sort-of hold the voltage for a several microseconds as it discharges through the load resistance.


* The Arduino has built-in protection diodes, but they are rated for low current and are only there as a "last resort" in case something unexpected happens (such as static discharge).   If you are experimenting with something that puts-out more than 5V in normal operation, you should take steps to reduce the voltage before it hits your Arduino.

** Conservation of energy...   Gravity can generate electricity as water flows down and through a generator.  But, you cannot use the static pressure of water behind a dam to generate electricity.




im not using constant pressure, i want to use the piezo sensor to measure how much voltage is produced from different velocity hits to it.
Logged

Maine
Offline Offline
Sr. Member
****
Karma: 14
Posts: 418
Caution: Explosives in use.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using those sensors in a reactive airsoft target system that I am building. The 1Mohm resistor in parallel that they suggest in the comment section works nicely. An analogRead on a good, solid hit gives a value between 500 and 750.
Logged

"Anyone who isn't confused really doesn't understand the situation."

Electronic props for Airsoft, paintball, and laser tag -> www.nightscapetech.com

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

I am using those sensors in a reactive airsoft target system that I am building. The 1Mohm resistor in parallel that they suggest in the comment section works nicely. An analogRead on a good, solid hit gives a value between 500 and 750.

Doesn't surprise me, the high source impedance that the device has would current limit well before the pin's built in positive and negative protection clamping diodes could fail.

Lefty
Logged

Maine
Offline Offline
Sr. Member
****
Karma: 14
Posts: 418
Caution: Explosives in use.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using those sensors in a reactive airsoft target system that I am building. The 1Mohm resistor in parallel that they suggest in the comment section works nicely. An analogRead on a good, solid hit gives a value between 500 and 750.

Doesn't surprise me, the high source impedance that the device has would current limit well before the pin's built in positive and negative protection clamping diodes could fail.

Lefty

I should probably modify that to:
"-have worked nicely for more than 1000 rounds". I did get this information from the internet after all, this could have been the worst setup ever, and the only thing keeping it working is luck.
Logged

"Anyone who isn't confused really doesn't understand the situation."

Electronic props for Airsoft, paintball, and laser tag -> www.nightscapetech.com

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

500 to 700V?
Logged

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 569
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

500 to 700V?
500-700 value for analogRead is what he means, I would guess.

That corresponds to about 2.5-3.5v.
Logged

Pages: [1]   Go Up
Jump to: