Show Posts
Pages: [1] 2 3 ... 25
1  Using Arduino / Project Guidance / Re: How to connect the Magnetic Sensor with arduino for my Tachometer Project on: April 05, 2014, 01:26:19 pm
I am sorry for what I have commented above without reading properly.. smiley-zipper

But i am lucky to have guidance from a gentleman like you who is taking his precious time out to make me understand things instead of ignoring a novice ..  smiley

The link which you have given me at very first i had that for a long time..
Quote
I used the first circuit there 2 years back to make a RPM meter for my motorcycle..

But in that circuit I did only use till the BC547 transistor and connected the output from the transistor to the interrupt pin of arduino and eliminated the 555 timer..



Everything worked fine, only problem used to be is sometimes High Voltage pulses used to reset the arduino and hang it..

So that is the reason I am thinking of using an op-amp to solve it and have a better input on the interrupt pin to have more accuracy..

I am reading all the links given by you and post my problems/questions..
2  Using Arduino / Project Guidance / Re: How to connect the Magnetic Sensor with arduino for my Tachometer Project on: April 05, 2014, 10:38:52 am
What other op amps can be used for a better performance..??
As this project should not fail...

I found that if the interrupt pin wire is too long it receives a lot of EMI and HV pulses from the surroundings..
The circuit above is using an SCR to pickup only HV pulses as it will be picking pulses from the ignition output..

In my case it is all low voltage ac pulses.. so i think the SCR is not needed..
3  Using Arduino / Project Guidance / Re: How to connect the Magnetic Sensor with arduino for my Tachometer Project on: April 05, 2014, 08:08:24 am
What if I only use this part below


Instead of using this
4  Using Arduino / Project Guidance / How to connect the Magnetic Sensor with arduino for my Tachometer Project on: April 05, 2014, 07:29:46 am
There is a big engine for which I would like to make an RPM Meter with Arduinio...

There ia a MAGNETIC PICKUP SENSOR already installed over the flywheel of the engine which has several teeth..

I would like to connect this magnetic sensor to the Arduino's interrupt pin..Please tell me how do I connect it..



I do not know the exact make and model of the Magnetic Pickup Sensor, but it produces 0.8Volts at 300RPM of the engine..

Is there any need of using an OP AMPLIFIER or I can directly connect the sensor to arduino..??
5  Using Arduino / General Electronics / How to drive 12v 20W bulbs with arduino without relay..?? on: November 26, 2013, 01:51:25 pm
I would like to drive 12v 20W filament bulbs with arduino..
I do not want to use relays as the operation timings will be sometimes as fast as 30milliseconds..

What MOSFETs should I use to drive these bulbs..??
or there is any other ways to drive them..??

I would like to stick to the cheaper side with minimum heat generation.. smiley-cool
6  Using Arduino / Programming Questions / Re: Help me with a small button problem.. on: November 19, 2013, 08:04:15 am
I do not want to use either millis or delays..

The reason is I will modify his code to use it on a different microcontroller which is no supported in arduino..
7  Using Arduino / Programming Questions / Help me with a small button problem.. on: November 19, 2013, 07:52:57 am
I wrote a program to increment a variable every-time a button is pressed..

Code:
int count = 1;

void setup(){
  Serial.begin(9600);
  pinMode(4, INPUT);
  pinMode(13, OUTPUT);
}

void loop(){
 
  if(digitalRead(4) == 1){
   
    count ++;
   
  Serial.print(count);
  Serial.println();
  }
}



Now I want the increment to occur every time it is pressed once and not to keep on if it is kept pressed..

Whats the procedure or trick..??
8  Using Arduino / Programming Questions / Re: HELP with blink without delay.. on: October 01, 2013, 10:26:50 pm
Quote
How do I eliminate this..??
By setting the time that the LED last changed state, and setting the interval to the appropriate value.

That is all that should happen as a result of the switch being pressed. The toggling of the LED should be independent of the switch state.


I am not getting you .smiley-sad

Can you plz show me with an example..?
9  Using Arduino / Programming Questions / Re: HELP with blink without delay.. on: October 01, 2013, 02:02:27 pm
Code:
const int ledPin =  13;      // the number of the LED pin

int ledState = LOW;             // ledState used to set the LED
long previousMillis = 0;        // will store last time LED was updated

long interval = 1000;           // interval at which to blink (milliseconds)

void setup()
{
  pinMode(ledPin, OUTPUT);     
}

void loop()
{
  unsigned long currentMillis = millis();
  if(currentMillis - previousMillis > interval)
  {
    // save the last time you blinked the LED
    previousMillis = currentMillis;   

    // if the LED is off turn it on and vice-versa:
    if (ledState == LOW)
    {
       ledState = HIGH;
       interval = 30;
    }
    else
    {
       ledState = LOW;
       interval = 1000;
    }

    digitalWrite(ledPin, ledState);
  }
}

When the pin is to be turned on, assign interval one value. When it is to be turned off, assign it another value. There is nothing in the example or philosophy that says that interval needs to be a constant.



Thanks a lot Pauls.. smiley

Now I have a problem..smiley-sad
The main reason why I wanted blink without delay..

I am showing you the code with the delay .

Code:
void setup(){
  pinMode(13, OUTPUT);
  pinMode(2, INPUT);
  digitalWrite(2, HIGH);
}

void loop(){
 
  if(digitalRead(2) == LOW){
    digitalWrite(13, HIGH);
    delay(20);
    digitalWrite(13, LOW);
    delay(20);
  }
 
  else{
    digitalWrite(13, HIGH);
    delay(30);
    digitalWrite(13, LOW);
    delay(1000);
  }
}


In the code above I want the led to blink rapidly when PIN 2 is LOW.. else blink for 30 sec at 1 sec interval..

The problem comes in here that when the led just glew and went off and I make PIN2 LOW.. The led does not start to blink rapidly instantly..
It waits for the delay of 1 second to complete and then starts the rapid blinking if() loop..smiley-sad

How do I eliminate this..??
10  Using Arduino / Programming Questions / HELP with blink without delay.. on: October 01, 2013, 06:17:51 am
I am familiar with the code blink without delay..
here is the code
Code:
# define led  13
int ledstate = 0;
long previousmillis = 0;

void setup(){
  pinMode(led, OUTPUT);
}

void loop(){
  unsigned long currentmillis = millis();
  
  if(currentmillis - previousmillis >= 1000){
    digitalWrite(led, ledstate);
    ledstate = !ledstate;
    previousmillis = currentmillis;
  }
}
    



with blink without delay only I would like to blink an led for 30milisecond at every 1 second interval.
like in this code below..
Code:
void setup(){
  pinMode(13, OUTPUT);
}

void loop(){
  digitalWrite(13, 1);
  delay(30);
  digitalWrite(13, 0);
  delay(1000);
}


Just cannot make out how to do it ..

11  Using Arduino / General Electronics / Which mosfet to use instead of BC548..?? on: September 21, 2013, 11:17:11 am
I need to drive a 450mA (1watt) led.
I am currently using a BC548 to drive smiley-razz (which is bad)

which mosfet can I use (has to be cheap)..

Also please teach me how to find out a mosfet's output load..?
12  Using Arduino / Programming Questions / help with making the same blink pattern without delay.. on: September 18, 2013, 09:42:44 pm
I would like to blink the LED on pin 13 in this pattern written on the code, BUT without delay...
Please help


Code:
int ledPin = 13;


void setup(){
  pinMode (ledPin, OUTPUT);
}

void loop(){
  digitalWrite(ledPin, HIGH);
  delay(30);
  digitalWrite(ledPin, LOW);
  delay(175);
  digitalWrite(ledPin, HIGH);
  delay(30);
  digitalWrite(ledPin, LOW);
  delay(1000);
}
13  Using Arduino / Programming Questions / Re: HELP me with POV on: September 02, 2013, 10:56:00 pm
Quote
I was trying something like this..But still the same
That is because you are not doing anything remotely like I said to do.

You mean setting up the flag part..?? or port manipulation instead of digitalWrite()..??
14  Using Arduino / Programming Questions / Re: HELP me with POV on: September 02, 2013, 01:12:57 pm
Quote
I am reading that device again to fix the starting position of the message to be displayed, as I cannot find out how to do that with an interrupt..
The way you do that is to set a flag (Boolean variable ) in the ISR and then read that flag in the loop to see if the interrupt has been triggered. When it has clear the flag and proceed. This is much safer than reading it twice.
Make sure the variable is declared as volatile. 


I was trying something like this..But still the same

Code:
boolean x ;
unsigned long lasttime = 0;
unsigned long timetaken;
int addr = 0,c;

void duration(){
  unsigned long now = micros();
  unsigned long interval = now - lasttime;
 
  timetaken = interval;
 
  lasttime = now;
 
        x = false; c=0;
       
}

void setup(){

 pinMode(5, OUTPUT);
 
}

void loop(){
   attachInterrupt(0, duration, FALLING);
  if(c==0){
  digitalWrite(5, 1);
  delayMicroseconds(timetaken/2);
  x=!x;
c++;}
  digitalWrite(5, 0);
 
}
15  Using Arduino / Programming Questions / Re: HELP me with POV on: September 02, 2013, 08:18:49 am
14 questions, 1 answer is the wrong ratio.

I have a AH34 HALL Sensor attached to pin 2 ( with an external 10k pullup resistor connected to +5v).  I am reading that device again to fix the starting position of the message to be displayed, as I cannot find out how to do that with an interrupt..

I have not recorded the microseconds take for each revolution as I cannot stay connected while the circuit is in rotation.. But it is possible to record that data in the EEPROM and retrieve it later.
Pages: [1] 2 3 ... 25