Show Posts
Pages: [1] 2 3 ... 8
1  Using Arduino / Motors, Mechanics, and Power / Re: Unexplainable?!? on: July 27, 2013, 06:59:30 pm
I can only assume that it was bad connections on the holes of the board?!? i really can't explain but i would really like to say, for the record, THANK YOU VERY MUCH for all the time i made you guys waste on my problem, im sorry for that
2  Using Arduino / Motors, Mechanics, and Power / Re: Unexplainable?!? on: July 27, 2013, 06:49:24 pm
Seriously guys, im not messing with you, but out of nothing it started working like a charm... i'm even affraid of touching it
3  Using Arduino / Motors, Mechanics, and Power / Re: Unexplainable?!? on: July 27, 2013, 06:41:53 pm
Are you sure that there is not some other factor in play here? Check the voltage coming from the power supply. Is it consistent? 

that question made to a beginner like me, i can only answer that, no, im not sure...
unfortunatly, i've lend my multimeter to a friend and he broke it :/ but i've used 2 different power supplies (both old cellphone chargers) , and both work exacly the same...

i even tried a 47ohm resistor (the lowest i have here), just in case, but still not working...

if connected directly it only works when it feels like, it can take 10 tries or 50, but if connected to the breadboard it works 100 out of 100 so, taking common sense under consideration, i would say that the breadboard must have some magical components or something like that...

please tell me if i can do anything else for you, more experienced people, so it can be easier for you to identify the problem
4  Using Arduino / Motors, Mechanics, and Power / Re: Unexplainable?!? on: July 27, 2013, 06:00:46 pm
i went searching online how to do it, and i tried using the 1uf cap without success, i used one of these http://us.100y.com.tw/PNoInfo/55670.htm
5  Using Arduino / Motors, Mechanics, and Power / Re: Unexplainable?!? on: July 27, 2013, 05:30:34 pm
I don't see any power supply decoupling onthat board. Try soldering a 0.1uF ceramic cap under the board across the power rails. The bread board is possibly adding a bit of capacitance to the circuit.

update, sometimes, it does work when connecting directly, like 1 out of 30, that sounds a good thing to try, though i would like to ask you to be more specific, cause im very new to all this stuff, and i just want to be sure what am i supposed to do instead of doing what i believe i understood...

is this what you mean?

UPDATE: not sure if important to tell, but the power supply im using is from and old cellphine charger
6  Using Arduino / Motors, Mechanics, and Power / Re: Unexplainable?!? on: July 27, 2013, 05:16:09 pm


I can tell you that there is a 75% chance that there is anther problem preventing it from working! The other 25% would be that the wires do not have enough contact when you twisted them together. Try soldering them and see what happens!

using the connection from the non working version, if i use a led the leds turns on, so the power goest trough, i dont want to solder the power part in my board, because later i would have to unsolder when i put it on the definite place...

the twisted wires, are like 1 inche size twisted on the "breadboard" cables, so i dont believe that thats the problem... :S

what does a breadboard have that makes things work?
7  Using Arduino / Motors, Mechanics, and Power / Re: Unexplainable?!? on: July 27, 2013, 04:51:53 pm
here are two pictures...

i have a webpage with a button.... to turn the relay "on" and "off", on one pictures everything works, on the other, nothing works...

hope to be clear enough :/

and btw, thanks for trying to help me
8  Using Arduino / Motors, Mechanics, and Power / Re: Unexplainable?!? on: July 27, 2013, 04:28:27 pm
im not sure if those files were updated, heres the version im using...

the strange thing is that if i connect the power supply first to the breadboard, everything works... in my head that doesnt make sense
9  Using Arduino / Motors, Mechanics, and Power / Re: Unexplainable?!? on: July 27, 2013, 04:26:01 pm
We need more information.
Where are you connecting this 5V power supply "directly" to your board. Is it through the power jack? If so you need about 7.5V to drive the regulator.

the board doesn't have a power jack, has 2 holes that i made, one 5V and the other GND...
you can see the board im talking about, on the schematic...
10  Using Arduino / Motors, Mechanics, and Power / SOLVED Unexplainable?!? (bad connections, my bad) on: July 27, 2013, 04:17:14 pm
Please, i need your help to understand a little phenomenon...

I have created a board with a relay and i have a 5v power supply, the situation is:

If i connect the power supply directly to my board, it wont work, the relay won't trigger, but if i connect the power supply to the breadboard and from the breadboard to my board everything works just fine...
So why does that happens?!? is it some kind of miracle or what?

Thanks in advance

UPDATE: i only need to connect one of the wires to the breadboard, the other one can be connected directly
11  Using Arduino / Microcontrollers / Re: Arduino Mega with NRF24L01+ and NRF24L01+ with Atmega328p on: June 25, 2013, 07:09:13 am
the problem was on the mega side... i was connecting it wrong...
if i recall correctly, (i made a pause o the project, lack of time) i use the pins 49, 50, 51 and 52, the power/gnd and the assigned pins for comms
12  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01+ and roles on: May 31, 2013, 04:58:25 am
oh gotcha smiley

ty
13  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01+ and roles on: May 30, 2013, 07:32:16 am
to drive/listen to 30 nodes?... It's done one at a time and the data is repeated/resent if not acked when you detect a free channel condition. I would recommend that each node be polled and you could change frequency for several or many different frequencies/purposes...   Some loose thoughts.

Doc

Wouldn't be easier to use the network header? cause the 30 nodes will always be listening, until the base request something from 1 of them, always 1 at a time and not multiple nodes at the same time...
14  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01+ and roles on: May 29, 2013, 11:58:11 am
yes, i did and i could make it work, but for 30 nodes it will become complicated i think.
i could make the network work too, just by copy/paste and changing the pins, but when i changed the code for my needs it stopped working...
not sure if its the payload... ill need to work more on the code, i just posted it cause perhaps the experienced people could see some real basic that i couldn't so far...

PS: i only have 1 arduino and one atmega328p on a breadboard...
15  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01+ and roles on: May 29, 2013, 06:47:20 am
After a couple of days testing, i decided to try the RF24Network because i will have more than 30 nodes and only 1 "central" and because i think it might be easier for the central node to send a message and wait for a reply from the destination more than just open and close pipes all the time...

The project consists in the main sending a "question" like temp or or an "order" like activate relay, and then receive the answer of the temp or the order succeeded or not. Am i thinking right by choosing the RF24Network instead on the RF24?
My code isnt working, not sure why, but since i'm at my work place i cannot check it, i do have the code though. just in case someone have the time and will of reading it ill drop it here...

Transmitter:
Code:
/*
 Copyright (C) 2012 James Coliz, Jr. <maniacbug@ymail.com>

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 version 2 as published by the Free Software Foundation.
 */

/**
 * Simplest possible example of using RF24Network
 *
 * TRANSMITTER NODE
 * Every 2 seconds, send a payload to the receiver node.
 */

#include <RF24Network.h>
#include <RF24.h>
#include <SPI.h>

// nRF24L01(+) radio attached using Getting Started board
RF24 radio(8,7);

// Network uses that radio
RF24Network network(radio);

// Address of our node
const uint16_t this_node = 1;

// Address of the other node
const uint16_t other_node = 0;

// Variables declaration
  int relay;
  unsigned long temperatura;
  int order;
  int certo;

// Structure of our payload
struct payload_t
{
  int relay;
  unsigned long temperatura;
  int order;
  int certo;
};

bool enviado = false;

void setup(void)
{
  Serial.begin(57600);
  Serial.println("RF24Network/examples/helloworld_tx/");
 
  SPI.begin();
  radio.begin();
  network.begin(/*channel*/ 90, /*node address*/ this_node);
 
}

void loop(void)
{
 
  int incomingByte = 0;
  // send data depending on value in serial monitor:
        if (Serial.available() > 0) {
                // read the incoming byte:
                incomingByte = Serial.read();

                // say what you got:
                Serial.print("I received: ");
                Serial.println(incomingByte, DEC);
        }
    if (incomingByte == 49);
    {
  enviar();
    }
 
  if (enviado == true)
  {
  receber();
  }
 
}

void enviar(void)
{
 // Pump the network regularly
  network.update();

  // send a message!

    Serial.print("Sending...");
    payload_t payload = { relay, temperatura, order, certo };
    RF24NetworkHeader header(/*to node*/ other_node);
    bool ok = network.write(header,&payload,sizeof(payload));
    if (ok)
    {
      Serial.println("ok.");
      enviado = true;
    }
    else
      Serial.println("failed.");

void receber(void)
{
  // Pump the network regularly
  network.update();

  // Is there anything ready for us?
  while ( network.available() )
  {
    // If so, grab it and print it out
    RF24NetworkHeader header;
    payload_t payload;
    network.read(header,&payload,sizeof(payload));
    Serial.print("Relay State: ");
    Serial.println(payload.relay);
    Serial.print("Temperatura: ");
    Serial.println(payload.temperatura);
    enviado = false;
  }
  if (enviado == true)
  receber();
}

Receiver:
Code:
/*
 Copyright (C) 2012 James Coliz, Jr. <maniacbug@ymail.com>

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 version 2 as published by the Free Software Foundation.
 */

/**
 * Simplest possible example of using RF24Network,
 *
 * RECEIVER NODE
 * Listens for messages from the transmitter and prints them out.
 */

#include <RF24Network.h>
#include <RF24.h>
#include <SPI.h>

// nRF24L01(+) radio attached using Getting Started board
RF24 radio(8,7);

// Network uses that radio
RF24Network network(radio);

// Address of our node
const uint16_t this_node = 0;

// Address of the other node
const uint16_t other_node = 1;

// Variables declaration
  int relay;
  unsigned long temperatura;
  int order;
  int certo;

// Structure of our payload
struct payload_t
{
  int relay;
  unsigned long temperatura;
  int order;
  int certo;
};

bool recebido = false;

void setup(void)
{
  Serial.begin(57600);
  Serial.println("RF24Network/examples/helloworld_rx/");
 
  SPI.begin();
  radio.begin();
  network.begin(/*channel*/ 90, /*node address*/ this_node);
}

void loop(void)
{
  if (recebido = true)
    enviar();
  else
    receber();
}

void receber(void)
{
 
  certo = 0;
  // Pump the network regularly
  network.update();

  // Is there anything ready for us?
  while ( network.available() )
  {
    // If so, grab it and print it out
    RF24NetworkHeader header;
    payload_t payload;
    network.read(header,&payload,sizeof(payload));
    Serial.print("Relay State: ");
    Serial.println(payload.relay);
    Serial.print("Temperatura: ");
    Serial.println(payload.temperatura);
    Serial.print("Order: ");
    Serial.println(payload.order);
    Serial.print("Certo: ");
    Serial.println(payload.certo);
    certo = payload.certo;
  }
  if (certo = 1)
  {
    recebido = true;
    enviar();
  }
  else
    receber();
}

void enviar(void)
{
 // Pump the network regularly
  network.update();

  // send a message!

    Serial.print("Sending...");
    payload_t payload = { relay, temperatura, order, certo };
    RF24NetworkHeader header(/*to node*/ other_node);
    bool ok = network.write(header,&payload,sizeof(payload));
    if (ok)
    {
      Serial.println("ok.");
      recebido = false;
    }
    else
      Serial.println("failed.");



// vim:ai:cin:sts=2 sw=2 ft=cpp
Translation:
recebido = received
enviado = sent
Pages: [1] 2 3 ... 8