Show Posts
Pages: [1] 2
1  Using Arduino / Networking, Protocols, and Devices / Re: RF 434Mhz receiver doesn't detect remote on: June 28, 2014, 06:40:41 am
No problem, My pleasure.
Thanks for reporting the detailed solution, always good to get extra links and info for future projects.

Thanks,
Guido
2  Using Arduino / Networking, Protocols, and Devices / Re: RF 434Mhz receiver doesn't detect remote on: June 28, 2014, 04:40:28 am
Hello Technic.

The sketch gives us the raw data from the transmitter from which we now have to try to deduce the protocol used.

If you send me the output of the sketch i can have a look if it is something 'normal'.
Ideally two output listings for each button would be needed to see what the transmitter is doing.

I had a quick look at the remote pdf you linked to and it does not seem to use a rolling code so we should be able to find something we can use. I used this technique to decode the data from my RF light controller remotes so hopefully we can get something you can use.

Thanks,
Guido
3  Using Arduino / Networking, Protocols, and Devices / Re: RF 434Mhz receiver doesn't detect remote on: June 27, 2014, 04:25:29 am
Have a look at the little sketch i put in the following thread : http://forum.arduino.cc/index.php?topic=242010.msg1738702#msg1738702. I have the same receiver from iprototype and this should give you an idea if you are receiving anything at all (That it really is transmitting at 433MHz) and what the bit periods are.

Hope this helps,
Guido
4  Using Arduino / Networking, Protocols, and Devices / Re: Decoding 433mhz remote signal on: May 25, 2014, 04:03:09 pm
I normally use a scope and/or a logic analyzer, but for quick things i use the quick and dirty script below.

The script expects the input on pin 2. It will wait for a character on the serial port (from the monitor window for example) and then starts recording. When finished it will print-out the pin-state and the time that pin-state lasted on the serial monitor.

Depending on the 433 MHz receiver board there can be a fair amount of noise on the receiver output.
You can test for that by starting the sketch, start the receiver by sending a character and then let it run without stopping it and without pressing a button on the remote. The sketch will stop after 30 seconds. If there are more then 0 samples, you could have noise.

I had this in my receiver and i cleared it up by putting a 100 nF capacitor between the receiver output and ground, worked ok here.

Hope this helps,
Guido

Code:
//Define settings
const int INPUT_PIN = 2;                                       //Input pin
const unsigned int MAX_SAMPLE = 256;                           //Maximum number of samples to record
const unsigned long MAX_TIME = 30000UL;                        //Maximum record time after start pulse (msec)

//Variables used in the ISR
volatile boolean running = false;
volatile unsigned long last = 0;
volatile unsigned int count = 0;
volatile unsigned long samples[MAX_SAMPLE];

void setup() {
  pinMode(INPUT_PIN,INPUT);
  Serial.begin(9600);
  while (!Serial) {};
  Serial.println("RecordPin sketch started");
}

void loop() {
  unsigned long startTime;
  int startState = 0;
 
  while (Serial.read() != -1) {};                              //Clear the serial input buffer
  Serial.println("Send character to start");
  while (Serial.read() == -1) {};                              //Wait until we receive the first character
  while (Serial.read() != -1) {};                              //Clear the rest of the buffer
  startState = digitalRead(INPUT_PIN);                         //Save the initial port state
  attachInterrupt(0, receiver, CHANGE);                        //Interrupt 0 = Pin 2
  count = 0;
  last = micros();
  running = true;
  Serial.print("Running. Send a character to stop");
  startTime = millis();
  while (running && ((millis() - startTime) < MAX_TIME)) {     //Run until the buffer is full, the time is up, or we receive a character
    if (Serial.read()!= -1) {                                  //Stop if we receive a character
      running = false;
    }
  }
  Serial.println("Stopped");
  detachInterrupt(0);
  Serial.print("I recorded ");
  Serial.print(count);
  Serial.println(" samples");
  for (unsigned int x = 0; x < count; x++) {
    Serial.print("Pin = ");
    if (startState == 0) {
      Serial.print("Low ");
    } else {
      Serial.print("High");
    }
    startState = !startState;
    Serial.print(" for ");
    Serial.print(samples[x]);
    Serial.println(" usec");
  }
  Serial.println("");
}

//Pin change interrupt routine
//Called when the state of the input pin changes
void receiver()
{
  if (running) {                                               //If we are running
    samples[count] = micros() - last;                          //Save the time from the last change to this one
    last = micros();                                           //Reset the time of last change
    count++;                                                   //Go to next buffer entry
    if (count > MAX_SAMPLE) {                                  //If we are past the last entry
      running = false;                                         // we stop
    }
  }
}
5  Using Arduino / Networking, Protocols, and Devices / Re: Decoding 433mhz remote signal on: May 25, 2014, 07:33:32 am
If you say you get nothing at all, i suppose you mean the library used does not any decode output?
Did you also try to look at the raw signal to see if you get pulses when you press the button on the transmitter?
It could just be the libraries you tried do not support the protocol used by the remote.

Normally you would hook-up a scope or so to see if you get pulses from the receiver but you could also use a sketch to display the status of a input pin an the arduino against time.

Hope this helps,
Thanks,
Guido
6  International / Deutsch / Re: Endlosloop bei Keyboard.print programmiert: Hat der Leonardo einen Reset-Knopf? on: April 05, 2014, 09:47:23 am
Also see : http://arduino.cc/de/Guide/ArduinoLeonardo#.U0AZ8aLfRuY 'Uploading Code to the Leonardo'.
7  Using Arduino / Programming Questions / Re: Output function created in my code seems to be working but not getting the outpu on: March 11, 2014, 05:03:35 am
int i = 0;

Should this not also be volatile, as it is updated in the interrupt-routine. Changes are the time in i just stays '0' (optimized away).

Hope this helps,
Thanks,
Guido
8  International / Deutsch / Re: Pin status werden nicht aktuell gehalten on: March 03, 2014, 11:46:44 am
Meine erste schritt ware warscheinlich das client.println(teil) raus zu holen um zu sehen wo die delay ist.
When die status update onle client.println ueber die serielle schnittstelle gut functioniert weist du das die delay in client.println ist.

Mann konnte auch die as.get_data rausnehemn und eine feste string senden, dass wurde dan die delay nog weiter einschranken auf die sub-routine. Und auch die client.connected abfrage kann man rausnehem.

Diese schritten sollte eine guten anweisung geben woh dass delay im sketch passiert.

Viel Spass,
Danke,
Guido
9  International / Nederlands / Re: Inlezen gegevens - "Woord" on: January 28, 2014, 08:07:53 pm
Mischien helpt dit : http://www.john.geek.nz/2012/08/la-crosse-tx23u-anemometer-communication-protocol/
Is wel in het engels.

Have fun,
Guido
10  Using Arduino / General Electronics / Re: Pin on top of power header on: January 24, 2014, 07:34:42 am
As per product description for the Arduino Uno v3 (http://arduino.cc/en/Main/ArduinoBoardUno):

- 1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided from the board. In future, shields will be compatible with both the board that uses the AVR, which operates with 5V and with the Arduino Due that operates with 3.3V. The second one is a not connected pin, that is reserved for future purposes.

So yes, if you have a Uno v3, it is a unused pin

Have fun,
Guido
11  International / Nederlands / Re: servo beweging met een duur van x aantal tijd het kan maar hoe on: January 03, 2014, 05:26:09 am
Hier is een klein sketchje, gemaakt om een servo voor wisselbesturing te testen. Na het indrukken van de toets loopt de servo in 5 seconden van de ene naar de ander stand.

Code:
//Servo wissel motor control
#include <Servo.h>

#define SERVO_MIN 25                                    //Servo waarde voor kleinste hoek
#define SERVO_MAX 155                                   //Servo waarde voor grootste hoek
#define SERVO_TIME 5000                                 //Tijd (in millisec) voor omlopen

#define SERVO 2                                         //Servo uitgang op pin 2
#define TOETS 3                                         //Toets input op pin 3

Servo servo1;

void setup()
{
    pinMode(TOETS,INPUT_PULLUP);                        //Toets input, active low
   
    servo1.attach(SERVO);
    servo1.write(SERVO_MIN);                            //Zet servo in beginstand
}
 
void loop()
{
  unsigned long timer;
  unsigned long staptijd;
  unsigned int huidig = SERVO_MIN;                      //Huidige stand vand de servo
  unsigned int doel = SERVO_MIN;                        //Gewenste stand van de servo
  int richting;                                         //Positieve voor min naar max, negatief voor max naar min
 
  staptijd = SERVO_TIME / (SERVO_MAX - SERVO_MIN);      //Vertraging per stap om de gewenste looptijd te krijgen
 
  while (true) {
 
    while (digitalRead(TOETS) != LOW) {};                 //Zolang er geen toets gedrukt wordt.
   
    if (doel == SERVO_MIN) {                              //Stel de nieuwe gewenste hoek in
      doel = SERVO_MAX;
      richting = 1;
    } else {
      doel = SERVO_MIN;
      richting = -1;
    }
   
    while (huidig != doel) {
      huidig += richting;
      servo1.write(huidig);                               //Servo naar de volgende stap
      timer = millis();
      while ((millis() - timer) < staptijd) {};           //Wacht de berekende tijd voor de volgende stap
    }
 
    while (digitalRead(TOETS) != HIGH) {};                //Zolang de toets nog gedrukt wordt.
  }
}

Hopelijk kun je hier wat mee.

Mvg,
Guido
12  Using Arduino / General Electronics / Re: Eagle autorouter fail on: January 02, 2014, 05:43:12 pm
When you assign the supply nets to a new net-class with specific (wider) minimum trace-width the autoroute takes that into account, if i remember correctly.

The autorouter needs a bit of cleanup indeed, but for quick layouts it does the job reasonably ok i think.

Cheers,
Guido
13  Using Arduino / General Electronics / Re: Eagle autorouter fail on: January 02, 2014, 06:08:14 am
Most likely your DRC rules specify a minimum clearance between pads and tracks which make routing the trace up and between those 2 pads (The one Through-holr on the left and the smd pad on the right) impossible.

You can check by manually routing the trace that way and then execute a DRC check.

Hope this helps,
Thanks,
Guido
14  Using Arduino / Programming Questions / Re: Completly stumped on why this will not work on: December 30, 2013, 05:29:10 am
Assuming you use a normal Arduino like a uno or so, there is a led and a resistor connected to PIN 13 on the pcb.
This makes it harder to use as input. I usually avoid using pin 13 as an input.

First thing i would do is move the button to another pin, define the new pin as input with pullup and have the button switch to ground (As you detect button == LOW).

See if that fixes things. (I did not look in detail at the rest of the code).

Thanks,
Guido
15  Using Arduino / Microcontrollers / Re: Code not functioning correctly (inputs toggling without change in voltage) on: December 26, 2013, 06:20:02 am
Sounds like the input pin is floating when the button is not pressed. I assume (as the code does not turn on the internal pullup on A5) that there is a external pull-down resistor on that pin?

Hope this helps,
Guido
Pages: [1] 2