Show Posts
Pages: 1 ... 36 37 [38]
556  Using Arduino / Motors, Mechanics, and Power / What to use for locking? on: October 24, 2012, 03:42:07 pm
With a view to RFID controlled locking, I was looking at Magno locks but they seem pretty expensive.

The other option would be a solenoid type bolt lock.

I just wondered what kind of the things some of you guys use to achieve Arduino controlled locking?

I'm thinking some kind of saloon or revolving door. Ideally I need to restrict to single entries to track people in and out: my perfect solution would be an RFID detector doorway that just scans everyone, but it seems that kind of range isn't easily (or inexpensively) achieved.
557  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Client Send on: October 20, 2012, 06:21:54 pm
I realised I was using DNS to lookup a hostname so switched to direct IP access, That shaved 50ms off the overall time.

Next thing is to try it with a local network server, instead of over the internet, and see how that fares.
558  Using Arduino / Networking, Protocols, and Devices / Ethernet Client Send on: October 20, 2012, 04:31:49 pm
I have a sketch that retrieves data from an nRF wireless module and then transfers it with a GET to a web server for insertion into a MySQL database.

I was getting issue with packet loss and finally troubleshoot it to the ethernet connect>send>disconnect. This appears to take around 295ms, with the nRF bits only taking 5ms extra, This limits me to 3 incoming packets without loss.

With payload header that gives me basically 72 bytes per second of reliable data transmission. That's poor by any standards.

I just wondered if ~300ms is about typical for doing a GET to a web page on the internet?
559  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01 and RF24Network error on: October 20, 2012, 03:27:17 pm
An update.

This issue seemed to be related to the nRF module itself being assigned an incorrect Node address.

After much head scratching I thought it might be something to do with timing, between the nRF relinquishing SPI and the Ethernet shield accessing. SS voltage drop/rise conflicts so that the SPI was still active for a cycle or two when the Ethernet started transferring data. I was guessing that the node settings were being corrupted somehow.

Anyway, I tidied up my demo sketch and inserted a delay between going from nRF to Ethernet and back again. This seemed to cure the problem when I set to 50ms and I gradually worked my way back, splitting 50% each time, through 25ms and 12ms.

Finally I tried no delay and it stills eems to be OK at the moment, so it *could* have been something dirty in my code after all.

Anyway, it looks like I have a handle on it for now, so thought I'd update here in case anyone else has the same problem and tries to troubleshoot.
560  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01 and RF24Network error on: October 18, 2012, 02:28:56 pm
I just had a though as to whether this could be anything to do with the Wiznet5100 issue over not releasing the SPI bus properly?

I don't seem to be having any issues on a transmitting node that doesn't have an Ethernet shield.

A friend of mine is developing in parallel and he has seen the same error after a period of receiving.

EDIT: It looks like I have a clone of V5 of the Ethernet shield. It does look like it works OK as it happily receives data from the nRF and posts it to a webpage for insertion into a database. This happens about 50-60 times before it fails with the address error.
561  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Ethernet IP address on: October 18, 2012, 01:23:30 pm
Look through the Ethernet library examples as that information is all contained and demonstrated within.
562  Using Arduino / Networking, Protocols, and Devices / nRF24L01 and RF24Network error on: October 18, 2012, 01:22:30 pm
I've managed to get these devices talking to each other and working with the RF24Network library.

I have a transmitter unit that is sending my data fine, up to a point.

After some period of time, as little as a minute if sending every 1 second, the receiver stops getting the data and I just get a stdout output, via printf, of:-

*** WARNING *** Invalid Address 0177777

Has anyone come across this and have any idea what the issue could be.

I'm sending a set of 4 data items consisting of 12 bytes, 2 ints and 2 longs.

Code:
struct payload_t{
int var1;
int var2;
long var3;
long var4;
}

The sending node is 1. The receiving node is 0. All they are currently doing is acting as transmit/receive respectively, although the network.update() function does do data retransmit in the background if there were other nodes and network traffic about, which there isn't in this instance.

I'm getting the data back out fine at the other end, and then transferring it via ethernet and a GET into a database on an internet site.

Like I say, it works fine for a period and then goes awry.
563  Using Arduino / Networking, Protocols, and Devices / Re: Connecting two Arduinos via (wireless) USB.... (or Xbee) on: October 14, 2012, 11:58:31 am
For wireless comms between Arduinos, take a look at the nRF24L01 modules. You can get them from china for £1.32 each on eBay, or about 2.50-£3.00 from UK.

Then look for RF24 and RF24Network libraries by maniacbug.

I've started playing with these myself and they are nice little devices. If you don't need to transmit far, less than 10m, the those cheap low powered ones will do. If you need more range then you get higher powered units for about £7.50 each.

They are a much cheaper alternative to XBee, Zignee or Wirelss Shield. They also work in 2.4Ghz so you can use any normal wifi type antennas with the higher powered ones.
564  Using Arduino / Project Guidance / Re: RFID doorway or other detection method on: October 14, 2012, 11:30:43 am
That could be a possibility. I also had thoughts along the line of a saloon style door and have the reader antenna in the swing doors.

I'm guessing I'd need to make a DIY antenna of some kind.
565  Using Arduino / Project Guidance / RFID doorway or other detection method on: October 14, 2012, 04:08:17 am
Looking for any advice and guidance in my requirements:-

Using 13.56Mhz RFID I need to detect people moving in and out of an area. This needa to be without any active action by the user, i.e they don't have to offer up their tag to a reader antenna.

Initial thoughts are something similar to retailers detectors, but I understand that's expensive.

Is there a way of extending range so that a doorway could be constructed to read? With 1m width that could be antennas either side capable of 50cm range.

The only other idea I had was a 'step' of some sort and have the users attach key fob style tags to boot laces in order to read as they moved across that threshold. Their feet is the only thing I could think of that is at a predictable distance from a reader, and the same regardless of height.

Other thoughts were a break beam type system of IR emitter/receiver, or ultrasound, but I was thinking it may be difficult to detect if groups cross in quick succession. These also don't allow me to identify anyone (player and which team they are on)

Any other ideas and advice would be appreciated.
566  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: October 13, 2012, 06:52:12 pm
I've been playing with this library today and have to say it's awesome for what I need, being able to play simple sound effects from game props.

I've just been using a single pin today for 8 Bit Full Rate Mono, but the quality seems really good for what we need. Unfortunately I was using an Ethernet shield for the SD cardso couldn't use D10 to try 16 Bit. That's the only downside I can see, the pin conflict with Ethernet and some LCD Shields (pin 10 is used for backlight brightness control).

Just thought I'd say a big thanks for the time put into this. It's a great piece of work to show what can be done direct from the MCU, without additional hardware.

I connected up to a set of PC amplified speakers and it sounds great with both voice, item and vehicle sounds.
567  Using Arduino / Networking, Protocols, and Devices / Re: RF24Network and nRF24L01+ (send a string) on: October 08, 2012, 07:11:41 am
I'm new to this myself, but having a similar problem.

With your 'fix' above, it appears you are running the TX and RX on the same MCU? If so then aren't you bypassing the RX anyway and just printing out the myString char that you defined globally as 'hello'?

I'm having a similar issue, where I seem to be having trouble with what should be the simplest thing, sending a string.

I have one MCU as TX and the other as RX. I'm attempting to send a string and it just doesn't work how I'd expect.

Code:
char * sendData = "1234567890";

Code:
void loop(void)
{
  // Pump the network regularly
  network.update();

  // If it's time to send a message, send it!
  unsigned long now = millis();
  if ( now - last_sent >= interval  )
  {
    last_sent = now;

    Serial.print("Sending...");
    RF24NetworkHeader header(/*to node*/ other_node);
    bool ok = network.write(header,sendData,strlen(sendData));
    Serial.print("Sending - ");
    Serial.print(sendData);
    Serial.print(" - ");
    Serial.print(strlen(sendData));
    Serial.print(" bytes long. ");
    Serial.println();
    if (ok)
      Serial.println("ok.");
    else
      Serial.println("failed.");
  }

At the RX node I find that I get nothing unless I define the receivedData as a blank string, i.e. 10 spaces. That won't adapt to whatever string I happen to send though. If I don't set receivedData to something at the start then I get only 1 or 2 characters through and usually not what I'm expecting.

Code:
char * receivedData = "           "; //see how I have to give it a blank string. it doesn't work without that.

Code:
void loop(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;;
    network.read(header,receivedData,strlen(receivedData);
    Serial.print("Data Received - ");
    Serial.print(receivedData);
    Serial.print(" - Size ");
    Serial.print(strlen(receivedData));
    Serial.println();
  }
}

This should be so simple, but I'm having a severe headache now.
568  Using Arduino / Networking, Protocols, and Devices / Re: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver on: October 06, 2012, 06:24:44 pm
Right, some kind of progress, but even more puzzles:-

Occaisonally when resetting, one of my units will show the addresses (pipe) as E2 & D2, whilst the other shows both as D2.

If I try transmitting from the E2/D2 then I get nothing. If I try transmitting from the D2/D2 then the E2/D2 responds as you expect and works ping/pomg. If I then change the D2/D2 to 'R' and the E2/D2 to 'T; then it works again! Strange, it will only work that way round AFTER I've had it working the opposite way.

I suspect that if both units show E2/D2 correctly then I could reliably transmit from either first and it will work.

Anyone have any idea as to what is going on here?
569  Using Arduino / Networking, Protocols, and Devices / Re: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver on: October 06, 2012, 04:57:44 pm
Hi everyone. I'm trying to get to grips with the nRF24L01 and the RF24 & RF24Network libraries.

I have made my own breakout boards for my RF units, which are 10 pin configuration. Vcc and Gnd are doubled up on pins 1/2 and 9/10 respectively.

So, I've wired them, checked all my soldering and continuity between the wire ends, my board connections and through to the units when plugged into a 2x5 female header on my breakout. Everything checks out fine and, when plugged in and Arduino powere up, I see a nice 3v3 at across Vcc and Gnd.

I've then connected to each Arduino as:-

CE - D9
CSN - D10
MOSI - D11
MISO - D12
SCK - D13
IRQ - Not Connected at the moment (I believe it's redundant unless use required)

Then I have my two Arduinos (an SMD and DIP version), with each nRF connected, and running the GettingStarted sketch with no changes.

Code:
Arduino 1 (SMD)

RF24/examples/GettingStarted/

ROLE: Pong back

*** PRESS 'T' to begin transmitting to the other node

STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xe7e7e7e77f 0xf0f0f0f0d2
RX_ADDR_P2-5 = 0xc3 0xc4 0x7f 0xff
TX_ADDR = 0xe7e7e7e7e7
RX_PW_P0-6 = 0x00 0x20 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x3f
RF_CH = 0x4c
RF_SETUP = 0x57
CONFIG = 0x7f
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_HIGH

Code:
Arduino 2 (DIP)


RF24/examples/GettingStarted/

ROLE: Pong back

*** PRESS 'T' to begin transmitting to the other node

STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xf0f0f0f0d2 0xf0f0f0f0d2
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xf0f0f0f0d2
RX_PW_P0-6 = 0x20 0x20 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0f
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power                = PA_HIGH

You can see that mine differ at the addresses to the example posted on the maniacbug blog

Code:
RF24/examples/GettingStarted/
ROLE: Pong back
STATUS                  = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1       = 0xf0f0f0f0d2 0xf0f0f0f0e1
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR                = 0xf0f0f0f0d2
RX_PW_P0-6 = 0x08 0x08 0x00 0x00 0x00 0x00
EN_AA                = 0x3f
EN_RXADDR = 0x03
RF_CH                = 0x4c
RF_SETUP = 0x07
CONFIG                 = 0x0f
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model                = nRF24L01
CRC Length = 16 bits
PA Power                = PA_HIGH

I appear to have different address results i the debug code, despite the sketch settin these to

Code:
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };

I'd appreciate any help here as I've spent hours on this and it's driving me nuts just not being able to get the default example to work, before I start trying to use these to transmit some small packets of data back to a root node with Ethernet and on into web based system.
Pages: 1 ... 36 37 [38]