Show Posts
Pages: 1 ... 7 8 [9] 10 11 ... 15
121  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 24, 2012, 12:07:25 pm
And if I have an always current flowing though the voltage divider and the analog input, what do you think, how much current is drawn?
Additionally, I am interested in the way of how to calculate the current drawn and the estimated life using what the battery says about its mAh ...
So, assuming R3=10K, R4=1K. Higher resistor values decrease the current drawn, AFAIK.
Battery full = 9V, i.e. 9V*1K/(10K+1K)=9V/11 =0.8V (analogRead = 164)
But how to calculate the current drawn ??


122  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 24, 2012, 07:03:09 am
Ok now I understand.

so you might have to use larger values for R3 and R4
This goes for R1 and R2, too?

And I changed the resistance values of R3, R4.
However, I think if D5 is not GND, then 9V goes straight to A1 which is not good because it is limited to 5V. Dangerous?
If D5 is GND then I understand how it works, is digitalWrite(5,LOW) really the same as attaching something to GND?
I attached the schematics like I understood it.
123  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 23, 2012, 05:43:55 am
You could make the ground leg of the voltage divider be an Arduino output pin.  Make it low to assert ground, take your A2D measurement, then make it an input and write a 0 to it, to turn off the pull-up.  It should not sink much current in this state.
The measurement is from the voltage divider (battery's 9V pole) to A1, and the switch is controlled by a relais, so that there isn't always current flowing.
What is the "ground leg of the voltage divider"? Do you just mean ground?


And what do you think about this idea (schematics)?
124  International / Deutsch / Re: Arduino Mega on: October 22, 2012, 11:38:56 am
Aha, habe dazu z.B. hier was gefunden.

Aber könnte ich einen Ausgang auch als integer-Variable definieren, und dann mit digitalWrite arbeiten?
Wie ich jetzt gesehen habe, brauch der 74HC164 drei Eingänge und hat acht Ausgänge, also sozusagen 5 Pins zusätzlich.
Könnte man dann die acht Ausgänge z.B. 31,32,33,34,35,36,37,38 nennen und dann z.B. mit pinMode(33, OUTPUT) ihn als Ausgang definieren?
Und kann der Schieberegister genauso als digitaler Aus- wie Eingang benutzt werden?
Und gibt es auch die Möglichkeit, analoge Signale zu senden (PWM) oder zu lesen?
125  International / Deutsch / Re: Arduino Mega on: October 22, 2012, 11:13:20 am
Danke für die Antworten!
Ich werde zunächst bei meinem Uno bleiben (habe ja schon zwei), allein weil ein Arduino recht teuer ist.
Von Shiftregistern habe ich schon gehört, mich damit aber noch nicht befasst. Dann habe ich wohl was zu tun smiley-wink
Sehe ich das richtig, dass man sie dann genauso benutzen kann wie einen digitalen oder sogar analogen Ein-/Ausgangs-Pin?
Problematisch wird das bei z.B. dem LCD, der ja in der Library als Klasse definiert ist, dessen constructor ja "integer"pins erwartet. Kann man die von den Shiftregistern auch irgendwie als integer zuweisen und dann als Paramter diesem constructor übergeben?
126  International / Deutsch / Arduino Mega on: October 22, 2012, 10:04:17 am
Hallo,

da ich langfristig mehr Pins brauche, denke ich den Mega zu holen.
Ist denn der Arduino Mega einfach nur wie der Uno nur mit mehr Pins, hat also keine Nachteile und alles kompatibel und die Pins sind übereinander? Das heißt, z.B. der Pin 5 vom Uno ist an der selben Stelle wie der Pin 5 beim Mega? Dann wären ja alle Shields schonmal kompatibel.

Und ich meine jeweils die neusten Modelle
Arduino Mega 2560 R3
Arduino Uno R3

Vielen Dank
127  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 22, 2012, 07:17:41 am
something like this, I meant

Code:
digitalWrite(5, HIGH); // close the circuit, now A1 gets battery voltage
delay(500);  // give relais some time
int measure_voltage = analogRead(A1);  // now read the voltage

And...
voltage divider  factor  =  220/1220 = 0.18
Battery full: 9V; 9V *0.18 = 1.62V; 1.62V *1023/5V = 331 (=measure_voltage)
Now map(0,331,0,1000) (ca. multiply with 3, but there is an arduino function called map) and get 0.1% steps (promille) of battery voltage
Code:
int battery_voltage = map(measure_voltage,0,331,0,1000)

What do you think, good idea?
128  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 22, 2012, 05:47:57 am
Ah now I understand the problem: The batteries need to be controlled so that they work when they are needed - so that you can rely on them.
 However, I don't understand how you want to use the relais exactly.
Maybe a voltage divider can be attached to the battery and then the analog reading - exactly like I have drawn it near the wall-wart power supply. Additionally, a relais can be used to switch reading battery voltage and then to open it again. This can happen via a digital output once in a minute,e.g.
129  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 21, 2012, 05:05:52 pm
sooner or later the battery
voltage will not be able to reliable act as a
standby source
sorry ,but I don't get what you mean
130  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 21, 2012, 11:54:59 am
Jack Christensen explained me that batteries have long shelf life when not used, so this should go for years.

An other idea would be to always measure the batteries voltage via analogue input (and voltage divider) and if this is under a threshold, have some alarm or so. However, I think, measuring the voltage will also have some, but small, current drawn and thus decrease their life...
131  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 21, 2012, 11:34:01 am
Great! Now I know, how a UPS works!

And now, to create it, I have the following idea:

Everything in a junction box, and using these 2.1mm Power female jack Connector Adapter. To have everything in a box.

132  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 21, 2012, 11:17:38 am
The UPS
133  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 21, 2012, 09:43:16 am
Ok, thank you retrolefty, and especially Jack Christensen!
@Jack Christensen: I didn't know that 5V pin can be used as input, so when I buy the boost converter and a use my universal wall wart, I can do this ,aswell.
After having looked more detailed on your schematics, I noticed that you put the boost converter after the 5V wall wart. Why do you do that? The wall wart gives you exactly 5VDC, doesn't it? Or just as a  matter of safety?

I will post my schematics, too, then.
134  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 21, 2012, 08:04:21 am
Could I also use a voltage divider if I  use a 12V wall wart instead of the boost converter . And then this circuit


That is 12V*220Ω/(1000Ω+220Ω)=2.16V, which is 2.16V/5V*1023=442 analogRead(A0) value, if the wallwart supplies 12V.
If it does not supply any voltage, 220Ω works as pull down resistor and current flows only GND-220R-A0, so analogRead(A0) returns zero (like connected to GND directly), right?

An additional question:
Is it right that Arduino does not even reboot if the mains fail because if they fail, immediately the power from the battery is taken? So, the temporary data won't be lost
135  Using Arduino / Project Guidance / Re: rechargable batteries for uninterruptible power supply on: October 21, 2012, 03:38:13 am
To know whether the mains fail. Then, for example, a signal can be sent... Actually, to be honest, I don't know yet what I want to use the measurement for. But I want to use it, maybe just because of an experimental use.

And, I have yet to understand how you can bypass the built-in linear regulator. So VIN  cannot be supplied with something else than 5V and via the power jack can be supplied with 7V~12V. (?)
Pages: 1 ... 7 8 [9] 10 11 ... 15