Go Down

Topic: Arduino Reciever not responding with external power supply (Read 292 times) previous topic - next topic

pg997

Hello to the community,this is my first post and unfortunatelly i cant find a previous post with the same problem i got.
      I recently made a project with arduino UNO a reciever 434mhz and a relay module to be able to make my garage door remote controlled from a remote control same frequency with reciever.
 
     The project was almost completed and everything worked fine until i tried to power it with external power supply 12v regulated to 5v with a regulator and 2 capacitors( the output voltage is steady 5.05v)
   
    Everything works exept the reciever...the reciever doesnt respond at all with external supply.I have tried to run other programs and are running like a charm exept from programs that include reciever.

   I have tried  to ground pins RX and TX with a 10k resistor,power it from USB port from 5v and from jack  still nothing. Any advise?
   
   I am using rc switch library is it possible to be a library problem and if yes how can be fixed?
 
      Τhanks in advance!

tinman13kup

Perhaps post a diagram of how you have it wired up. Right now, all we know is it doesn't work, and nothing else. I could say connect the blue wire, and with the information given, would be valid.

At this point, the only help I can give is make sure all ground wires are connected together, and make sure you are working with acceptable voltages
Tom
It's not a hobby if you're not having fun doing it. Step back and breathe

pg997

Ok,but i dont think it matters.When i connect the USB cable port on pc everything worked but when i connect my steady 5 volt supply through the same arduino USB port the reciever is dead. With the same circuit in both cases.

Circuit:

Robin2

Two or three hours spent thinking and reading documentation solves most programming problems.

tinman13kup

Your picture seems incomplete. There are a few ground pins not connected.

Still, what I was looking for was the difference in the hookups between USB and how you connect the external source. Include the capacitors, wiring, psu voltage/current, everything.


Like Robin2 said, the program needs to be posted as well.

If you can't find the issue, then perhaps you already overlooked it. How can anyone help without verifying it?
Tom
It's not a hobby if you're not having fun doing it. Step back and breathe

pg997

I have connect all the ground pins of the reciever i forgot to add the lines in the picture. I madea power supply from 12v transformer .I regulate the voltage with a 5v regulator and 2 capacitors (circuit in pic below) and after i took the output vcc and ground and solder it on vcc and ground of a usb cable and after i connect it to arduino on the USB port.
 
 I am afraid that the rc switch library doesnt run properly when it is not connected on pc. Here is the programm.
Code: [Select]
#include <RCSwitch.h>
 
RCSwitch mySwitch = RCSwitch();
long value = 0;
bool ledA = false;
bool ledB = false;
int limitA = 9;
int limitB = 10;
int valueA = 0;
int valueB = 0;
int limitA_ON = false;
int limitB_ON = false;
int LED_TEST = 7;
void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(1); // Receiver on interrupt 1 => that is pin #3

    Serial.println("connected");
   
    pinMode(5,OUTPUT);
    pinMode(8,OUTPUT);
    pinMode(limitA,INPUT);
    pinMode(limitB,INPUT);
    pinMode(LED_TEST,OUTPUT);
    digitalWrite(5,HIGH);
    digitalWrite(8,HIGH);
}
 
void loop() {
  valueA = digitalRead(limitA);
       valueB = digitalRead(limitB);

if (valueA == HIGH){
  digitalWrite(5,HIGH);
  digitalWrite(7,LOW);
  //Serial.println("limit A pushbuttom pressed");
  limitA_ON = true;
  }
  else{
    limitA_ON = false;
  }
if (valueB == HIGH){
  digitalWrite(8,HIGH);
  //Serial.println("limit B pushbutton pressed");
  limitB_ON = true;
  }
  else {
    limitB_ON = false;
  }

  if (mySwitch.available()) {
    Serial.println("switch available");
   
     value = mySwitch.getReceivedValue();
     
       
    if (value == 0) {
      Serial.print("Unknown encoding");
    }
    else if (value ==5526720 || value ==10007048)
         {
          if (digitalRead(5) == HIGH && ledB == false)
          {  if(limitA_ON == false)
               {Serial.println("relay a on");
                digitalWrite(5,LOW);
                ledA = true;   }}
          else if(digitalRead(5)==LOW)
              { Serial.println("relay a off");
                digitalWrite(5,HIGH);
                ledA = false;  }
         }
     
   else if (value == 5526576 || value == 10007044)
   {
         if (digitalRead(8) == HIGH && ledA == false)
          {if(limitB_ON ==false)
            {Serial.println("relay B on");
             digitalWrite(8,LOW);
             ledB = true;   }}
        else if(digitalRead(8)==LOW)
        {    Serial.println("relay b off");
             digitalWrite(8,HIGH);
             ledB = false;  }
   }
     
      Serial.print("Received ");
      Serial.print( mySwitch.getReceivedValue() );
      Serial.print(" / ");
      Serial.print( mySwitch.getReceivedBitlength() );
      Serial.print("bit ");
      Serial.print("Protocol: ");
      Serial.println( mySwitch.getReceivedProtocol() );
     

  }

    mySwitch.resetAvailable();
 
}
   DEC numbers are the decorded values of my remote controls i use to give commands( A,B buttoms)

Robin2

Images from Reply #2 and #5  so we don't have to download them. See this  Image Guide





...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Robin2

Your Fritzing diagram is impossible to read. Make a simple pencil drawing with the connections clearly labeled and post a photo of the drawing.

What have you the output from the 5v regulator connected to?  I would connect it to the Arduino 5v pin.

I don't see anything in your program that requires it to be connected to the USB port. Please post a link to the documentation for the library you are using.

I'm not entirely clear how you know the program is not working. What exactly happens when the program works properly and does not happen when it is not working.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

TomGeorge

Hi,
Can you post a picture of your project so we can see your component layout please?

Thanks.. Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

avr_fred

The way you've described the problem, it's the new power supply that is at fault. That is the only thing that changed. Why start adding resistors to RX and TX, suspecting library problems, etc when you've not done any basic troubleshooting of the new supply?

You never stated that the 12 volt supply was a DC supply. How did you confirm?

Does your 7805 regulator really output 5 volts when connected to the Uno?

Have you measured the AC ripple content that is coming out of the 7805 when connected to the Uno?

These things are all accomplished with a basic voltmeter, analog or digital.
 
When troubleshooting, you verify things are correct (voltages, currents, signals, etc), you never just start changing things - as you just introduce yet more problems that never get solved.

pg997

I have measure the voltage i told you it is steady dc 5.05v  measured in use with multimeter from a 12v dc power supply. I have also tried to power it from 5v pin as well and still when i press the button the reciever seems not to understand and decorde the signal that leads to power the motor relay...i have test  the reciever today again from my power supply with an other code blinking the led when signals or noise readed from reciever and it worked...so i am kinda sure its rc switch library problem but i dont know how to fix it...link for rc switch- https://github.com/sui77/rc-switch

 Pics with more info from the project are coming

Robin2

I don't see anything in the RCSwitch code that has anything to do with Serial.

Have you another power supply that you can try?


By far the best way to debug this problem is to get a USB-TTL cable and connect it to the Rx Tx and GND pins of the Arduino so you can view the output in the Serial Monitor when it is powered by the external power supply.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

pg997

Nice Advice! though the GND pin should not be on supply too and just the RX TX pins on USB to the PC?
  I know that my code does not depend on the serial monitor but i am afraid that the program itself can not compile and find the decimal remote control command numbers (10007044,10007048....) i am not sure about that  just a thought...More pics o the project are coming...

Robin2

Nice Advice! though the GND pin should not be on supply too and just the RX TX pins on USB to the PC?
I did NOT say to use the Rx and Tx pins on the USB connector.  The USB system works at 400 MHz and higher.

You MUST use a USB-TTL converter and you MUST connect Rx, Tx and GND to it.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

pg997

I did that test and the seiral monitor doesnt show signs that the reciever is responding at all. And i am asking you what is the proper way to connect a reciever to arduino when you want to power it from an external 5v dc power supply?

Go Up