Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: Tell the difference between 3.7V battery power and USB power - will this work? on: September 14, 2013, 12:23:00 pm
Then his idea might work?

No, as I was trying to explain.

analogRead doesn't return 750 from Vcc, if Vcc is 3.7V, it returns 1023. Same as if Vcc is 5V. The number 1023 is returned if the analog pin is equal to the Vcc pin. Thus, on its own, you cannot work out what Vcc is.

Unless you use an external reference or the internal 1.1V reference.

Thanks for the advice so far.

I actually have a shottky diode between the 3.7V battery and VCC.  Thus the 3.7V at the battery's positive terminal is always (roughly) 3.7V. If I am plugged into USB VCC is 5V and battery+ is 3.7V. If not, VCC is (roughly) 3.5V and battery+ is 3.7V.

I haven't given this a try yet but I will soon. 
2  Using Arduino / Project Guidance / Tell the difference between 3.7V battery power and USB power - will this work? on: September 11, 2013, 01:24:03 am
Hi folks, 

I have a circuit that is normally battery powered.  I would like to add a charger circuit (I have already chosen a 5-pin SMD - http://ww1.microchip.com/downloads/en/DeviceDoc/20001984F.pdf).  I would also like the arduino to know when I am charging, so that it can turn off all the LED's (they draw a lot of current) and possibly go to sleep. 

The battery is normally about 3.7V, and USB is 5V. So could I figure out if the arduino is plugged in, by running a line from the battery positive terminal to the analog input.   The Battery positive terminal is already connected to VCC through a Schottky diode. 

I figure:

1) If arduino is NOT plugged into 5V.  The Vcc will be ~3.5V.  The Analog input will be 3.7V, so the reading should be approximately 1023.
2) If arduino IS plugged into 5V.  The VCC will be +5V or so.  The Analog input will still be 3.7V so the reading should be about 750. 

So if this is true, I should be able to take this analog reading and have the Arduino shut down the LED's if it sees a reading below 850 or so.

Does anyone see a flaw in my reasoning?

BTW here is a quick schematic of my proposed circuit:

 
3  Using Arduino / LEDs and Multiplexing / Re: 12v RGB LED Strip with common cathode on: May 29, 2011, 01:12:17 pm
Can someone please post a correct schematic for this project I am currently working on a similar issue.

problem was solved in this thread:
http://arduino.cc/forum/index.php/topic,62080.0.html
4  Using Arduino / General Electronics / Re: transistor (2N2222) dropping 15v to 2v?!?! on: May 29, 2011, 01:03:39 pm
Unlike FETs, NPNs and PNPs fitted in "simple" parallel do not share the load evenly.  As one heats up it takes even more of the load which heats it even further until self destruction is achieved.

oh.  Good to know.  I thought I read on a datasheet for a NPN array that you could put them in parallel to get more current.  Could have been FETS though.

EDIT: here's where I got my information:  so it was a darlington pair thing not a npn transistor thing.
http://focus.ti.com/lit/ds/symlink/uln2803a.pdf

Quote
The ULN2803A is a high-voltage, high-
Darlington transistor array. The device consists
eight npn Darlington pairs that
high-voltage outputs with common-
clamp diodes for switching inductive loads.
collector-current rating of each Darlington
500 mA. The Darlington pairs may be connected
in parallel for higher current capability.
5  Using Arduino / General Electronics / Re: zener diode to power an attiny? on: May 29, 2011, 01:01:16 pm
Mike is not talking about current.  He's talking about what happens when a regulator must make the voltage difference between 12 and 3.3 "go away".  It becomes HEAT.

hi,

according to the datasheet the power dissipated = the voltage drop times current.  And the temperature depends on the power dissipated. This means that is is, indeed proportional to the current, and also proportional to the voltage drop.  From 12V to 5V is a 7V drop.  Times ~30mA gives me 210mW power dissipated in the device.

Also the devices datasheets have general formulas for thermal properties.  The TO-92 packages seem to be around 130-200 degrees Celcius / watt.  divide that by 5 for  210mW... this gives 26 - 40 degrees C (this is measured as degrees above ambient).  Ambient is 25C so 50C - 65C.  As I said, pretty toasty, but within device specs.

6  Using Arduino / General Electronics / Re: transistor (2N2222) dropping 15v to 2v?!?! on: May 29, 2011, 02:49:28 am
I've got a PIR sensor triggering a solenoid via arduino and a 2N2222 transistor.  I'm running 15v into the circuit, but am only getting around 2v at the solenoid.  I'm a n00b and could definately use some help in figuring out what transistor I need.  I was advised to replace the 2N2222 with a relay, but the relay switches too slow.

PLEASE HELP!

also, the 2N2222 gets REALLY hot, so i'm quite sure i'm losing a ton of voltage to it.

 How much current does the solenoid draw?

Based on your observation that it's really hot I think its possible that you are going over the max current of 600mA for the n2222.

Perhaps consider upgrading to the TIP120 as described here: http://www.ladyada.net/wiki/partfinder/transistors#mosfet

the TIP122 will do 5A which is almost 10x the 2222.

Also you could try putting multiple NPN's in parallel.
7  Using Arduino / General Electronics / Re: zener diode to power an attiny? on: May 29, 2011, 12:04:04 am
Going from 12V to 3V3 means that the regulator has to burn a lot of power. Therefore it will get hot. Make sure you don't exceed the power rating of your regulator. You can be within the current ratings but exceed the power ratings very easily on most devices.

See:-
http://www.thebox.myzen.co.uk/Tutorial/Power.html

good advice.  I am expecting a fairly low current (I will be clocking the tiny at 1mHZ)... lets say 30mA max? at 7V drop that is 210mW, the datasheet for one of the Dinky 250mA LDO regulators says around 200degrees per watt.  So about 40 degrees above ambient, which is 60 degrees C.  That's a little toasty but still within the device specs. I'll probably have to double check the current draw.
8  Using Arduino / General Electronics / Re: zener diode to power an attiny? on: May 28, 2011, 10:47:13 pm
How about some resistors to limit the base current ?

Don

good idea.  the ones i am using don't have this.  I included it in my 'real' prototype circuit but forgot to put it in schematic


Quote
Small surface-mount package or small through-hole package?

I am probably preferring through-hole right now.  I found some on mouser between 100mA and 300mA in the TO-92 package which ought to be small enough.
9  Using Arduino / General Electronics / Re: zener diode to power an attiny? on: May 28, 2011, 05:22:04 pm
If you've only got a 55mAh battery the shunt regulator you're building will be pretty wasteful. I'd go with a 3.3V regulator if you really want 3.3V (any reason you don't want 5V?) You can get a standard 3.3V regulator (LM1117 and others) or try to find one with lower operating current to get a bit more battery life.

--
The Flexible MIDI Shield: MIDI IN/OUT, stacking headers, your choice of I/O pins


I was mainly thinking zener due to space savings... although if I can get a 3.3V or 5V regulator in a small package (it only has to power the microcontroller so it wont draw much current) that would certainly do.  

All regulators i've seen so far come in really large packages (which makes sense for medium to high current draw applications).  If there's a smaller one you think would work well for this purpose I'm all ears.
10  Using Arduino / General Electronics / Re: zener diode to power an attiny? on: May 28, 2011, 04:26:41 pm
You've got pins 4 and 8 reversed. Pin 4 is ground and pin 8 is VCC. Also, all your LED's are reversed.

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons


Thanks for that, I was looking at a physical circuit I used as a reference upside down, which is why I had 4 and 8 reversed.

I fixed the schematics... I updated using the fritzing (RGB LED) symbol but I really mean the RGBstrip.  I mainly want to know whether using a zener to drop 12V to 3.3V is worth the effort and current loss, or should I just use a separate ~3V power supply for the uC.
11  Using Arduino / General Electronics / Re: zener diode to power an attiny? on: May 28, 2011, 04:07:45 pm
And here was just the power schematic

my main questions are
1) will it work?
2) with the way I have it laid out, with the zener in parallel with the Microcontroller, the current through R1 will be approximately constant, correct?  And it will depend on the value that I actually pick for R1.  Current = (12V- 3.3V)/R1
3) Any way I can calculate the approximate max current draw through the microcontroller, in order to figure out the ideal R1 value? I'd like to not waste so much power through the zener, as the 12Vbattery only stores 55mA-h.
4) Does the max impedence of the zener diode matter so much as long as it is greater than what I need for the voltage divider to work?
5) Am I just better off powering the uC using a separate battery?

12  Using Arduino / General Electronics / zener diode to power an attiny? on: May 28, 2011, 04:03:38 pm
Hi all,

I'm planning a project to make a "Choker" (i.e. wearable) using the 12V RGB LED strips.  I was planning on using a small 12V battery to power it.

My current plan uses a zener to drop 12V to 3.3V for the microcontroller, so that I can use the same battery for both the uC and the LED's.

Here is my planned overall circuit:

13  Using Arduino / Project Guidance / Re: Theremin sensor sounds to manipulate processing graphics on: May 23, 2011, 12:09:14 pm
Have you ruled out just building a theremin?  I think you will be hard pressed making "Theremin-type sounds" using anything but a theremin. 

Then you can use the electrical signal from the theremin as an analog input to the arduino... perhaps do some basic digital processing/filtering in the arduino...and then send that serially to processing, which manipulates graphics.

Since there are plenty of resources out there on building a theremin, I think this will simplify the development at least, to something a bit more manageable. 

14  Using Arduino / LEDs and Multiplexing / Re: 12v RGB LED Strip with common cathode on: May 22, 2011, 10:42:26 pm
No I think he is looking for something that works and won't blow up his arduino board.

Hi,

I am puzzled, I have thought about it and can't see how this will damage the arduino if the circuit is flipped to account for common anode instead of cathode...

rough schematic attached.
15  Using Arduino / LEDs and Multiplexing / Re: 12v RGB LED Strip with common cathode on: May 18, 2011, 10:33:40 pm
So you are looking for something like this?

http://www.ladyada.net/products/rgbledstrip/
Pages: [1] 2