Microduino-nRF24 wireless transceiver module (HCMIDU0006)

Microduino products. *** DISCONTINUED ***
Post Reply
admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Microduino-nRF24 wireless transceiver module (HCMIDU0006)

Post by admin » Sat Jun 01, 2013 7:26 pm

Image
Image
Image
Image
HCMIDU0007 1/4 wavelength SMA antenna (supplied separately)

Description:

Microduino-nRF24 as a high-speed embedded wireless module which interfaces directly to the Microduino Core and Core+ boards. This module uses the commonly used Nordic nRF24L01+ 2.4GHz wireless transceiver chip.
  • 2.4GHz worldwide ISM bands, the maximum transmit power 0dBm, license-free use
    Support six channels of data reception
    Low operating voltage: 1.9 ~ 3.6V low voltage operation
    High Rate: 2Mbps, since the air transmission time is very short, greatly reducing the radio transmission of the collisions (software setting 256Kbps, 1Mbps or air transmission rate of 2Mbps)
    Multi-frequency: 125 frequency points, multi-point communication and frequency hopping to meet the communication needs
    Low power consumption: When working in answer mode communication, rapid air transport and the start-up time, which greatly reduces the current consumption.
    Low application cost: NRF24L01 RF protocol that integrates all associated with high-speed signal processing section, such as: automatic retransmission of lost packets and
    automatically generate response signals, NRF24L01 SPI interface can be used to connect the microcontroller hardware SPI port or microcontroller I / O port simulation, internal FIFO can be used with a variety of high speed microprocessor interface, easy to use low-cost microcontrollers.
    Easy software development: Since the link layer is completely integrated in the module, and is very easy to develop.
    Automatic retransmission function, automatic detection and retransmission of lost packets, retransmission times and the number of retransmissions can be software controlled.
    Automatic answering function, valid data is received, the module automatically sends a response signal, without additional programming
    Carrier Detect - Fixed frequency detection
    Built-in hardware CRC error detection and multipoint communication address control
    Packet transmission error counter and hopping carrier detection function can be used to set
    Can also set six channel receiver channel address can be selectively opened receive channel

nRF24 Module Pin Connections:
INT..........D2
CSN.........D9
CE...........D10
SO...........D11
SI............D12
SCK..........D13
IN............3.3V


Microduino-nRF24 Module Schematic:
HCMIDU0003_Microduino_nRF24_Module_Schematic.png
Microduino-nRF24 Module PCB:

Image


Example Sensor Sketch (mirf library):

Code: Select all

/* FILE:    Microduino_nRF24L01_Transceiver_Module_HCMIDU0006_Sensor_Example
*  DATE:    03/06/13
*  VERSION: 0.1
*
* This is an example of how to use the Hobby Components Microduino nRF24L01 2.4GHz 
* wireless transceiver (HCMIDU0006). This transceiver module is a very cost effective
* way to transmit data from one microcontroller to another over short distances. This
* simple example will configure the module using the freely available Mirf library
* to transmit the analogue value from analogue input A0 to a remote module.
*
*
* You may copy, alter and reuse this code in any way you like, but please leave 
* reference to HobbyComponents.com in your comments if you redistribute this code. 
* This software may not be used directly for the purpose of selling products that 
* directly compete with Hobby Components Ltd's own range of products. 
*
* THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER 
* EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF 
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
* HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES, 
* INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY 
* REASON WHATSOEVER.
*
*/

/* Include the SPI anf Mirf libraries */
#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>

/* Stores the current analogue input value */
unsigned int uiData;

void setup(){
  Serial.begin(9600);

  /* Define the DIO used for SPI CSN & CE. Defaults are DIO
  *  10 & 9 respectively. */ 
  Mirf.cePin = 9;
  Mirf.csnPin = 10;
 
  Mirf.spi = &MirfHardwareSpi;
 
  /* Initialise the module */
  Mirf.init();
 
  /* Set the receiving address of this module. This must be a 5 byte
  *  character string */
  Mirf.setRADDR((byte *)"SENS1");
 
  /* Set the payload length to size unsigned int (size of data from
  *  the analogue input A0) */
  Mirf.payload = sizeof(uiData);
  
  /* Set the channel. Channel 90 = 2.490GHz */
  Mirf.channel = 90;
 
  /* Configure the module */
  Mirf.config();
 
  Serial.println("Module initialised");
}


/******* Main Program ********/
void loop()
{
  /* Set transmit address to client module 1 */
  Mirf.setTADDR((byte *)"CLI01");
 
  /* Read the analogue input A0... */
  uiData = analogRead(A0);
 
  Serial.print("Sending: ");
  Serial.println(uiData);
 
  /* ...and send it to the client */
  Mirf.send((byte *)&uiData);
 
  /* Wait for module to finish sending */
  while(Mirf.isSending());
 
  /* Wait a little */
  delay(1000);
}
 

Example Client Sketch (mirf library):

Code: Select all

/* FILE:    Microduino_nRF24L01_Transceiver_Module_HCMIDU0006_CLient_Example
*  DATE:    03/06/13
*  VERSION: 0.1
*
* This is an example of how to use the Hobby Components Microduino nRF24L01 2.4GHz 
* wireless transceiver (HCMIDU0006). This transceiver module is a very cost effective 
* way to transmit data from one microcontroller to another over short distances. This
* simple example will configure the module using the freely available Mirf library
* to receive the analogue value from analogue input A0 on a remote module.
*
*
* You may copy, alter and reuse this code in any way you like, but please leave 
* reference to HobbyComponents.com in your comments if you redistribute this code. 
* This software may not be used directly for the purpose of selling products that 
* directly compete with Hobby Components Ltd's own range of products. 
*
* THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER 
* EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF 
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
* HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES, 
* INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY 
* REASON WHATSOEVER.
*
*/

/* Include the SPI anf Mirf libraries */
#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>

/* Stores the current analogue input value */
unsigned int uiData;


void setup(){
  Serial.begin(9600);

  /* Define the DIO used to SPI CSN & CE. Defaults are DIO
  *  10 & 9 respectively. */ 
  Mirf.cePin = 9;
  Mirf.csnPin = 10;
 
  Mirf.spi = &MirfHardwareSpi;
 
  /* Initialise the module */
  Mirf.init();
 
  /* Set the receiving address of this module. This must be a 5 byte
  *  character string */
  
  Mirf.setRADDR((byte *)"CLI01");
 
  /* Set the payload length to size unsigned int (size of data from
  *  the analogue input A0) */
  Mirf.payload = sizeof(uiData);
 
  /* Set the channel. Channel 90 = 2.490GHz */
  Mirf.channel = 90;
 
  /* Configure the module */
  Mirf.config();
 
  Serial.println("Listening...");
}


/******* Main Program ********/
void loop()
{
  
  /* If we are not currently sending an there is new data available
   * then get the new data and output it to the UART */   
  if(!Mirf.isSending() && Mirf.dataReady()){

    /* Get the data from the receive buffer */
    Mirf.getData((byte *) &uiData);
    
    /* And output it to the UART */
    Serial.print("Got packet:  ");
    Serial.println(uiData);
  }
}
Arduino Mirf Library:
Mirf.zip
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “Microduino”