Show Posts
Pages: [1] 2 3
1  Using Arduino / LEDs and Multiplexing / Re: Do I need a resistor on a 40 mA pin when all I need is 40 mA? on: August 26, 2014, 02:19:38 pm
BTW, i assume PaulRB was pointing at the notices like "The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed .." in the data sheet.
2  Using Arduino / LEDs and Multiplexing / Re: Do I need a resistor on a 40 mA pin when all I need is 40 mA? on: August 26, 2014, 02:15:23 pm
"Precisely.  but do you comprehend what "Absolute Maximum Ratings" actually means?:

Hello Paul__B

Yes, I know exactly what that means.
I was replying to PaulRB who stated (unless i misread) "There is a limit of 100mA on each "port" and a total limit of 200mA for the whole Arduino" which i wanted to counter with the info from the datasheet as we do not want to mislead anyone.

BTW, there is very little to not understand, as the datasheet also explicitly states " Stresses beyond those listed under “Absolute
Maximum Ratings” may cause permanent damage to the device".

Thanks,
Guido
3  Using Arduino / LEDs and Multiplexing / Re: Do I need a resistor on a 40 mA pin when all I need is 40 mA? on: August 24, 2014, 01:24:35 pm
Interresting, but when reading the dataseet for the ATMega 328p i can clearly read in the Electrical Characteristics in the Absolute Maximum Ratings :

DC Current per I/O Pin ................................................ 40.0mA
DC Current VCC and GND Pins................................. 200.0mA

So, not sure what Arduino type you are using, maybe one of the newer ones, but for a standard Arduino (uno or so) there is a stated maximum of 40mA per I/O pin and no more then 200mA for all I/O pins and the logic together.

Have fun,
Guido
4  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
5  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
6  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
7  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
    }
  }
}
8  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
9  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'.
10  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
11  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
12  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
13  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
14  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
15  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
Pages: [1] 2 3