Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / RF24Network + Broadcast on: January 05, 2013, 08:31:17 pm
Hi,

I'm starting out building a home automation/sensor network using the cheap NRF24L01+ 2.4ghz ISM devices and the great libraries that ManiacBug has put together (RF24 & RF24Network).

Using the RF24Network library I am able to get a bunch (well ok just 3 so far but I have parts on order) of nodes to talk to each other. The library is great as it allows you to simply address another node and it sorts the routing of the message through the network to the endpoint.

I was wondering however if anyone has come across a way to do a broadcast message using the RF24Network library? From what I have read I can only see headers being constructed utilising a destination address rather than some sort of broadcast address but it would be great if someone knows how to acheive this!

For some message types I want the endpoints to simply broadcast their content (eg state change data (door opened) or announce data (display this)) so that other nodes can accept this data and autonomously act on it.

I can fall back to having a 'control node' that maintains a list of member nodes and directs the broadcasts, but I'd prefer not to.

Thanks

dewgenenny
2  Forum 2005-2010 (read only) / Troubleshooting / Re: HD44780 3.3v Help! on: January 16, 2010, 01:32:33 am
Thanks all for your help.

Have tried the logical approach that floresta suggested with no joy, seems I've learnt a valuable lesson in the process smiley. I did manage yesterday to get it to display a bunch of left arrows, I'm guessing I still don't have the digital signal right...

Apologies if I didn't post enough info - trust me I'm new to all this, so I honestly just don't know where to start half the time. Your help and guidance is much appreciated.

I'm going to order a 5v LCD off ebay and see how I go, think for the sake of $8 I might as well save myself a bunch of hassle.

Cheers
3  Forum 2005-2010 (read only) / Troubleshooting / Re: HD44780 3.3v Help! on: January 15, 2010, 02:18:41 am
Thanks Don,

That's basically the procedure I went through - got the contrast/backlight working nicely with the blocks showing if you turn up the contrast too high.

I do have R/W grounded and I have been using example that is in the IDE.

Will let you know how I go trying to insert a delay in the LiquidCrystal library to see if that helps, to be honest, not really to sure where I'll insert the delay though.... ho hum!

Cheers for your help!

Tom
4  Forum 2005-2010 (read only) / Troubleshooting / Re: HD44780 3.3v Help! on: January 14, 2010, 07:09:26 pm
Thanks everyone,

I tried using some zener? diodes between the data channels and ground to limit the voltage to 3.3v, with a 1k resistor in line.

Once I had this setup, on running the standard hello world example using LiquidCrystal library, the LCD displays a blinking cursor, but whatever I do (including trying the LCD4bit library) I can't get the <insert expletive> thing to work.

I'm not sure if the LCD is fried, especially given it does state 7v in the datasheet, but I'm fairly certain my brain is....

I have noted a post on the sparkfun website that discusses these devices possibly taking a little longer to initialize, with the solution being to enter a delay at the start to give it time to 'warm up' however I take it I would need to recomplie the LiquidCrystal library for that?

Cheers massively for all your help,

Tom

5  Forum 2005-2010 (read only) / Troubleshooting / Re: HD44780 3.3v Help! on: January 13, 2010, 10:12:06 pm
Link to sparkfun LCD is http://www.sparkfun.com/commerce/product_info.php?products_id=9054

Thanks for any and all help!
6  Forum 2005-2010 (read only) / Troubleshooting / HD44780 3.3v Help! on: January 13, 2010, 10:11:37 pm
Hi,

I'm fairly new to arduino/electronics in general (although not new to programming) - trying to get the arduino working with a HD44780 compatible, 3.3v LCD from sparkfun (link below because I can't post links in my first post...).

I have hooked up the LCD exactly as discussed for the LiquidCrystal library, have a 10k pot working for controlling the contrast, backlight is working but for the life of me I can't get any output on the screen, have tried multiple sketches. All I get is a solid line at the top of the display, like a underscore upside down for each of the top line of characters.

I realised this morning that I am trying to drive a 3.3v device with 5v logic, could this be the reason I'm not getting output? Would a 5v to 3.3v regulator (LM3940) on each of the data lines sort this?

Also, what are the chances I've fried the board using 5v already?

I'm really sorry not to be posting my code here (I'm at work) will update later, it's killing me not understanding!  :-/

Thanks so much

Tom
7  Forum 2005-2010 (read only) / Interfacing / Re: Wireless temp sensor on: January 19, 2010, 07:03:13 am
Thanks CaptainObvious - been trying to make some sense of the code in the project you linked to, to be honest, will need to learn a little more c coding to get a full understanding.

I just started playing around with using the software serial library trying to read out data received from the receiver data pin (I will get to disassembling the transmitter but that will have to come second as my wife uses the outside temp reading all the time and would kill me if I break it smiley )

Is there value in using the software serial library? if so, any idea what would be a good baud rate to chose? I started with 1200 and can see data when I push the sync button on the transmitter however not really sure how to output/capture the data for analysis - seems the softwareserial read() method pulls a character off the line which might be incorrect?

I was hoping to generate a bunch of capture strings and then anaylse for similarity and/or changes that might help me work out the current temp.

Am I just being too optimistic with this approach?

Thanks,

Tom
8  Forum 2005-2010 (read only) / Interfacing / Re: Wireless temp sensor on: January 17, 2010, 01:21:38 am
OK, apologies for replying to myself here, but have made some more progress, perhaps someone can help me here?

Using the code found here http://www.arduino.cc/playground/Code/InfraredReceivers I have managed to capture the data more accurately and using gnuplot I can get the following:



Output can be found here at the, the temp should read 34.0 degrees.

Source file for gnuplot is here: http://www.tom-george.com/wirelesstemp/take2.dat

If anyone can point me in the right direction for next steps I'd be very appreciative!

Cheers
9  Forum 2005-2010 (read only) / Interfacing / Re: Wireless temp sensor on: January 16, 2010, 10:43:42 pm
Quote
Please post whatever details you can about the unit concerned... stuff we can use to try to track down a source? Hard to get enthusiastic about the work of writing code for a "one off" situation? It may well be that someone (China?  Smiley  ) has created modules that different retailers are putting in different pretty housings, so markings on the pcbs of interest as well as the "outer" markings.

Totally agree - sorry I didnt include more info at the beginning of the thread but to be honest as I said, I wasn't sure if I was asking a very basic question or a more difficult one (which it appears to be... :/)

Anyways, I've taken some more photos (below) that will hopefully give you some more info - for what it's worth I've seen many of the cheaper indoor/outdoor temp stations with the same transmitter as below which would make me think they are quite common. Interesting too that the send/receive are both breakout boards so quite likely found in other things.

I've googled all the numbers on the PCB of the receiver without any luck, perhaps someone here recognises them?

I've also just noted there's a TX/Reset button inside the transmitter, so I'm going to use that to see if I can't capture some decent data.

Cheers.


Transmitter module, branded Sontax (although I believe they're a Australian chinese goods importer, so probably oz specific)



Transmitter front


Transmitter back


Slightly skanky but working receiver... yes, it's bloody hot here, 41 degrees outside smiley-sad


Shell from the broken receiver that I pulled the receiver module from.
10  Forum 2005-2010 (read only) / Interfacing / Re: Wireless temp sensor on: January 16, 2010, 05:33:37 am
Savitch that's brilliant, I'm trying to repeat your process to look through more data (I have loads, one example below). Forgot to mention the thermometer read out I can see on other device that receives actually has a decimal place, for the below I believe it was 37.9....

High: 167
Low: 26126747
High: 527
Low: 576
High: 2475
Low: 1209
High: 587
Low: 1177
High: 625
Low: 1131
High: 658
Low: 1143
High: 630
Low: 597
High: 274
Low: 831
High: 542
Low: 656
High: 609
Low: 638
High: 641
Low: 1141
High: 638
Low: 1119
High: 682
Low: 592
High: 631
Low: 563
High: 639
Low: 1139
High: 544
Low: 842
High: 594
Low: 741
High: 474
Low: 1582
High: 604
Low: 1136
High: 631
Low: 1122
High: 646
Low: 1169
High: 605
Low: 616
High: 340
Low: 723
High: 575
Low: 841
High: 602
Low: 686
High: 634
Low: 1181
High: 619
Low: 1162
High: 672
Low: 560
High: 647
Low: 1146
High: 619
Low: 439
High: 329
Low: 1021
High: 553
Low: 1088
High: 547
Low: 1176
High: 691
Low: 1112
High: 638
Low: 1109
High: 656
Low: 551
High: 633
Low: 1136
High: 539
Low: 670
High: 617
Low: 643
High: 609
Low: 653
High: 659
Low: 1176
High: 624
Low: 1132
High: 678
Low: 554
High: 657
Low: 569
High: 635
Low: 1161
High: 507
Low: 793
High: 574
Low: 1057
High: 497
Low: 1206
High: 661
Low: 1132
High: 629
Low: 1132
High: 652
Low: 1147
High: 594
Low: 591
High: 392
Low: 719
High: 548
Low: 819
High: 603
Low: 692
High: 566
Low: 622
High: 570
Low: 576
High: 599
Low: 1125
High: 671
Low: 551
High: 654
Low: 1111
High: 549
Low: 716
High: 588
Low: 679
High: 582
Low: 672
High: 597
Low: 541
High: 652
Low: 557
High: 653
Low: 1130
High: 594
Low: 1159
High: 7313
Low: 754
High: 581
Low: 705
High: 586
Low: 670
High: 578
Low: 640
High: 529
Low: 568
High: 596
Low: 1125
High: 643
Low: 580
High: 622
Low: 1168
High: 459
Low: 4505
High: 579
Low: 642
High: 551
Low: 1204
High: 664
Low: 1135
High: 637
Low: 1139
High: 650
Low: 1112
High: 622
Low: 566
High: 282
Low: 929
High: 527
Low: 631
High: 2486
Low: 1205
High: 650
Low: 1118
High: 608
Low: 1112
High: 661
Low: 1099
High: 620
Low: 562
High: 159
Low: 17877
High: 220
Low: 516
High: 416
Low: 0

Quick question - provided I work out how to decifer the preamble, do you know of any libraries for the arduino that can interpret the data? or is this beyond the arduino?

Appreciate your help with this mate, it's fascinating for me......

cheers
11  Forum 2005-2010 (read only) / Interfacing / Wireless temp sensor on: January 16, 2010, 02:58:51 am
Hi,

I'm still an arduino beginner, so this may either be a long shot or else a really basic question.. hopefully someone can point me in the right direction smiley

I recently bought a very cheap ($12) indoor/outdoor thermometer, which didnt work right from the get go. This afternoon I took it apart and was interested to see that the wireless receiver element was a seperate board with only three pins, kindly named GND, Data and VDD.

It looks like this:



I've hooked up GND to ground, VDD to 3.3v on the arduino (unit was powered by two AA batteries) and Data to pin 7 on my arduino.

Using the following code, I can see it's receiving 'data' from the wireless sensor outside:

Code:
int pin = 7;
unsigned long duration;
unsigned long durationlow;


void setup() {
  Serial.begin(9600);
 
  pinMode(pin, INPUT);

}

void loop() {
  int sensorValue = digitalRead(pin);
  duration = pulseIn(pin, HIGH);
  durationlow = pulseIn(pin, LOW);
  if(duration != 0)
{  Serial.print("High: ");
    Serial.println(duration, DEC);
    Serial.print("Low: ");
        Serial.println(durationlow, DEC);
 
}

}

This is what I receive:

High: 173
Low: 112
High: 348
Low: 31717
High: 456
Low: 181
High: 190
Low: 838
High: 896
Low: 831
High: 784
Low: 878
High: 896
Low: 873
High: 883
Low: 826
High: 400
Low: 751
High: 416
Low: 747
High: 406
Low: 761
High: 947
Low: 780
High: 889
Low: 850
High: 858
Low: 871
High: 886
Low: 946
High: 817
Low: 1022
High: 428
Low: 700
High: 417
Low: 727
High: 155
Low: 4091
High: 119
Low: 0
High: 187
Low: 1053551
High: 52
Low: 0

Is there any way I can convert this stream of data back to a number? For what it's worth, I know that the value transmitted is around 37 degrees because that's the temperature outside at the moment.

Apologies if this is a ridiculous question, I seriously have no idea what's possible with the arduino....

Cheers

Tom
Pages: [1]