Day 1

I am Captain Douglas Adams of the Starship Heart of Stainless Steel.   Our ship suffered today from a meteor shower and crashed on a planet.  I can’t open the screens to find out where are.   The cabin door from the command deck is not opening.  I found my old computer with a very old operating system on it and my parts box.  First project will be fixing the door controller. In my kit is an Arduino Mega 2560, RFID DC522 reader, some key fobs and key cards.  A bundle of other components.  So lets get started.

Fixing the door controller

The key fobs and key cards are now labelled 1 to 6.   The RFID RC522 is connected to the Arduino Mega board.  In the kit were two I2C LCD screens.  They are connected to the I2C bus.  The kit contained two old style 9V 1A power supplies and some bread board power supplies (BBPS).  I set the BBPS to 5V and 3.3V.   To see what is going on, I rigged up a RGB LED and a 220 Ω resistor array.

Arduino MEGA 2560

WOW! Look at the Arduino Mega 2560.  It has many pins to create circuits with.  I can rig up some LEDs later for lighting with switches.  It has a jack for the 9V 1A power supply.  I can get 700mA from it.  

Where to start?

In my kit was a flash light and some batteries.   At least, I can see what is going on.  The instruments are dead.  No lights in the command deck.   My crew is banging on the door.   First thing is open the door controller panel and see what I can do.   Well, its fried!  I can salvage some of the components.  

What is a resistor array?

Inside the package is 8 resistors in a column.  Instead of using 3 x 220 Ω resistors for the RGB LED, I use one of these IC chips.

What is an RGB LED?

An RGB LED is a fancy 3 color LED that uses 0-255  per LED to create colors.  16,777,216 colors are possible.  Red is (255,0,0), Blue is (0,0,255), Lime(Green) is (0,255,0).   Common Anode is the ground.  You put it to the ground bar.   

Let’s build the open controller circuit and program the RFID fobs and cards

RFID-RC522 

This device will be perfect for the command deck door circuit.   I can program the code for the 3 key fobs for my crew and three extra key cards.  

BBPS:  Bread Board Power Supply

WOW! my parts kits gets better and better.   This nifty device is a bread board power supply.  Capable of 700mA output.  I can program either side of the breadboard to 3.3V or 5V.  It has a white on/off switch. 

These jumpers have 3.3V and 5V along with ground pins for output devices.  

I2C LCD 20×4

The I2C LCD 20×4 device has 4 pins. I2C bus pins SDA (Data) and SCL (Clock).  The other two pins are VCC (5V) and Ground.  It takes less wiring than a standard LCD.  The coding is more elegant. 

Let’s start building

You look closely at the first picture, you see a second row of bus pins.  I added them for the I2C bus.  

I took my design and built it in Fritzling.  I know many users wants schematics.  Fritzling didn’t allow me to cut the bus connector from the second breadboard.   I will be creating a Fritzling breadboard design with the second row.  

Captain Douglas Adams, 2 Officers, and his Engineer have access to the command center.  The RGB LED will be green for access granted and red for access denied.  It turns blue for scan…

I used the dumpinfo.ino in mfrc522 folder to get the HEX addresses for each of the key fobs and key cards.  The program converts them to the integer strings.  The text file above is up to date.  

array for crew
1 1701796041 Capt. Douglas Adams AA B3 3C 29 Granted
2 23715925245 Lt. Ford Prefect ED 9F FC 2D  Granted
3 2027724463 Sgt. Authur Dent CA 4D F4 3F  Granted
4 162814481 Eng. Kieran McKenney A2 51 2C 51 Denied
5 16711203167 Blank Blank Blank A7 0B CB A7  Denied
6 18358204167 Blank Blank Blank B7 3A CC A7 Denied

String crew[rows][columns] = { { “1”, “1701796041”, “Capt.”, “Douglas”, “Adams”, “AA”, “B3”, “3C”, “29”, “Granted”},
{ “2”, “23715925245”, “Lt.”, “Ford”, “Prefect”, “ED”, “9F”, “FC”, “2D”, “Granted” },
{ “3”, “2027724463”, “Sgt.”, “Authur”, “Dent”, “CA”, “4D”, “F4”, “3F” , “Granted”},
{ “4”, “162814481”, “Blank”, “Blank”, “Blank”, “A2”, “51”, “2C”, “51”, “Granted” },
{ “5”, “16711203167”, “Blank”, “Blank”, “Blank”, “A7”, “0B”, “CB”, “A7”, “Denied”},
{ “6”, “18358204167”, “Blank”, “Blank”, “Blank”, “B7”, “3A”, “CC”, “A7”, “Denied”} };