Show Posts
Pages: [1] 2 3 ... 26
1  Using Arduino / General Electronics / Re: Which regulator for 30V DC to 5V DC on: June 12, 2014, 11:22:02 pm
What do you all think about the LM2596S-5.0

Here is the datasheet
http://www.farnell.com/datasheets/1768026.pdf
2  Using Arduino / Programming Questions / Re: Decoding bluetooth serial data on: May 20, 2014, 01:23:45 am
Ohh.. I got it..

i missed out the #define START_CMD_CHAR '*'

so the data has to be sent as   *10,13,3    to make the pin 13 led glow, and   *10,13,2   for led OFF
3  Using Arduino / Programming Questions / Re: Decoding bluetooth serial data on: May 20, 2014, 01:16:35 am
I am using an Ardiuino Mega..
So no need of using the NewSoftware Serial

I can read the bluetooth data on UART 1 and have the PC connected to UART 0

I read each data, but then when I send the same data from the pc serial monitor, it does not work..

Like if I want to switch on led on pin 13

I am sending   10, 13, 3

But it does not glow...smiley-sad
4  Using Arduino / Programming Questions / Decoding bluetooth serial data on: May 19, 2014, 02:52:31 pm
I found an android application which communicates through bluetooth to arduino and coltrols the Output states of the arduino's pins..

I would like to know what raw data are sent via the bluetooth

this is the code below which is used to receive the data and react..
Code:
/*
 PROJECT: ArduDroid
 PROGRAMMER: Hazim Bitar (techbitar at gmail dot com)
 DATE: Oct 31, 2013
 FILE: ardudroid.ino
 LICENSE: Public domain
*/

#define START_CMD_CHAR '*'
#define END_CMD_CHAR '#'
#define DIV_CMD_CHAR '|'
#define CMD_DIGITALWRITE 10
#define CMD_ANALOGWRITE 11
#define CMD_TEXT 12
#define CMD_READ_ARDUDROID 13
#define MAX_COMMAND 20  // max command number code. used for error checking.
#define MIN_COMMAND 10  // minimum command number code. used for error checking.
#define IN_STRING_LENGHT 40
#define MAX_ANALOGWRITE 255
#define PIN_HIGH 3
#define PIN_LOW 2

String inText;

void setup() {
  Serial.begin(9600);
  Serial.println("ArduDroid 0.12 Alpha by TechBitar (2013)");
  Serial.flush();
}

void loop()
{
  Serial.flush();
  int ard_command = 0;
  int pin_num = 0;
  int pin_value = 0;

  char get_char = ' ';  //read serial

  // wait for incoming data
  if (Serial.available() < 1) return; // if serial empty, return to loop().

  // parse incoming command start flag
  get_char = Serial.read();
  if (get_char != START_CMD_CHAR) return; // if no command start flag, return to loop().

  // parse incoming command type
  ard_command = Serial.parseInt(); // read the command
 
  // parse incoming pin# and value 
  pin_num = Serial.parseInt(); // read the pin
  pin_value = Serial.parseInt();  // read the value

  // 1) GET TEXT COMMAND FROM ARDUDROID
  if (ard_command == CMD_TEXT){   
    inText =""; //clears variable for new input   
    while (Serial.available())  {
      char c = Serial.read();  //gets one byte from serial buffer
      delay(5);
      if (c == END_CMD_CHAR) { // if we the complete string has been read
        // add your code here
        break;
      }             
      else {
        if (c !=  DIV_CMD_CHAR) {
          inText += c;
          delay(5);
        }
      }
    }
  }

  // 2) GET digitalWrite DATA FROM ARDUDROID
  if (ard_command == CMD_DIGITALWRITE){ 
    if (pin_value == PIN_LOW) pin_value = LOW;
    else if (pin_value == PIN_HIGH) pin_value = HIGH;
    else return; // error in pin value. return.
    set_digitalwrite( pin_num,  pin_value);  // Uncomment this function if you wish to use
    return;  // return from start of loop()
  }

  // 3) GET analogWrite DATA FROM ARDUDROID
  if (ard_command == CMD_ANALOGWRITE) { 
    analogWrite(  pin_num, pin_value );
    // add your code here
    return;  // Done. return to loop();
  }

  // 4) SEND DATA TO ARDUDROID
  if (ard_command == CMD_READ_ARDUDROID) {
    // char send_to_android[] = "Place your text here." ;
    // Serial.println(send_to_android);   // Example: Sending text
    Serial.print(" Analog 0 = ");
    Serial.println(analogRead(A0));  // Example: Read and send Analog pin value to Arduino
    return;  // Done. return to loop();
  }
}

// 2a) select the requested pin# for DigitalWrite action
void set_digitalwrite(int pin_num, int pin_value)
{
  switch (pin_num) {
  case 13:
    pinMode(13, OUTPUT);
    digitalWrite(13, pin_value); 
    // add your code here     
    break;
  case 12:
    pinMode(12, OUTPUT);
    digitalWrite(12, pin_value);   
    // add your code here       
    break;
  case 11:
    pinMode(11, OUTPUT);
    digitalWrite(11, pin_value);         
    // add your code here
    break;
  case 10:
    pinMode(10, OUTPUT);
    digitalWrite(10, pin_value);         
    // add your code here
    break;
  case 9:
    pinMode(9, OUTPUT);
    digitalWrite(9, pin_value);         
    // add your code here
    break;
  case 8:
    pinMode(8, OUTPUT);
    digitalWrite(8, pin_value);         
    // add your code here
    break;
  case 7:
    pinMode(7, OUTPUT);
    digitalWrite(7, pin_value);         
    // add your code here
    break;
  case 6:
    pinMode(6, OUTPUT);
    digitalWrite(6, pin_value);         
    // add your code here
    break;
  case 5:
    pinMode(5, OUTPUT);
    digitalWrite(5, pin_value);
    // add your code here       
    break;
  case 4:
    pinMode(4, OUTPUT);
    digitalWrite(4, pin_value);         
    // add your code here
    break;
  case 3:
    pinMode(3, OUTPUT);
    digitalWrite(3, pin_value);         
    // add your code here
    break;
  case 2:
    pinMode(2, OUTPUT);
    digitalWrite(2, pin_value);
    // add your code here       
    break;     
    // default:
    // if nothing else matches, do the default
    // default is optional
  }
}
5  Using Arduino / Programming Questions / Decoding Air condition remote on: May 13, 2014, 09:57:24 am
For the past 3 days I have been trying to decode my Air Condition's remote..
1stly the remote is not at all recognized by neither IRRemote nor the IRLib Libraries..

I started  googling on how to decode and Air Condition's remote..
I came up with that most of the Aircon remotes sends a long commands..

From the below thread I came to know that the commands are sent twice.
http://forum.arduino.cc/index.php?topic=226419.15
On this thread's 16th post AnalysIR guesses "This may be to increase the chance of a good signal or it could be basic error checking"

AnalysIR has been doing a great job and has contributed his effort to understand and decode the signal of the ON/OFF button with his precious application..


MY VIEWS from what I found out today suddenly

1. All the Aircon remotes sends two different values for ON and OFF
2. The Temp UP and Temp Down buttons also sends different values for different temperatures..
3.The Air Swing and Fan speed also sends different values for each state..

So we come to know that most of the buttons sends multiple values.
4. NOW THE MOST IMPORTANT PART...
I found that these multiple value buttons not only sends the value of its own, but also checks the states of other buttons like (PWR, TEMP, SWING POSITION, FAN SPEED).

REASON for this--  In case sometime the remote's IR was blocked and some button states were changed accidentally or changed in the absence of electricity.
 The next time you want to change any button's state purposely, the update to the Aircon will match with the remote and will not act like a false state.

     Example  -   The Aircon is running and while the remote was out of IR range or was blocked, the PWR state of the remote is changed to OFF state. Now the remote status is shown false, as the remote shows the Aircon is OFF but in reality the Aircon is ON..
   Now when you try to change the temperature purposely (in this false state position) the remote will check the states of other buttons and update the new values to the Aircon. The Aircon will turn OFF, because on the remote the present status was OFF (which was previously changed accidentally)

So my guessing is that the reason of sending codes twice may be that its updating the state of the changed button as well as the states of the other buttons...

I am trying to check the RAW values in different ways with AnalysIR's written code to decode long RAW values in the below link
http://www.analysir.com/blog/2014/03/19/air-conditioners-problems-recording-long-infrared-remote-control-signals-arduino/

Its really hard to check and compare each values manually ...smiley-sad
But I am still trying.. Let see how far can I go...
6  Using Arduino / General Electronics / Re: Which regulator for 30V DC to 5V DC on: May 09, 2014, 03:32:06 am
What if I use a 7812 (12v regulator) on the 30 volt and then again a 7805 (5v regulator ) on the 12 v output after that..??

Will that be too stupid activity..smiley-razz
I just need to run a atmega328 and 4nos. of 7segment displays


I hope none of them will get too hot if I am drawing only 400 - 500mA as load
7  Using Arduino / General Electronics / Which regulator for 30V DC to 5V DC on: May 01, 2014, 08:12:12 am
I need run arduino at 30V DC supply..
Which regulator should I use to drop the 30V DC to 5V DC..??

The maximum current drawn by the circuit will be around 500mA - 800mA
I dont want the regulator to get much hot, as I dont have much place for a heatsink..
8  Using Arduino / Project Guidance / Re: How to connect the Magnetic Sensor with arduino for my Tachometer Project on: April 29, 2014, 01:35:24 am
Yes thats the exact thing I was looking for..

So I hope I can do this

9  Using Arduino / Project Guidance / Re: How to connect the Magnetic Sensor with arduino for my Tachometer Project on: April 29, 2014, 12:48:45 am
If I am using this circuit here as an amplifier..


My concern is that the sensor produces a voltage as low as 0.06 volts and the IN4148  in the circuit will have a voltage drop of 0.6 volts..
Will this cause a problem..??
10  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..
11  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..
12  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
13  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..??
14  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
15  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..
Pages: [1] 2 3 ... 26