Difference between revisions of "RF Cheater"

From Kevin Darrah Wiki
Jump to: navigation, search
 
(12 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
== Introduction ==
 
== Introduction ==
 
The RF Cheater Board is a simple breakout board for the ([https://www.nordicsemi.com/kor/Products/2.4GHz-RF/nRF24L01P NRF24L01+ 2.4GHz Transceiver Module]) and ([http://www.esp8266.com ESP8266 WiFi Module]).  The board was designed to plug right on top of the [[Cheater_Board | Cheater Board]]
 
The RF Cheater Board is a simple breakout board for the ([https://www.nordicsemi.com/kor/Products/2.4GHz-RF/nRF24L01P NRF24L01+ 2.4GHz Transceiver Module]) and ([http://www.esp8266.com ESP8266 WiFi Module]).  The board was designed to plug right on top of the [[Cheater_Board | Cheater Board]]
 +
 
Features of the board:
 
Features of the board:
 
* Supports the low cost WiFi module ESP-01.  Search for ESP-01 in eBay or Amazon.  I have seen these go for as low as $3USD
 
* Supports the low cost WiFi module ESP-01.  Search for ESP-01 in eBay or Amazon.  I have seen these go for as low as $3USD
Line 8: Line 9:
 
* Interface pins for both NRF24L01+ and ESP8266 routed to ATMEGA328, to allow for communication with the your local network of 'things' and then out to the 'cloud' via WiFi
 
* Interface pins for both NRF24L01+ and ESP8266 routed to ATMEGA328, to allow for communication with the your local network of 'things' and then out to the 'cloud' via WiFi
 
* Standalone 'bare metal' programming of the ESP8266 via a header USB-Serial interface.  Pushbuttons connected to allow for programming modes of the ESP8266.
 
* Standalone 'bare metal' programming of the ESP8266 via a header USB-Serial interface.  Pushbuttons connected to allow for programming modes of the ESP8266.
* Board runs at 3.3V only!
+
* Board runs at 3.3V only! be sure to run the Cheater board at 3.3V, since there are no level shifters between the radio modules and the ATMEGA328 microcontroller.
  
 
[[File:RFCheater.png|150px]]
 
[[File:RFCheater.png|150px]]
Line 22: Line 23:
 
[[File:RFCheaterBareBoard.png|150px]]
 
[[File:RFCheaterBareBoard.png|150px]]
  
The board can be assembled easily, since it only consists of through hole components, then it looks like this:
+
The board can be assembled easily, since it only consists of through hole components, then it looks like this, then with the Radio Modules installed as mounted on the Cheater Board:
 
 
[[File:RFCheaterAssy.png|150px]]
 
 
 
It is up to you to order the parts.  The list can be downloaded [http://www.kevindarrah.com/wp-content/uploads/2016/02/Cheater_v2_BOM.xlsx **HERE**].  This can be directly uploaded into  [https://www.digikey.com Digikey] if you'd like, but not all parts are absolutely necessary.  Here's the description for each part:
 
 
 
'''Electrolytic Capacitor'''
 
 
 
[[File:Electrolytic Capacitor.png|150px]]
 
 
 
Be careful placing the electrolytic capacitor!  This is a polarized part, meaning that it must go in only one way.  The stripe on the side of the capacitor indicates the negative terminal.  The board has '+' marking indicating that this is the positive terminal.  Do not connect this backwards!  The capacitor is used as a filter to provide a clean voltage for the Microcontroller.
 
 
 
'''0.1uF Ceramic Capacitors'''
 
 
 
[[File:0.1uF Ceramic Capacitors.png|150px]]
 
 
 
There are two 0.1uF capacitors on the board.  The one to the left is used for programming the microcontroller from the Arduino IDE.  It connects between the Reset pin of the Micro and the DTR/RTS pin of the USB-Serial converter.  A low pulse is passed through this capacitor placing the microcontroller in a Reset state, thus allowing it to be programmed via the Serial Port.  The capacitor to the right provides further filtering of the DC voltage for the microcontroller. Ideally this capacitor would be placed as close to the VCC pins of the Microcontroller as possible.  A good rule of thumb is to use one 0.1uF capacitor for every VCC pin on the device.  Having said that, two 0.1uF capacitors should be used here - one for the VCC pin on the left, and another for the AVCC pin on the right.  As an evaluation/test board, this is okay, and the board should work reliable as is.  Note that these capacitors will look almost exactly like the 22pF capacitors, so pay attention to the markings on them - you should see 104.  Also, these are not polarized, so they can go in either way. 
 
 
 
''' 16MHz Crystal'''
 
 
 
[[File:16MHz Crystal.png|150px]]
 
 
 
The 16MHz Crystal is used to clock the microcontroller.  As an alternate, an 8MHz Crystal can be used, but a different boot loader needs to be programmed in order for timing functions to work as expected.  A suitable 8MHz Crystal is the [https://www.digikey.com/product-detail/en/ATS080B/CTX900-ND/2292868 ATS080B].  This part is not polarized and can go in either way.
 
 
 
'''x2 22pF Capacitors for Crystal'''
 
 
 
[[File:x2 22pF Capacitors for Crystal.png|150px]]
 
 
 
These two capacitors are used to match the load capacitance of the crystal, which tunes the oscillator to allow the clock of the Microcontroller to run reliably.  These are not polarized components, so they can go in either way.  Make sure you don't mx these up with the 0.1uF capacitors.  You should see a "22" marking indicating 22pF.
 
 
 
'''10k Ohm Resitor for Reset Pin'''
 
 
 
[[File:10k Ohm Resitor for Reset Pin.png|150px]]
 
 
 
This resistor is used as a pull-up on the Reset pin of the Microcontroller to keep it out of reset, which means that it can run.  The resistor color code is Brown Black Orange - the tolerance is not important.  Not a polarized part and can go in either way. 
 
 
 
'''ATMEGA328 MCU and 28pin Socket for MCU'''
 
 
 
[[File:ATMEGA328 MCU.png|150px]]
 
 
 
It is up to you if you'd like to use a socket or not for the Microcontroller.  It comes in handy if you ever make a mistake like connecting the voltage up backwards, over voltage, short circuit output, etc... Then you can simply swap out the Microcontroller.  The only problem with the socket is that it can be tricky to get the 28 pins to all line up in the socket.  Be careful with the orientation of the Microcontroller - make sure pin 1 on the Micro matches pin 1 on the board.
 
 
 
'''right angle 6 pin male header'''
 
 
 
[[File:right angle 6 pin male header.png|150px]]
 
 
 
The right angle 6 pin male header is used for programming the Microcontroller from the Arduino IDE.  Most USB to Serial adapters are compatible with the board, but make sure that the pinout matches what is printed on the board. 
 
 
 
'''vertical 6 pin female headers, vertical 4 pin female header, vertical 5 pin female header'''
 
 
 
[[File:vertical 4 pin female header.png|150px]]
 
 
 
The female headers on the board allow wire-board connections to be made.  They are not absolutely necessary, especially if the board is to be used for a permanent installation.  In that case, wires may be soldered directly to the board. 
 
 
 
[[File:wBreadBoard.jpg|150px]]
 
 
 
'''3x2 ICSP header MALE, 3x2 ICSP header FEMALE'''
 
 
 
[[File:3x2 ICSP header MALE.png|150px]]
 
 
 
Be sure to solder the female 3x2 female header to the board.  The 3x2 male header serves as an adapter for ribbon cable IDC type connections to the ICSP header.  This connector is used to program the Microcontroller via the native ICSP port - for Arduino compatible applications, this port is used for programming the boot loader.
 
 
 
'''optional - rubber feet'''
 
 
 
[[File:bottomBoard.jpg|150px]]
 
 
 
The rubber feet add a nice convenience to working with the board.  It keeps the board from sliding around the bench and from the sharp pins on the bottom of the board from scratching up the work surface.  Note that in order for the rubber feet to be effective, all of the pins must be cut very close to the board. This includes the 28 pins from the microcontroller and all of the headers.
 
 
 
== Programming ==
 
 
 
====ICSP - Boot loader====
 
 
 
The ICSP programming header can be used to program the Bootloader to the Microcontroller.  This makes the board compatible with the Arduino IDE.  The Female header on the board can be wired over to another Arduino Compatible board running Nick Gammon's [http://www.gammon.com.au/bootloader ATMEGA Board Programmer Sketch].  The board may also be programmed with an IDC type ribbon cable from another Arduino, but the 3x2 male header must be used:
 
  
[[File:icspheader.jpg|200px]] [[File:icspcable.jpg|200px]]  
+
[[File:RFCheaterAssy.png|150px]] [[File:RFCheaterAngleView.png|600px]]
  
Here is a video to explain this process.  
+
=== Parts ===
{{#evt:
+
It is up to you to order the parts. The list can be downloaded [http://www.kevindarrah.com/wp-content/uploads/2016/04/RFCheater_v2_BOM.xlsx **HERE**].  This can be directly uploaded into  [https://www.digikey.com Digikey] if you'd like.  The parts are pretty self explanatory - make sure that you pay attention to which way the Radio Modules plug into the board.  There are markings/text on the board indicating which header each module should be used for.
service=youtube
 
|id=https://www.youtube.com/watch?v=dpgcBsl9D4k
 
|dimensions=560x315
 
}}
 
Use the Arduino Mini from the drop down when running at 16MHz, and the Arduino Pro (ATMEGA 8MHz) when running at 8MHz.
 
====Serial Port - Arduino IDE====
 
  
Once the Bootloader is programmed, a USB-Serial converter can be used to program the Microcontroller from the Arduino IDE.  Make sure the pinout of the USB-Serial converter matches the text on the board.  Note that TX and RX are referenced to this board, so the converter used should line up like: TX -> RX and RX <- TX  The DTR pin may also be compatible with an RTS pin provided by the converter. 
+
== Pin Out ==
 +
ESP8266:
 +
* TX from the ESP8266 goes to Arduino Pin 6 - pin 6 would be a Software Serial RX
 +
* RX to the ESP8266 comes from Arduino Pin 7 - pin 7 would be a Software Serial TX
 +
* GPIO 2 is not connected
 +
* GPIO 0 is connected to one of the pushbuttons (under the ESP8266) pulled LOW when pressed - floating when not pressed
 +
* RESET is connected to the other pushbutton (under the NRF24L01+) pulled LOW when pressed
  
[[File:wProgrammer.jpg|150px]]
+
NRF24L01+:
 +
* IRQ is connected to Arduino Pin 2 - Interrupt 0
 +
* CE is connected to Arduino Pin 4
 +
* CSN is connected to Arduino Pin 5
 +
* CLOCK is connected to Arduino Pin 13
 +
* MOSI is connected to Arduino Pin 11
 +
* MISO is connected to Arduino Pin 12
 +
* Note that Arduino Pin 10 will not be useable, since the NRF24L01+ communicates via SPI, thus making the SS (Slave Select) pin not useable - there may be workarounds for this.
  
An FTDI based USB to Serial Converter is recommended.  See my contact page if you're interested in the one I designed - as shown in the picture above.  Supports 5V & 3.3V systems, and a jumper to connect/disconnect power to the target.
+
== Test Code ==
 +
Coming soon!

Latest revision as of 14:11, 4 April 2016

...Back to Projects

Introduction

The RF Cheater Board is a simple breakout board for the (NRF24L01+ 2.4GHz Transceiver Module) and (ESP8266 WiFi Module). The board was designed to plug right on top of the Cheater Board

Features of the board:

  • Supports the low cost WiFi module ESP-01. Search for ESP-01 in eBay or Amazon. I have seen these go for as low as $3USD
  • Supports the NRF24L01+ 2.4GHz Wireless Transceiver. Great for point-point or local mesh networks. See pictures below for reference to which module is supported.
  • Interface pins for both NRF24L01+ and ESP8266 routed to ATMEGA328, to allow for communication with the your local network of 'things' and then out to the 'cloud' via WiFi
  • Standalone 'bare metal' programming of the ESP8266 via a header USB-Serial interface. Pushbuttons connected to allow for programming modes of the ESP8266.
  • Board runs at 3.3V only! be sure to run the Cheater board at 3.3V, since there are no level shifters between the radio modules and the ATMEGA328 microcontroller.

RFCheater.png

Here's the schematic for reference:

RFCheaterSCH.png

Assembly

The board ships as a bare board like this:

RFCheaterBareBoard.png

The board can be assembled easily, since it only consists of through hole components, then it looks like this, then with the Radio Modules installed as mounted on the Cheater Board:

RFCheaterAssy.png RFCheaterAngleView.png

Parts

It is up to you to order the parts. The list can be downloaded **HERE**. This can be directly uploaded into Digikey if you'd like. The parts are pretty self explanatory - make sure that you pay attention to which way the Radio Modules plug into the board. There are markings/text on the board indicating which header each module should be used for.

Pin Out

ESP8266:

  • TX from the ESP8266 goes to Arduino Pin 6 - pin 6 would be a Software Serial RX
  • RX to the ESP8266 comes from Arduino Pin 7 - pin 7 would be a Software Serial TX
  • GPIO 2 is not connected
  • GPIO 0 is connected to one of the pushbuttons (under the ESP8266) pulled LOW when pressed - floating when not pressed
  • RESET is connected to the other pushbutton (under the NRF24L01+) pulled LOW when pressed

NRF24L01+:

  • IRQ is connected to Arduino Pin 2 - Interrupt 0
  • CE is connected to Arduino Pin 4
  • CSN is connected to Arduino Pin 5
  • CLOCK is connected to Arduino Pin 13
  • MOSI is connected to Arduino Pin 11
  • MISO is connected to Arduino Pin 12
  • Note that Arduino Pin 10 will not be useable, since the NRF24L01+ communicates via SPI, thus making the SS (Slave Select) pin not useable - there may be workarounds for this.

Test Code

Coming soon!