Show Posts
Pages: 1 ... 7 8 [9] 10 11 ... 20
121  Using Arduino / Project Guidance / Re: Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 10:56:48 pm
Thanks everyone for helping me work through this!
122  Using Arduino / Project Guidance / Re: Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 10:56:04 pm
that's 19 days eaten by the voltage divider.  Too much?


Okay perhaps I'm over thinking this.  I was under the impression that it would drain much quicker.  Voltage divider should be fine then.
123  Using Arduino / Project Guidance / Re: Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 10:38:59 pm



 Or are you not planning on actual battery cut-off, just some kind of a minimum current draw mode?

Lefty


That's the idea.....put everything into deep sleep mode and have a pin change interrupt that will wake everything back up again when it is time to turn back on.  Its just a small GPS logger that my wife can wear on a lanyard around her neck when she runs.  I'm trying to make it really small (my goal is for it to all be on one board that will fit inside of an "altoids smalls" tin along with the battery.

124  Using Arduino / Project Guidance / Re: Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 10:30:52 pm
It will read 255 (or whatever the max value for 10-bit resolution is) until the voltage falls below 3.3V.

1023.

Quote
The internal clamping diodes will protect the pin as long as I supply enough current limiting to it.  Is this right?

That is my understanding.  It is also my understanding that protection is obtianed by the diode conducting.  Which would be a constant drain on the battery just like the voltage divider (until the battery drops below 3.3V).  Which brings us full circle to my earlier question.  Is the voltage divider that much of a drain to be a problem?


I don't really know.  It's a 400mAh battery.  I hate the idea of it just draining down until the battery protection circuits kick in even when the device isn't being used.
125  Using Arduino / Project Guidance / Re: Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 10:17:53 pm
basically it would just look like this and I would rely on the pin protection diodes to limit the voltage to Vcc+.3


example2 by jg1996business, on Flickr
126  Using Arduino / Project Guidance / Re: Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 10:13:31 pm


Well if you would return to your first idea of powering the 328P directly from the battery below is a proof of concept sketch that Coding Badly and I worked on a couple of years ago that allows a sketch to directly determine the actual value of the voltage applied to it's Vcc/Avcc pins. It uses the known internal band-gap reference as a way to 'back calculate' what the applied Vcc must be at any given time.
Of course that still leaves you with a means of how you are going to disconnect the battery once you have performed all the orderly shutdown tasks.


But I'm not running it directly from the battery.  The mega328 will get a regulated 3.3V from a step-down/boost converter. I've shown this on the schematic above on my original post. That means I can't just read the internal band gap voltage to get the voltage at Vcc because Vcc (assuming the boost converter is working properly) will be regulated to 3.3V regardless of the battery voltage.

Just giving you an alternate look at the universe.  smiley-wink

Actually I would love to run it directly off the battery (which I think is what you are saying) but I am going to be running the GPS module and an SD card off of the same supply and they are only 3.3V tolerant (at least according to the datasheet absolute maximum ratings).  I figure running the mega328 at 3.3V gets me around having to do a bunch of logic level shifting for the communications.
127  Using Arduino / Project Guidance / Re: Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 10:11:00 pm

Based on this... http://www.atmel.com/images/doc2508.pdf ...if the resistors are large enough, the processor will not be damaged.  I assume that, when the voltage is above 3.3, the clamping diodes on A0 and D2 would conduct thus defeating the intent.

Does the voltage divider have that much of an effect?  Is a few milliampere drain going to cause a problem?

Based on your link, it appears I could just bring the battery plus side to the analog pin directly through a current limiting resistor and read the voltage.  It will read 255 (or whatever the max value for 10-bit resolution is) until the voltage falls below 3.3V.  The internal clamping diodes will protect the pin as long as I supply enough current limiting to it.  Is this right?
128  Using Arduino / Project Guidance / Re: Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 10:07:18 pm


Well if you would return to your first idea of powering the 328P directly from the battery below is a proof of concept sketch that Coding Badly and I worked on a couple of years ago that allows a sketch to directly determine the actual value of the voltage applied to it's Vcc/Avcc pins. It uses the known internal band-gap reference as a way to 'back calculate' what the applied Vcc must be at any given time.
Of course that still leaves you with a means of how you are going to disconnect the battery once you have performed all the orderly shutdown tasks.


But I'm not running it directly from the battery.  The mega328 will get a regulated 3.3V from a step-down/boost converter. I've shown this on the schematic above on my original post. That means I can't just read the internal band gap voltage to get the voltage at Vcc because Vcc (assuming the boost converter is working properly) will be regulated to 3.3V regardless of the battery voltage.
129  Using Arduino / Project Guidance / Re: Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 10:02:33 pm


You can measure the internal 1.1V analog reference relative to AVcc (which will be your battery voltage).  By working backward you can calculate the battery voltage.  You have to set the analog multiplexer register directly to set the analog input to the reference.  Note that the reference is only accurate to 10% (1.0V to 1.2V) so to get accurate results you need to measure the internal reference.  Write a sketch to enable the internal analog reference and do an analogRead(). Then measure the voltage at the Aref pin.  It should be your 1.0 to 1.2V.

But AVcc won't be my battery voltage.  It will be the voltage coming out of the boost converter which will be 3.3V even when the battery is well below 3.3V.
130  Using Arduino / Project Guidance / Re: Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 09:41:09 pm
From the ATmega328P datasheet:

28.1 Absolute Maximum Ratings
Voltage on any Pin except RESET with respect to Ground ................................-0.5V to VCC+0.5V

So it won't work.  Any other ideas on how to read the battery voltage without constantly draining the battery through a voltage divider?
131  Using Arduino / Project Guidance / Can a pin handle a voltage greater than Vcc if it is just sinking to ground? on: January 09, 2013, 09:10:55 pm
I am putting together a project that will run off of a 3.3V LiPo battery.  I understand that at full power they are about 4.2V and they can be discharged down to about 2.7V.  As such I am running a mega328 at 8MHZ and 3.3V.  My regulated 3.3V will come from a step-down/boost converter (TPS61201DRCT).  The mega328 will be reading values from a GPS module.  The manufacturer of the GPS module makes it very clear in the data sheet that any shutdown should be done in an orderly manner, rather than just pulling the plug on it.  Because of this I want to be able to monitor the battery voltage and shut everything down before the monitor circuit in the battery shuts everything down for me.  I originally was going to use the TPS62237DRYT which is just a step-down converter for my regulated 3.3V.  Using that I could just perform an analog read on the internal voltage reference because Vcc would drop as the battery crossed the 3.3V threshold.  Now that I am considering the boost converter that won't work because it will keep supplying a regulated 3.3V even as the battery drains through 3.3V.  Now I am thinking of reading the battery voltage directly through a voltage divider but my problem with that is that the voltage divider will be a constant drain on the battery....even when the device is not turned on.  Instead I was thinking of running the divider to a digital pin....setting it as an output and writing it to low whenever I want to take a measurement which should be akin to connecting it to ground and then setting it back to an input when the ADC read is complete.  The problem there is that I will have 3.3V on Vcc and potentially as high as 4.2V on that digital pin.  What would be the impact of this?  I have put together a schematic below to illustrate my idea.


example by jg1996business, on Flickr
132  Using Arduino / General Electronics / Re: Switching power sounds noisy on: January 09, 2013, 10:22:58 am
I'm planning to use almost that exact same part in a project that I am doing it.  It is the 3.3V fixed output voltage version TPS61201DRCR.  How did you go about soldering that part to your board?
133  Using Arduino / General Electronics / Re: 5 Ohm NTC to Arduino ADC? on: January 08, 2013, 04:31:31 pm
Your question was "What bias resistor should I use?" 

Put together a spreadsheet like mine and play around with the bias resistor value until you have a resolution you are happy with.

In terms of connecting it to the Arduino that is easy.

5V---------bias Resistor--Thermistor----------Ground
                                   |
                                   |
                                   |
                          Arduino ADC PIN
134  Using Arduino / General Electronics / Re: 5 Ohm NTC to Arduino ADC? on: January 08, 2013, 03:09:53 pm
I remember when I was working through a problem like this a while back, I set up a spreadsheet like the one that is attached and then played around with the resistor values until I got the resolution that I was happy with.  Maybe this will give you some ideas on how to set the problem up in a spreadsheet for yourself.
135  Using Arduino / General Electronics / Re: 5 Ohm NTC to Arduino ADC? on: January 08, 2013, 11:03:59 am
Where do you see on the datasheet the beta value of 3150.....or did you get that through your own empirical measurements?
Pages: 1 ... 7 8 [9] 10 11 ... 20