I have been working on RF tx and rx for almost a week straight but to no avail I could never get it to work even after my code was checked multiple times on the forum and had no errors. I then decided to use a volt meter to test the amount of volts coming out of the boards. My setup is a BOE shield on an uno and a mega connected to a breadboard. I plugged a 5v battery pack into the mega and tested it accordingly and it said 5v's are coming out but when I used a USB for the power on the Uno I received 3.67 volts. I then swapped the power and for the Uno I received 5v(actually 4.99 but I think the battery was running down). The mega with the USB read 4.23 rather than 3.67 the Uno was pushing out. I am assuming that the USB didn't have enough voltages coming out but why did the two boards have different outcomes? I remember that I thought one of my other boards were broken because I kept reading 3.67 power coming out a couple of weeks ago. I know for a fact it can't be the specific USB port due to the fact the first test I did to determine if one of the boards had a power problem was on a different laptop. Is it possible that the USB isn't giving enough power and I should just go buy another one? Is this the reason why the rx and tx weren't able to connect?
Thanks!
when I used a USB for the power on the Uno I received 3.67 volts.
Was the USB port on a computer or some other device? What was the voltage on the arduino boards with no other shields or equipment attached? USB is not made to supply a lot of current.
The USB was connected to my laptop which is currently being charged and I tested the Uno(the mega read 5v aswell) before it read 5v with a battery pack.
Alphacap22:
The USB was connected to my laptop which is currently being charged and I tested the Uno(the mega read 5v aswell) before it read 5v with a battery pack.
Then it looks like what ever you are connecting to the boards need to have their own external power supply.
They shouldn't because I wired them exactly like the datasheet from the website they came from.
Do you know why when I tested the two boards with the USB, as the power source, they had different voltages?
Alphacap22:
They shouldn't because I wired them exactly like the datasheet from the website they came from.
Do you know why when I tested the two boards with the USB, as the power source, they had different voltages?
Sorry, but your technical descriptions of what you have connected to what and under what conditions are too vague and sketchy to make any determinations.
Hi, can you post a picture of the project to show us how everything is connected, and a circuit diagram, CAD or picture of hand drawn circuit.
What Tx/Rx units do you have and what are their specs including current consumption on TX.
Hope to help.
Tom.....
Alphacap22:
I have been working on RF tx and rx for almost a week straight but to no avail I could never get it to work even after my code was checked multiple times on the forum and had no errors.
Without knowing what you are doing in detail there's no way to give any advice. What
RF modules/units? What power do they take? Are they powered via the USB 5V? What peak current do they require? Where is your code? Do you know that USB supplies are normally strictly limited to 0.5A?
Voltage sags usually mean you're using too much current (amps).
My wiring is set up(from left to right) for my mega connected to the Transmitter by a breadboard with a 5v battery pack as the power source. First wire orange connected to ground, second wire green connected to digital pin 39(I tried various pins and it didn't work), third wire another orange connected to 5v, and fourth wire green used as an antenna extending out.
My wiring for the Receiver which is connected to my Uno through a BOE shield breadboard with a USB as the power source. Wiring from left to right: First wire green I have connected to ground, second wire yellow I connected to digital pin 5, third wire green I connected to ground, fourth wire yellow I connected to 5v, fifth wire yellow I connected to 5v again, sixth wire green I connected to ground, seventh wire yellow I connected to ground as well, eighth wire green was used as an antenna.
https://www.sparkfun.com/datasheets/RF/KLP_Walkthrough.pdf is where I got the way to wire them, and is in the suggested links part for these models.
RF Link Transmitter - 315MHz - WRL-10535 - SparkFun Electronics is the transmitter and RF Link Receiver - 4800bps (315MHz) - WRL-10533 - SparkFun Electronics
is the receiver. These are the 315 MHz and I have the 434 MHz as well from SparkFun and even tried them but I am concerned about 315 MHz rx and tx.
transmitter code.
#include <VirtualWire.h>
void setup()
{
Serial.begin(9600); // Debugging only
Serial.println("setup");
// Initialise the IO and ISR
vw_setup(2000); // Bits per sec
vw_set_tx_pin(39);
}
void loop()
{
char *msg;
msg = "Hi";
vw_send((uint8_t *)msg, strlen(msg));
vw_wait_tx();
}
receiver code
#include <VirtualWire.h>
void setup()
{
Serial.begin(9600); // Debugging only
Serial.println("setup");
vw_setup(2000); // Bits per sec
vw_set_rx_pin(5); // receiver pin
vw_rx_start(); // Start the receiver PLL running
}
void loop()
{
uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;
if (vw_get_message(buf, &buflen)) // Non-blocking
{
for(int i =0; i < buflen; i++)
{
Serial.print(buf[i]);
}
}
}
Pictures:
There's no datasheet for the transmitter it seems - have you tried to measure the
current consumption for it? (Though I'd be surprised if it was even approaching 0.5A).
A photo or diagram is far more informative than an attempt to describe a circuit in
words I find.
Hi, have you tried the example programs from sparkfun, without the BOE board, to establish that the tx and rx are functioning correctly.
Note: These modules are indiscriminate and will receive a fair amount of noise. Both the transmitter and receiver work at common frequencies and don't have IDs. Therefore, a method of filtering this noise and pairing transmitter and receiver will be necessary. The example code below shows such an example for basic operation. Please refer to the example code and links below for ways to accomplish a robust wireless data link.
So these units are susceptible to noise and the RX will have to be tuned to the TX using the trim capacitor on the board.
These are very cheap boards, I have similar ones I got on ebay, but haven't had the chance to play with yet.
So don't expect Ethernet WiFi performace.
Hope this helps..
Tom.......
I've read somewhere that with laptop ports, USB 2.0 initially supplies 100 mA without request, if you need more current the USB device must request this from the hub in terms of units, each unit 100 mA till you get the maximum which is 500 mA. Another thing is that the ports on a laptop are likely connected to an internal hub (controller) that sharing the max current available (500mA) with other usb devices (internal and/or external).
The only guaranteed way to ensure 500mA is continuously available at each port is to use an external USB hub with power adapter connected ... easy to test this if you have one available.
MarkT:
A photo or diagram is far more informative than an attempt to describe a circuit in
words I find.
I added photos showing the set up of the receiver and transmitter.