Show Posts
Pages: 1 ... 11 12 [13] 14 15
181  Using Arduino / Networking, Protocols, and Devices / Re: 433MHz RX/TX question, Manchester encoding on: September 24, 2012, 09:08:11 am
Actually, I don't know if the signal is Manchester encoded. The seller told me that it doesn't use encoding/decoding functions.
Does it has to use any kind of encoding or could I do it myself, that means: sending encoded data and receive and then decode it manually.?

I still want to know WHY there are these up and downs in what I recorded of the receiver (referring to the graph).
182  Using Arduino / Networking, Protocols, and Devices / Re: 433MHz RX/TX question, Manchester encoding on: September 23, 2012, 04:28:43 pm
Unfortunately, Virtualwire didnt work. The output was like this:
"
Sent
Timeout
"
So, it didnt receive an answer

However, I want to know HOW the signal is transmitted at all.

Quote
This is supposed to be connected to the pin that is providing the data to transmit. Why is it connected this way?
Thats what i did later, too. I wanted to test if a signal is transmitted
I expected that the receiver gives 5v at data out if 5v is supplied to transmitter's data in and receiver has 0v at data out if transmitter gets 0v at its data in (but it is NOT !??)

---
I tried the following:
rx/tx modules at one arduino (have only one) and the following code : (written myself)
Code:
// <CODE>; Freitag, 31. August 2012

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 9); // RX, TX // i dont use rx=10 because I want to see how it looks like in a graph

int           pin       = 8;    // RX pin
int           ledpin    = 13;
int           laststate = 0;
unsigned long ausgabe;       // micros() nach 70min UEberlauf -> genug Zeit
unsigned long ausgabe_ = 0;
unsigned long micros_  = 0;
byte          i        = 0;
boolean       oddnow   = false;

void setup()
{
  Serial.begin(9600);
  Serial.println("pulse_in raw^2, <v2.4>;   31.8. - 23.9. 2012\n");

  pinMode(ledpin, OUTPUT);
  digitalWrite(ledpin, LOW);

  pinMode(pin, INPUT);
  //digitalWrite(pin, HIGH);//pullup

  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}


void loop()
{
  unsigned long myc = micros();

  if (Serial.available())
    mySerial.write(Serial.read());

  if ((myc - micros_) / 100 >= 1000 * 1000 * 5)  // 5 Sekunden
  {
    micros_ = myc;
//    mySerial.write(i); //just test;dont execute
    i++;
  }

  int nowstate = digitalRead(pin);

  if (nowstate != laststate)
  {
    oddnow  = !oddnow;
    ausgabe = myc;

    Serial.println(ausgabe);

    if (oddnow) // only every second time
    {
      unsigned long diff = ausgabe - ausgabe_;
      if ((diff < 7000) || (diff > 12000)) // if dutycicle is MUCH different
      {
        //Serial.print("   D = ");
        //Serial.println(diff); // bewirkt anderen Duty-Cycle falls zu hauefig angewendet
        digitalWrite(ledpin, !digitalRead(ledpin));
      }
    }

    ausgabe_  = ausgabe;
    laststate = nowstate;
  }
}

So basically a led changes it state (on->off  /  off->on) if dutycyle(?) changed . AND it worked.
I know, that it is a very bad technique but it shows that it could work.

What happens here?:



Why does the receiver has an output 0V / 5V changing rapidly ?

183  Using Arduino / Networking, Protocols, and Devices / 433MHz RX/TX question, Manchester encoding on: September 20, 2012, 09:20:57 am
Hello,

I have bought this 433MHz ASK transceiver link kit.
Now, with Arduino, I want to send signals with these modules.

At first, to analyse, I've built the following:
Receiver: Vcc to 5V, GND to GND, out-Data to pin10(shouldnt matter which pin to use)
Transmitter: Vcc to 5V, GND to GND, in-Data via a button to 5v and a in-data via a resistor to GND (look picture)

That means:
- I press the button: transmitter gets 5V as input
- I dont press the button: transmitter gets 0V as input

Then I wrote a simple program to check what is received (because it's ASK modulation, it should be 5V or 0V (proved with analog in))
I used "digitalRead" and  looked for changes, that means, in the loop , i have:
Code:
void loop()
{
  int nowstate = digitalRead(pin);

  if (nowstate != laststate)
  {
    Serial.println(micros());
    laststate = nowstate;
  }
}

The results are the x-values for a graph


Why is it always up and down when I send nothing?
How can I receive/send signals  and read them?

Thank you


184  Using Arduino / Sensors / Re: attach an Ultrasonic Distance Sensor near the bottom on: September 01, 2012, 02:26:30 pm
Ok, thank you very much.
And yes, it is a (almost) right angle where the signals should be reflected and so get its echo.

185  Using Arduino / Sensors / Re: attach an Ultrasonic Distance Sensor near the bottom on: August 31, 2012, 01:11:12 pm
Hello,

0.2 - 2 cm refer to the distance between the signal and the ground that is parallel to the signal's path. That's why I said in the title "attach an Ultrasonic Distance Sensor near the bottom". In the second picture, the light blue ray should depict the path of the ultrasonic signal which goes parallel to the bottom of the room. Is this also a problem?
And thanks for recommending the library.
186  Using Arduino / Sensors / attach an Ultrasonic Distance Sensor near the bottom on: August 29, 2012, 12:01:30 pm
Hello,

as the title may suggest, my intention is to create a measuring system that does not need very high accuracy and shall provide a fast result. To achieve that, I want to use a ultrasonic sensor.
Of course, there are easier methods but it should make some fun.

I drew a sketch how I thought it should look like (with Cabri 3D v2.1.2).


The object is attached on the very right side.


So the resulting distance is the full length (ca. 2 meters) minus the length that was measured by the ultrasonic distance sensor.

? Is there a problem that the sensor is very near to the bottom?


I am also planning to create a very similar device (actually the same, 90 degrees turned) that shall measure my body height.

source (stick figure)
I want to attach this sensor near a wall. Is there a problem because the vertical wall then goes parallel to the emitted ultrasonic signal.

Thank you very much!
187  Using Arduino / Project Guidance / Re: power source: wall charger AND battery on: August 28, 2012, 11:54:32 am
That sounds good. There should be a preassembled module for this, something like an "uninterruptible power supply for Arduino" that also has the feature to select the priority (the order) of each power supply (i.e. wallwart first, battery pack second, maybe something else third...).
188  Using Arduino / Project Guidance / Re: power source: wall charger AND battery on: August 28, 2012, 09:51:19 am
Thank you very much! Now, I feel sure that this will won't cause trouble.
I think this is a very easy way if you want to have more than one power source
However, can I be really sure that the battery's voltage is always less then the one from the wallwart? It is very important for me that the battery is only used if the main power supply isn't working anymore. (I want that the batteries aren't even used if everything is normal.)
189  Using Arduino / Project Guidance / Re: power source: wall charger AND battery on: August 28, 2012, 05:36:00 am
I have still a problem:
I am afraid that the current "I" is the sum of the two power supplies. I already know that the voltage "U" will not be the sum because the power sources are switched parallel.
Is this really the case, and if it is the case: Do I have to be afraid that the Arduino cannot work with that?
190  Using Arduino / Project Guidance / Re: power source: wall charger AND battery on: August 27, 2012, 04:51:56 pm
they will be at least 1 volt over 5 VDC those pins are made for
Oh, I forgot this.
 I will think about a solution for this when I have finished the actual idea.
191  Using Arduino / Project Guidance / Re: power source: wall charger AND battery on: August 27, 2012, 04:18:44 pm
Oh, thank you very much!!! I think this is the easiest solution for my issue. Unfortuantely, I cannot test it because of a lack of diodes. It is just one thing that I miss and would be great if this was possible somehow, to see if V1 or V2 is used, maybe with some kind of digitalRead and two wires attached after the diodes? Any idea to do this?
192  Using Arduino / Project Guidance / Re: power source: wall charger AND battery on: August 27, 2012, 04:06:44 pm
Hello,
I added a picture how I imagine this how it will look like if its complete.
Is it right?
193  Using Arduino / Project Guidance / Re: power source: wall charger AND battery on: August 27, 2012, 03:56:33 pm
I found this site http://www.farmhack.net/wiki/back-battery-arduino and it seems very easy.
On the bottom of the schematics, there is written "to Arduino", that means VIN ?
And at the top: This should go to Arduino's GND?

194  Using Arduino / Project Guidance / Re: power source: wall charger AND battery on: August 27, 2012, 02:50:12 pm
This idea might be also worth a try. However, I would be happier with a solution using normal unrecharable batteries that supply my Arduino in case of a blackout. Could I just use both power supplies togehter? Something like a Uninterruptible power supply would be perfect because then my Arduino doesn't even has to restart.
195  Using Arduino / Project Guidance / power source: wall charger AND battery on: August 27, 2012, 02:15:50 pm
Hello,

for my project, it is very important to have a reliable power source! Therefore, I will use the electricity from my house with a wall charger (AC-to-DC adapter (wall-wart)). However, because I need a reliable power supply, I want to use a battery pack (6 batteries à 1.5V = 9V) in the unwanted case of a blackout (power outage).

How can I do the following: Use always wall-wart and only if there is a blackout then use the batteries. ?

Thank you
Pages: 1 ... 11 12 [13] 14 15