Show Posts
Pages: 1 2 3 [4] 5 6 ... 20
46  Using Arduino / General Electronics / Re: BATTERY charger circuit on: October 24, 2013, 03:54:26 pm
I under stand about the transformer I was going to is a 24v but I'm getting out 35v so I'm going to be tring a 18v to see what I get out.
But if I connect my load over to batters when I am pulling 3-6a I don't think the lm317 will take it lol
47  Using Arduino / General Electronics / Re: BATTERY charger circuit on: October 24, 2013, 02:15:59 pm



so the black bit's I have put on is where I would pick up from for my out going?
48  Using Arduino / General Electronics / Re: BATTERY charger circuit on: October 24, 2013, 02:00:25 pm
ok so when I am pulling 3-6A from the battery's, R2 will be fine with that?
49  Using Arduino / General Electronics / Re: BATTERY charger circuit on: October 24, 2013, 01:32:00 pm
yes but when we are in mains failure we will be discharging from the battery's , there is a Diode on the + line to stop feed back that is fine, but my neutral will have to go back through R2. do you see what I am saying?
50  Using Arduino / General Electronics / Re: BATTERY charger circuit on: October 24, 2013, 11:50:08 am
thanks for your replies
I had come across this and think it will suit what I'm doing
http://www.circuitstoday.com/wp-content/uploads/2010/02/24V-lead-acid-battery-charger-circuit.png
the only issue I can see with this is R2 ( the currant limiting resister) when mains failure occurs the neutral path will be back through R2, so I was thinking of putting it just after the lm317 would this be ok to do this?

thanks Joe
51  Using Arduino / General Electronics / BATTERY charger circuit on: October 23, 2013, 02:08:56 pm
hi there I have to of this battery's
http://uk.farnell.com/yuasa/np7-12/battery-lead-acid-12v-7ah/dp/151308
they are linked in series to give 24v out this are used for back up use only , what I wont to do is make a charging circuit, does any one have any suggestions on a good and simple way to do this?

thanks Joe
52  Using Arduino / Programming Questions / Re: servo (knob) on: April 17, 2013, 02:46:22 pm
I find if you don't on this form people get upset
53  Using Arduino / Programming Questions / Re: servo (knob) on: April 17, 2013, 12:37:05 pm
ok how the hell do I do that lol
54  Using Arduino / Programming Questions / Re: servo (knob) on: April 17, 2013, 11:59:40 am
ok I have only altered code in the void setup so the first bit clears the eeprom and then the bit at the end which I presume is right but im guessing not lol writes to the eeprom
when I have got this first bit right I will then alter the bit in the void loop to read the min and max value from the eeprom

what do you think?
Quote
#include <Servo.h>
Servo myservo;               // create servo object to control a servo

#include <EEPROM.h>          // EEPROM
int addr = 0;

int potpin      = 0;       // analog pin used to connect the potentiometer
int ch1         = 5;       // PWM input
int val2;                  // variable to read the value from the analog pin
int buttonPin   = 11;      // caliberate button
int sensorValue = 0;       // the sensor value
int sensorMin   = 740;     // minimum sensor value
int sensorMax   = 0;       // maximum sensor value

void setup()
{
  myservo.attach(9);      // attaches the servo on pin 9 to the servo object
  pinMode(ch1,        INPUT);
  pinMode(buttonPin,  INPUT);

  if (digitalRead(buttonPin)==     HIGH)
  {                                                        // ** ...cailable... ** //
    digitalWrite(12, HIGH);
   
      // write a 0 to all 512 bytes of the EEPROM
   for (int i = 0; i < 512; i++)                          // clear the EEPROM
   EEPROM.write(i, 0);
     
    // calibrate during the first five seconds
    while (millis() < 5000) {
      sensorValue = analogRead(potpin);

      // record the maximum sensor value
      if (sensorValue > sensorMax) {
        sensorMax = sensorValue;
      }
      // record the minimum sensor value
      if (sensorValue < sensorMin) {
        sensorMin = sensorValue;
      }
    }
   digitalWrite(12, LOW);
   EEPROM.write(addr, sensorMax);                          // wite max to the EEPROM
   EEPROM.write(addr, sensorMin);                          // wite min th the EEPROM
  }
}

void loop()
{
  sensorValue = analogRead(potpin);                                      // reads the value of the potentiometer (value between 0 and 1023)
  ch1 = pulseIn(5, HIGH, 25000);                                         // Read the pulse width of

  // apply the calibration to the sensor reading
  sensorValue = map(sensorValue, sensorMin, sensorMax, 0, 740);

  // in case the sensor value is outside the range seen during calibration
  sensorValue = constrain(sensorValue, 0, 740);

  val2 = map(ch1, 0, 1000, 0, 20);                                      // scale from 0 to 20 for the zero for the servo
  sensorValue = map(sensorValue, 0, 740, val2, 150);                    // scale it to use it with the servo (value between 0 and 180)
  myservo.write(sensorValue);                                           // sets the servo position according to the scaled value
  delay(5);                                                             // waits for the servo to get there
}
55  Using Arduino / Programming Questions / Re: servo (knob) on: April 16, 2013, 12:02:04 pm
always use values from the eeprom unless the button has been pressed to calibarate which will clear the eeprom then write new values.
that's what I was thinking anyway. please say If I have missed anything.
56  Using Arduino / Programming Questions / Re: servo (knob) on: April 16, 2013, 11:43:50 am
Quote
so can I save the values to the arduino, I presume we have to use the eeprom?
What are "the values" that you want to save to EEPROM?

the max and min values that the calibrate function come up with
57  Using Arduino / General Electronics / Re: 12v PWM to 5v PWM on: April 16, 2013, 10:45:57 am
cool ok thanks for that
58  Using Arduino / Programming Questions / Re: servo (knob) on: April 15, 2013, 03:41:24 pm
I have looked at the arduino examples but was struggling how to intergrade it in my code/ application
59  Using Arduino / Programming Questions / Re: servo (knob) on: April 15, 2013, 03:19:27 pm
how do we go about writing this
60  Using Arduino / General Electronics / Re: 12v PWM to 5v PWM on: April 15, 2013, 03:17:10 pm
yes that is fine but as I have said is it worth putting some sort of protection after that e.g. the zener diode or something else as the supply is up and down and quite possibly having a few spikes in it which could harm the arduino
Pages: 1 2 3 [4] 5 6 ... 20