In my apartment all of my lights are controlled via an outlet. These outlets are not connected to a light switch. As a first step towards convenience I purchased an EtekCity wireless outlet and switch. Every Friday these lights are put on a timer until Saturday night. That meant removing the existing outlet adapter and putting on one of the lovely cheap timers for the day. The timers only have a 24 hour cycle so it did not make sense to leave them on for the rest of the week. Within the timer there is also an audible mechanical clicking. There had to be a better solution.
Of course! I already have a wireless light switch. Why not somehow interface with it? A quick search on a hackaday lead me to others who have done similar, such as this and this. It was possible and not too hard.
In this article I will examine Serial In Parallel Out (SIPO) shift registers. These are very useful for microcontroller projects. This type of register allows you to turn three output pins into as many as you would like. I will explain the theory behind the registers and give an actual implementation. As a working example we want to drive 16 pins for a clock application using as few pins on the microcontroller as possible.
A lot has changed since my last Nixie Clock post in 2010. Using Eagle I had a prototype board made through 4PCB, unaware of their Student $33 Each deal; If you are a student use this! After soldering in all the components and testing the circuit it turned out that multiplexing was not a good decision. I was unable to switch at a high enough frequency while maximizing ignition of the tubes. In other words, I would either see the numbers scrolling in a bright neon light or I would see all at once in a dim neon light. Unfortunately there was no software fix. Discouraged and busy the project was dead until about 6 months ago.
Radio Frequency Identification, or RFID, is a technology slowly being incorporated more and more into daily life. The uses for RFID are endless as the technology becomes smaller, cheaper and more versatile. If you don’t know what RFID is, you'll soon find out!
RFID is a wireless identification system that can be viewed like a phone conversation. For a phone conversation to work, we need two telephones, one phone is used to dial and the other one receives the call. Imagine this is a phone call between an automated dialing system and you. In an RFID system, the phone dialing is a called a “reader” and the phone receiving is called a “tag.” The reader acts much like an automated dialer, where it can call any number of phones at once. Instead of the tag saying “hello,” as you would, it will respond with a list of numbers. The numbers are the identification of that tag, and only that tag. Now much like you will hang up once you hear its an automated system asking you for money, the reader ends the conversation with the tag.
In recent years, many commercial applications of RFID have been released. For example, Mobil Speedpass uses RFID. Have you ever rented a ZipCar? The key used to unlock the car uses RFID. It is becoming standard for cars today to allow you to lock, unlock and start the car without inserting the key.
RFID systems have become a common replacement for keys around the workplace. The conventional lock on a door can be replaced by an RFID system. A tag is used to authenticate the person and unlock the door. A tag does not require any power, so there are no batteries, and can be smaller than a dime. It is commonly used inside a credit card-sized piece of plastic. The size of a reader can vary from a handheld device to the size of a doorknob.
The beauty of using an RFID system as a key is access management and access history. The readers can be programmed to only allow certain tags, or people, into certain rooms. If an employee quits the company, his tag number can simply be removed from the system. There is never worry about losing keys or wondering who has what key. With a tag costing only cents, it is very easy to add or remove access to a room. The readers also record each person who entered the room and at what time. This is useful if there is a security breach of any kind.
Some RFID tags are designed to be implanted under the skin. It is very common in Europe and the USA for pets that are adopted to have a tag, called a microchip in this context, implanted in them. The microchip is smaller than a grain of rice and can be implanted into a pet the same way a vaccine is. When scanned, the identification of the pet can be looked up in a database. The idea is that any pet can be traced back to its rightful owner if it is lost or stolen. You can read more about pets and microchips here.
Other people have had tags implanted under their own skin. Generally the location of the implant is in between the thumb and index finger. Implants in humans are not widely used. There is speculation regarding RFID causing cancer in the tissue surrounding the implant. If you really don't want to carry around money or identification, there is a club in Barcelona which will scan you instead. With some modification, you can even start and unlock your car with the same implant.
The future of RFID holds many great possibilities. One of these possibilities is the much needed modernization of bar codes. A bar code must be scanned individually and put directly in front of the scanner. When going to the grocery store, every item must be scanned one by one. With RFID, the food could be scanned without even having to leave the basket. Not only that, all the items could be scanned simultaneously.
There is also a lot of interest in putting tags into paper products, i.e. passports and checks. If you are interested in a detailed breakdown of this new technology here is a Citizendium article I wrote for a writing class of mine.
For more information:
- RSA Laboratories
- Though very technical, securerf is a well-written blog regarding security and privacy.
- VeriChip, now named PositiveID, designed the human implantable chip
Want to start playing around with RFID on your own? Simple RFID access system
I wanted to give an updated on my nixie clock. I've been very busy with classes the last few months but I have had some time to work on the clock. I have created a prototype that will effectively test the majority of the circuit and all the microcontroller related functions.
I'm using a 7SEG display in place of the nixie tubes. This is because the nixie tubes do not fit in the protoboard easily. This substution still replicates the final design in implementation because all the displays are hooked up the same as the nixie tube. Each digit has a transistor connected to it's anode. The 74LS chip which drives the digits also has a BCD input, the same as the 74141. One of the ICs are comprised of NOT gates. I needed to flip the output of the 74LS driver to work correctly with the active low inputs of the 7SEG displays. The displays are hooked up all multiplexed and turned on individually in the same manner the nixie tubes will be.
You can also see the two pushbuttons which are used for setting functions. The MAX232 which is used to convert the RS-232 voltages to TTL level for the PIC. The clock OSC on the PIC is using the simple RC method as outlined in the datasheet. I wanted to get some testing done and have yet to determine which crystal/cap combo I will be using.
Also the programmer I am using is from a company called Cana Kit and functions the same as the PIC Kit 2. Here is the link on SparkFun, although I purchased it on eBay for cheaper. It is working great for programming and in-circuit debugging (ICD).
I am going to be sparse with the details but I am getting closer and closer to ordering a real prototype PCB and getting things started!
Nixie tubes are awesome. Nixie tubes are the LEDs of the past. They were used in devices such as calculators. The inside of the tube is filled with gas, usually neon. To ignite the neon you need a high voltage, usually 150VDC or more. I plan on making a nixie clock. I've had these tubes for a while but have not had the time to play around with them. I really wanted to see the nixie in action, so I made a counter with the supplies I had on hand.
I will run through the devices and what they do, starting from the power source.
Power Source: The AC outlet is hooked to a transformer that outputs 12VDC. I chose 12VDC supply because it's perfect for driving the high voltage power supply (HVPSU) as well as the Arduino. There is a potentiometer in the schematic which I used to drop the voltage down to 5V. This is because the 74141 and its inputs are powered by 5V. Each common ground in the picture is connected to the 12VDC ground.
High Voltage Power Supply: This was purchased from All Spectrum Electronics. The input comes from the 12VDC and the output connects to the anode of the Z573M. WARNING: HIGH VOLTAGES ARE DANGEROUS AND CAN HURT/KILL YOU. If you don't know what you're doing, find someone who does before playing with high voltages.
Arduino Nano: This is where the binary count comes from. In the program I made a simple function called output which would output the number given to specific ports on the Arduino. You can view the code here.
2N2222A: The Arduino Nano outputs do not have sufficient power to drive the 74141 inputs. To make the outputs of the Arduino actually do something I had to hook them up to transistors. Each transistor is set up as a switch. There is 5V going into the collector of each transistor. When there is current going through the base it will turn on the transistor. Each base is hooked up to the outputs of the Arduino. The emitter is connected both to a 1kΩ resistor and the input on the 74141. The 1kΩ resistor is called a pulldown resistor. The pulldown resistor is used because the 74141 can not have a floating voltage. This way, when the transistor is off, the input on the 74141 will be coming from ground, which is 0V. When the transistor is turned on, the 5V will go from the collector to the emitter. The remaining voltage of 4.3 (~0.7V drop over the base of the transistor) at the emitter will be dropped over both the pulldown resistor and the input of the 74141.
74141: This IC allows you to input a number in binary format. You input the number in Binary Coded Decimal (BCD) format and it outputs in decimal format. The IC is designed to drive HV nixie tubes which have decimal cathodes. I will explain how this works a little bit more. We have 147V going into the nixie tube anode. Current flows from the anode to the cathode. Each cathode of the nixie tube connects to a pin on the 74141. Remember, you need a difference in voltage potential through a device for current to flow. So for example, when we want the number zero to display on the nixie tube, the only pin we want to have a voltage difference at is pin zero. That is why, as you can see in the datasheet, when an output is ON, it's at ~3V, all other outputs are at ~70V. Therefore the only pin with a large enough voltage drop to ignite the neon is the number zero.
Z573M: The cathodes are k0 through k9. These are all hooked to the 74141. The anode is hooked to the HVPSU through a current limiting resistor of 10KΩ. In the datasheet you can see there is a pin for IC and dp. The dp pin turns on the decimal point which is to the bottom right of the number. The IC visually does the same as dp. I'm not sure if there is any other purpose for it.