Show Posts
Pages: 1 ... 6 7 [8] 9 10 ... 18
106  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?
107  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.
108  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.
109  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?
110  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
111  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?
112  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
113  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.
114  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?
115  Using Arduino / General Electronics / Re: 5 Ohm NTC to Arduino ADC? on: January 08, 2013, 10:32:53 am
Can you link to a datasheet for the particular thermistor?
116  Using Arduino / Project Guidance / Re: Moisture Sensitive Devices - How am I going to take these out for a trial fit? on: January 07, 2013, 09:40:46 pm
Hmmmm......can I do that in a regular oven that I cook in?

As long as the "regular oven" can reasonably accurately control the temperature.  Or, this is an opportunity to invest in a good kitchen thermometer.


Really?  Hey I may go ahead and open them up then.
117  Using Arduino / Project Guidance / Re: Moisture Sensitive Devices - How am I going to take these out for a trial fit? on: January 07, 2013, 09:33:50 pm
Hmmmm......can I do that in a regular oven that I cook in?  Probably not.....I may just have to risk it and place my order for the boards without test fitting them first.
118  Using Arduino / Project Guidance / Moisture Sensitive Devices - How am I going to take these out for a trial fit? on: January 07, 2013, 08:08:23 pm
I got my order from Mouser today for my most recent project and many of the devices came in these pouches:


IMAG0831 by jg1996business, on Flickr

This was my first project where I made the land pattern for most of the parts in Eagle myself.  I would like to test fit the parts on a printout of my board before I get the actual boards made but how can I do that if it says to use them within 168 hours of opening the bag?  It will take 3-4 weeks to get my boards made from iteadstudio.  Has anyone else run into this problem?
119  Using Arduino / General Electronics / Re: What is "ground shift problems"? on: January 07, 2013, 06:57:46 pm
Awesome!  Thanks again everyone!
120  Using Arduino / General Electronics / Re: What is "ground shift problems"? on: January 07, 2013, 06:52:48 pm
Thanks for all of the great replies everyone and I think I understand now.  So I mostly want to avoid a situation where the GND and PGND are sharing a single trace before they reach a ground plane?
Pages: 1 ... 6 7 [8] 9 10 ... 18