Go Down

Topic: 2 RFM12B one to arduino and one to sanguino (Read 2733 times) previous topic - next topic

hunt333r

ok guis on my last step of my project i get some really nice problems .....

i have one arduino uno  to use serial monitor and one homemade sanguino and the two RFM12B/868S2 Modul:RF;FM;FSK;868MHz;SPI;-105dBm;400kHz mounted on pcb designed by me after the pictures found on internet



and i had modified the schemtic adding a voltage devider to lower 5v to 3.3 and a led with a resistor in praralel
and i came up with the attachment
ore pictures




the antenna is now quite long but i do not think this is my problem
until making this post i tried all libraries but is so hard to debug this ?
what problems you had while using your rfm ?
what libraries u had used ?
you have a litlle sketch for a button on one end and  led to the other ?
i measured the voltage on my pins and they are reallly low ... but i had used the same resistors in the pictures
for debugging where should i start ?????
thenx in advance for your advice

hunt333r

measured voltages to both of them when they are connected to arduino  ...and something is not right really
but i had used the resistors in the pictures from the net 
pin rfm1    rfm2
vdd 1.5     1.48
sdi 2.25     2.24
sck 0         0
nsel 2.25    2.24
sdo  0        0
nirq 0        0

hunt333r

ok guys i made some tests today ... and what the helll
has anyone used voltage dividers?

why an output of 3.28 of a voltage divider  when connected to rfm drop down to 1.31
3.64 - drop to 3.03
3.76 -drop to 3.12
i try to stay below datasheet limit of 3.8

oric_dan

#3
Sep 03, 2013, 05:01 am Last Edit: Sep 03, 2013, 06:21 am by oric_dan Reason: 1
Voltage dividers work fine for connecting RFM12 to Arduino 5V signals. If you're reading low, then you must have something connected wrong.

Your first diagram looks correct, the 2nd and 3rd are a little too small to read. If you actually have it hooked up as shown in the 1st diagram, you should be getting the correct voltages. So something is connected wrong.

For software, try the low power labs RFM12 library and the Send+Receive sketches. They work right "out of the box" with the UNO. The jeelib library has bugs. Don't even mess with it.
https://github.com/LowPowerLab/RFM12B

There have been MANY threads on RFM12s on the Networking section of the forum. For some reason, some people cannot get them to work no matter what they do. I think that's mainly a matter of hooking things up wrong, and possibly having blown the radios due to having accidentally applied 5V to the pins.

Whatever you do, don't waste your time trying to get jeelib to work. Also, it will be easier trying to get the radios to work if you are using UNO boards, rather than some of the others. There are fewer issues with connecting the UNOs. I think the low power library has correct support for the Sanguino pinout, but haven't tried it myself.

You can also take a look at this thread to see some of the comments made to other people, although I'm not sure if they ever got things to work correctly,
http://forum.arduino.cc/index.php?topic=182272.0

hunt333r

what i have doneeeee oh god .. from my last post .. i tried to make a little adjustable voltage regulator with a lm317t with a 5k small pot, i adjust it to give me 3.5v and connected to my rfm bord ......
in 2 minutes the pot started to get hot melted ... and changed his value and the lm started to give 4.5v i had the voltmeter connected ... and disconnect all fast :))  fast and furious.
i think the pot was connected bad i used 2 pins instead of all 3 ... the middle one to the adj of lm317, the one from other 2 to the ground and one free ....

what can i measure to determine if the rfm is not fried ... how can i determine if they are not damaged ??

please someone  can measure some values between pins ? and tell that to me ... i don't know really i'm afraid to connect the voltage regulator back to the bord
thenx for your help

oric_dan

Hookup = the problem probably 95% of the time, when things aren't working.

1. you ALWAYS need to check that the power source [LM317] is working and setup correctly
    BEFORE connecting it to anything else.

2. there is no way I can see to tell if you've fried your radio, except by getting it to work.
    If it works, then it's good. If it doesn't work, then you're still are square-1, and still don't
    know whether:

    a. the hookup is wrong.
    b. the software is wrong.
    c. the radio is bad.

sadatnaseri

#6
Sep 15, 2013, 03:00 pm Last Edit: Sep 15, 2013, 03:10 pm by sadatnaseri Reason: 1
I have a project that 10 wireless transmitter module , and 10 wireless receiver module that has been used.All madule are rfm12b but apart from a transmitter module rfm12bp is used in
In your opinion, why turn the channel on which the transmitter module rfm12bp is used, disturbance of information received by other receivers that are configured on other channels, is located in the near?
Of course transmission channels are disrupted far away from the transmitter module rfm12bp is used. Before turning on the transmitter module rfm12bp receives data properly indicate themselves.
Please help me .

hunt333r

ok guys i had fishiness the hardware with a little modified sketch ....
here are my boards for rfm12B

hunt333r

ok i had used
tomorow i will upload some pictures
what u will need for this
1    Electrolytic Capacitor    package 100 mil [THT, electrolytic]; capacitance 1µF; voltage 16V
1    Ceramic Capacitor    package 200 mil [THT, multilayer]; capacitance 100nF; voltage 16V
3    Generic female header - 7 pins    package THT; hole size 1.0mm,0.508mm; row single; form ? (female); pins 7; pin spacing 0.1in (2.54mm)
2    Generic male header - 7 pins    package THT; hole size 1.0mm,0.508mm; row single; form ? (male); pins 7; pin spacing 0.1in (2.54mm)
1    Red LED - 3mm    package 3 mm [THT]; leg yes; color Red (633nm)
3    15k ? Resistor    package THT; tolerance ±5%; bands 4; resistance 15k?; pin spacing 400 mil
3    5.6k ? Resistor    package THT; tolerance ±5%; bands 4; resistance 5.6k?; pin spacing 400 mil
1    1k ? Resistor    package THT; tolerance ±5%; bands 4; resistance 1k?; pin spacing 400 mil
1    Trimmer Potentiometer    package THT; size Trimmer - 6mm; track Linear; type Trimmer Potentiometer; maximum resistance 5k?
1    2.2k ? Resistor    package THT; tolerance ±5%; bands 4; resistance 2.2k?; pin spacing 400 mil
1    RFM12b HopeRF Transceiver    
1    LM317T - Variable    package TO220 [THT]; voltage Variable regulator


hunt333r

#9
Sep 22, 2013, 02:23 pm Last Edit: Sep 22, 2013, 02:26 pm by hunt333r Reason: 1
ok now i made the pictures .... i wish this will help someone!
ok its a double board the top side has the rfm12b and the bottom side has the resistors for the data pins, and gnd and in my case, 12v supply and the voltage regulator to output 3.3v

BE AWARE my lm317 was set up to output 3.4v from 12v  if u set up to output 3.4v from or smaller do not imput grater voltage the output will be grater;
BE AWARE the rfm antenna pin to match mine in the pictures ... it can be easily turned and solder it wrong



in my previous post u will see the pdf after i made the bords









IF U HAVE OTHER QUESTIONS PLEASE ASK ....  I WILL BE HAPPY TO HELP

hunt333r

OK i'm pulling my brain out using LowPowerLab no.... not get me wrong, this is working ..... the examples
when i send data .... the receive led blinks randomly in stead to fade .... how i send the pot value

Someone used RFM12B.h and send the analog read data ???
Someone have the two working sketches the sender and the receiver, i wish to send at the start one analog value after that i wish to send 6 pot values .

oric_dan

#11
Sep 24, 2013, 07:41 am Last Edit: Sep 24, 2013, 07:35 pm by oric_dan Reason: 1
The pictures are good, although a little difficult to tell exactly what is what. I'll assume the wiring is all correct.

Quote
OK i'm pulling my brain out using LowPowerLab no.... not get me wrong, this is working ..... the examples
when i send data .... the receive led blinks randomly in stead to fade .... how i send the pot value

I'm not quite sure what this means? You didn't say which sketch you're using. Does the Led blink in response to the transmitted signal, or just goes randomly?

1. do the Send and Receive examples in the lowpower library work? That's the first thing to do.

2. once they work, then you can try the LED_Control_Gateway and LED_Control_node sketches.
   These will allow you to send LED on/off/blink commands to the remote node. The pulse
   command doesn't seem to work well, however, from what I can tell.

3. you will have to modify these sketches to send analog values and pot data. It's very simple.
   If you look in the LED_Control_Gateway sketch, you'll see the following lines,
Code: [Select]
void sendMessage()
{
 sprintf(sendBuf, "%c:%c", mode, theSpeed);
 radio.Send(nodeId, sendBuf, 3, REQUESTACK);
....


4. all you have to do is put your analog value into the sprintf() function, and it gets converted
   to an ASCII text message and sent. So write something like
Code: [Select]

 sprintf(sendBuf, "pot value=%04d", analogRead(A0) );
 int len = strlen(sendBuf);
 radio.Send(nodeId, sendBuf, len, REQUESTACK);
.......


5. then on the LED_Control_node side, these lines in the existing sketch will display the message that was sent,
Code: [Select]
   if (radio.CRCPass())
   {
     Serial.print('['); Serial.print(radio.GetSender(), DEC); Serial.print("] ");
     for (byte i = 0; i < *radio.DataLen; i++)
       Serial.print((char)radio.Data[i]);
.......

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy