Show Posts
Pages: 1 ... 8 9 [10] 11 12 ... 20
136  Using Arduino / General Electronics / Re: smooth 0-10v output on: September 15, 2012, 04:49:43 am
on that he is using a LM324 i dont need 4 lost of it, just 2 so will this be fine?
http://uk.rs-online.com/web/p/operational-amplifiers/0463145/
137  Using Arduino / General Electronics / Re: smooth 0-10v output on: September 14, 2012, 04:01:54 pm
thanks  smiley-lol
138  Using Arduino / General Electronics / smooth 0-10v output on: September 14, 2012, 03:36:39 pm
hi there im trying to convert my 0-5v pwm output of the arduino to a smooth 0-10v for a high frequency flourescent i come across this just wanted to make sure that this would work or if people have got better suggestions?

http://aartsite.nl/licht/o_5vhrfi.htm
139  Using Arduino / Project Guidance / Re: stepper motor control on: September 11, 2012, 04:09:05 pm
no just runs one way and when button go's high then go's the other way
but thinking about it, the code is runing over and over so it will keep doing it?
so to shop this i have to do somthing like this?

Code:
int ledPin =  13;    // LED connected to digital pin 13
int button = 2;      // button pin

int count = 0;       // Our blink counter

// The setup() method runs once, when the sketch starts

void setup()   {               
  // initialize the digital pin as an output:
  pinMode(ledPin, OUTPUT);
  pinMode(button, INPUT); 
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()                   
{
  if (digitalRead(button)== HIGH)  // buttin when high
  {
  if (count < 1) {
    digitalWrite(ledPin, HIGH);   // set the LED on
    delay(1000);                  // wait for a second
    digitalWrite(ledPin, LOW);    // set the LED off
    delay(1000);  // wait for a second
   
    count++;  // add one (1) to our count
  }
  }
  else {
    if(count == 1) count =0;       // resetting the count
  }
}
140  Using Arduino / Project Guidance / Re: stepper motor control on: September 11, 2012, 03:01:00 pm
thanks for that but when button if high the stepper funs continuosly in the one direction
141  Using Arduino / Project Guidance / stepper motor control on: September 10, 2012, 03:19:22 pm
hi there i have made this code up,i would like to add another function, when a switch pin goes high the stepper will return to its 0 position and when the pin goes low the stepper will return the where the pot is set to. how do we do this?

Code:

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 100

Stepper stepper(STEPS, 8, 9, 10, 11);

// the previous reading from the analog input
int previous = 0;

void setup()
{
  // set the speed of the motor to 30 RPMs
  stepper.setSpeed(150);
}

void loop()
{
  // get the sensor value
  int potVal = analogRead(0);
  int stpPos = map(potVal, 0, 1023, 0, 100);

  stepper.step(stpPos - previous);

  // remember the previous value of the sensor
  previous = stpPos;
}
142  Using Arduino / Project Guidance / Re: variating an ouput over time on: September 09, 2012, 01:36:43 pm
thanks johnwasser for that can you explain what is going on in it?
143  Using Arduino / Project Guidance / Re: variating an ouput over time on: September 08, 2012, 04:51:48 pm
forget it, as by the time ive started writing it down i have already forgotten what i was going to write lol
144  Using Arduino / Project Guidance / Re: variating an ouput over time on: September 08, 2012, 12:22:20 pm
Quote
Do you know how to read the state of a switch?

yes

Quote
Do you know how to do it repeatedly? Do you know how to record the previous state and detect when the current state is different to the previous state?

no
145  Using Arduino / Project Guidance / Re: variating an ouput over time on: September 08, 2012, 03:18:47 am
yes ok
so how do we do that then?
146  Using Arduino / Project Guidance / Re: variating an ouput over time on: September 07, 2012, 04:59:17 pm
Quote
just a linear change in the duty cycle starting at zero and ending at the maximum defined by your pot?

yes and to go the other way when the switch is in the opposite direction

Quote
Is it possible that either of the pots will be adjusted during this timed processing?

no

Quote
You mentioned a switch - do you need to deal with the switch going low or high after it has triggered this process? Do you want to respond to any further changes to the switch state during the time processing? How about after it has completed?

i was using the switch to trigger the process for example when the switch goes high it will slowly increase the pin over the duration the one pot is set to and to the maximum point the other pot is set to when that point has reached it will stay there until the switch goes low and then it will wind back down to 0 over the period of time the pot is set at
147  Using Arduino / Project Guidance / Re: variating an ouput over time on: September 07, 2012, 11:55:18 am
Quote
What do you want to happen when the end of the 5-to-25-minute time interval is over?


nothing just want it to variate an output over a period of time when a switch go's high
148  Using Arduino / Project Guidance / variating an ouput over time on: September 06, 2012, 03:50:18 pm
hi there
im trying to alter a pwm output over a period of time which can be adjusted by a potentiometer from 5mins to 25mins and also another potentiometer to adjust the maximum position it will go up to any ideas of how to do this or any examples anyones got ?
149  Using Arduino / Displays / Re: ITDB02_Touch problems on: August 27, 2012, 12:23:57 pm
ok what have i dun now lol

Code:

// UTFT_Demo_320x240

#include <UTFT.h>
#include <ITDB02_Touch.h>
// Declare which fonts we will be using
extern uint8_t BigFont[];
extern uint8_t SevenSegNumFont[];

// Uncomment the next line for Arduino Mega
UTFT myGLCD(ITDB32S,38,39,40,41);   // Remember to change the model parameter to suit your display module!
ITDB02_Touch  myTouch(6,5,4,3,2);

int x, y;
char stCurrent[20]="";
int stCurrentLen=0;
char stLast[20]="";

void setup()
{

  // Setup the LCD
  myGLCD.InitLCD();
  myGLCD.clrScr();
  myGLCD.setFont(BigFont);

  myTouch.InitTouch(LANDSCAPE);
  myTouch.setPrecision(PREC_MEDIUM);

  pinMode(13, OUTPUT);
  //                               L,R   up, down
  myGLCD.print("LIGHTING CONTROL", 25, 300);
  myGLCD.print("ON", 54, 385);
  myGLCD.print("OFF", 218, 385);
  myGLCD.setColor(0, 0, 255);



  //                 T,L  B,L  T,R  B,R 
  myGLCD.drawRoundRect(50,100,100,170);        // Draw a rectangle
  myGLCD.drawRoundRect(220,100,270,170);        // Draw a rectangle
  myGLCD.setColor(0, 300, 255);

}

void loop()
{


  if (myTouch.dataAvailable())
  {
    myTouch.read();
    x=myTouch.getX();
    y=myTouch.getY();

    if ((y>=50) && (y<=100)) 
    {
      if ((x>=100) && (x<=170))  // Button: On
      {
        digitalWrite(13, HIGH);   // set the LED on
      }
      if ((x>=270) && (x<=170))  // Button; Off
      {
        digitalWrite(13, LOW);    // set the LED off
      }
    }
  }
}

150  Using Arduino / Project Guidance / Re: arduino glitching on: August 27, 2012, 11:29:29 am
thanks for that
the one thing what stood out for me was surpressing my load anyone know any links that have good information on this
Pages: 1 ... 8 9 [10] 11 12 ... 20