If you are looking for an inexpensive graphical interface for your Arduino, this could be it. Our 2.4″ Colour TFT display, has a four wire resistive touch screen, a micro SD card socket, and a convenient arduino shield footprint. To help you get going we have provided some example code, which can be downloaded here.
Screen Size : 2.4 inch
Resolution : 240 x 320
LCD Color : 65k
LCD Driver : ST7781
Interface : 8080 8 data bit with 4 control bits
Touchscreen : 4 Wire Resistive Touchscreen
Arduino Pin Connections
LCD Shield Pin
LCD Control / Touch Data
LCD Control / Touch Data
LCD_D6 / TOUCH XP
LCD Data/ Touch Data
LCD_D7 / TOUCH YM
LCD Data / Touch Data
How To Use.
WARNING.The USB B-type port on the Arduino Uno R3 is taller then the headers on the board. As a result, many shields, including this one can contact the metal shielding of the USB port, causing damage. The simplest way to avoid this is to place a piece of electrical tape, or Kapton tape, on top of the USB port to insulate it.
As with all Arduino Shields, connecting to the arduino is simply a matter of plugging the shield in. Take care to align the pins correctly, and ensure the bottom of the shield does not make contact with the Arduino USB port.
We have modified the open source Adafruit-TFTLCD library to work with the pin arrangement, and ST7781 Controller used bu this shield. Examining the examples should give a fair idea of how use these, however we are always happy to answer relevant questions. The original library was written to work with a range of different controllers and shields. While this is convenient for using boards interchangeably, we decided to strip it back to just what was needed for this shield and the ST7781 controller, rather than extend it to include one more shield. This should make the memory footprint smaller, and the code a little faster. We will continue to improve this as time permits. To use the demonstration code, download the library from here, and extract. Copy the folder “SWTFT-Shield” from the extracted archive to your arduino Libraries folder. You will also need to install the :
The first thing to do is to download the drivers. The latest version will be available from the Silicon Labs Download Page. You will need to unzip the archive before installing the driver.
Once the driver installation has completed, you can plug the CP2102 module into your USB port to confirm that your computer recognizes your new hardware.
Be sure to remove your CP2102 module from your USB port before connecting it to your Pro Mini.
For this example, I am using the cable provided with the module to connect with the Pro
Mini. If you have installed female headers to your Pro Mini, you can plug the CP2102 module directly into those. The important thing is to get the correct pins connected.
Once the CP2102 module and the Pro Mini are connected, its time to plug them back into the USB and fire up the Arduino IDE.
I tend to do a quick test of my setup, using the demonstration program Blink.
You will need to select the virtual com port from the drop down list. If there are a few, it may be necessary to try them until you find which one is your CP2102. Check that the processor option is set as 328p, and your board is set as Arduino Duemilanove.
Press upload, and after a few seconds, you should be rewarded with a flashing LED on the Pro Mini.
We stock a range of optically isolated relay modules. Although they come in different styles and footprints, they are all functionally identical.
These modules require 5V to drive the relay, and are suitable for switching up to 10 A 240V AC. The optical isolation will help to protect your control circuit from damage if something goes wrong at the business end of your project.
These modules are an active low configuration. Setting the input pin to sink current causes an infrared LED inside the EL817 Optocoupler to activate. This causes an internal phototransistor to turn on which in turn activates a transistor to switch on the relay.
This is the schematic for each channel. Click on the image to view it full size.
If you want complete optical isolation
Remove the jumper connecting VCC1 / VCC2 . On some models VCC2 is labeled VCCR.
Connect VCC1 to arduino (or other controller) 5V supply
Do NOT connect arduino ground to relay module
Connect a separate 5V power supply to VCC2 / GND2 to drive the relays
If you don’t require complete optical isolation
Jumper VCC1 / VCC2 together
Use one power supply to power the micro controller and the relay board
To Use With Arduino.
Connect arduino digital output to IN pin.
This is an “Active Low” configuration. The relay will be on when your output is low.
To ensure the relay starts switched off at power up, set your pin high before setting it as an output.
That will prevent it from starting in random states.
Most microcontroller outputs can only drive tiny loads. They are good to drive a few LEDs but for anything more, they need a little help. For servos and small motors, we can switch a transistor, which can handle the larger current. When we want to controll something more substantial than a that with our Microcontroller or Arduino, a Relay can be a cost effective solution.
These relay boards can handle 10A of up to 30V DC or 250V AC
The ATtiny2313 is an ideal mocrocontroller for many projects. With only 20 pins, it is relatively easy to build a PCB for, it is low cost, yet it is relatively powerful.
Some of features are
Up to 20 MIPS Throughput at 20 MHz or 10 MIPS at 10 MHz for the ATtiny2313V
2K of Flash
128 Bytes Eprom
128 Bytes Ram
One 8 bit and One 16 bit Timer/Counter with prescaler and compare modules
Four PWM outputs
USI Universal Serial Interface
USART – Full Duplex
SPI port for in system programming
Even with only 20 pins, breadboarding a microcontroller can be a bit of a pain, by the time you have your micro, a crystal and its caps, a reset button plus an ISP header, there isn’t a lot of room left for the rest your circuit.
This simple project makes life easier, by getting the micro and it’s support components off the breadboard and onto a nice little PCB.
To keep things simple, I have used a single sided PCB, and through hole components. I could have squashed averything together into a tiny package, but I don’t think there is any advantage in that for prototyping and experimenting. Also for simplicity I have brought all the pins to one side rather than the usual DIP format.
The circuit is pretty simple, but is all that is required for most modern microcontrollers. R1 keeps the reset pin at 5V unless it is pulled low by the reset button or the programmer, C3 helps filter the power supply. I am using an ATtiny2313V-10 with an 8 MHz crystal. This same configuration will work with an ATtiny2313 and a crystal up to 20MHz.
I have used Eagle PCB design software from Cadsoft. Their free version, available here is limited in some features, but is more than capable of handling anything most hobyiests will throw at it.
The layoput is pretty simple. I have left plenty of space for routing, and only have to add 2 jumper wires for unrouted tracks. The autorouting feature in eagle is pretty good.
I am using the Toner Transfer Method to etch the board, so for the bottom copper layer the image does not need to be reversed before printing.
For complete instructions on using the Toner Transfer Method see my post here.
After etching the board, I have used the same Method to label the top of the board. In this case the image needed to be printed reversed.
Since the board is single sided, the header pins needed to be pushed through from the top and soldered on the underside. To gain the extra length I have pushed the pins through their plastic support until they are flush at one end.
That’s pretty much all there is to it. After soldering the components in place, I have a useful prototyping / development board to quickly get projects up an running.
The “Toner Transfer” method is probably the simplest and most cost effective method to make high quality PCBs at home. With a little practice, any one with access to a laser printer, or photocopier, can make a quality board in around an hour. For the purpose of this tutorial, I am assuming you already have the means to design, and print your PCB.
Toner Transfer Paper
Copper Clad Blank PCB
Blue Painters Masking Tape
Isopropyl Alcohol (contact cleaner)
Lint Free Wipes ( coffee filters are cheap and work well)
Fine Sandpaper (1200 or similar)
Ammonium Persulphate Or similar
I can’t stress enough that cleanliness is the key to success. Fingerprints, dust, oxidation, even fibres or a hair can cause problems.
Mark a piece of paper in your printers tray, so you can identify the direction easily then print your PCB design.
Cut a piece of Toner Transfer Paper a little larger than your artwork, and tape it to the sheet of paper you printed covering your design. You need to have the shiny side facing up. Tape it top and bottom, making sure that the corners are taped down and the tape is cleanly fixed to the paper. Folded back corners may cause the paper to jam or tear in the printer, or allow adhesive from the tape to stick to the print rollers.
At this stage I usually wipe the surface of the Toner Transfer Paper lightly with a lint free cloth that has been slightly dampened with Isopropyl Alcohol on. This is not always necessary, but will remove any fingermarks, and helps with some printers that struggle to print cleanly on the glossy surface.
Place the paper in the print tray and reprint your design. If you have put the paper in the printer the right way around, You will now have your pattern in the middle of your Toner Transfer Film, ready to be transfered to your board.
Your blank PCB should be cut to the correct size, and any rough edges and corners should be smoothed with sandpaper. It is essential that the top edges are not rough. Clean the copper surface under running water, first with detergent, then with fine sandpaper. I find 1200 grade wet and dry paper works well. Sand until the surface is shiny all over, but don’t sand away too much of the copper. Dry the board with a lint free cloth, and then clean the copper with acetone or isopropyl alcohol and another lint free cloth.
The iron will need to be heated quite high, and should NOT be set to steam. I use the “cotton” setting on mine .Place the blank on a heat resistant surface and position the toner transfer paper with the toner against the copper. Hold it in place and press down on one side with the iron. Around 20 seconds will stick the transfer paper in position. Now press the iron down over the entire board. Hold firm downwards pressure for 30 – 40 seconds before removing. Don’t slide the iron around or you will smudge your image, and firm pressure is all that is needed.
Cool the board and paper under running water then slowly peel the toner transfer film away from the board. Start with one corner and peel towards the other corner. Almost no toner should be left on the paper. If the image is coming away with the paper, stop and re iron.
At this stage you need to examine the PCB carefully for missing tracks or pads. If you have been meticulous, there shouldn’t be any, but it can difficult to keep everything spotless, especially if you are working in a dusty old shed. No worries though. Permanent markers also resist etchant, so you can touch up any gaps with a fine marker.
Once you are sattisfied, etch yor board following the instructions provided by the etchant manufacturer. I use Ammonium Persulphate. The instructions say to mix 400 grams of etchant crystals with 1.5 litres of water. For he board in this demonstration, I used One and a Half Tablespoons of crystals to 60 ml of near boiling water. I agitated it by shaking back and forth. Etching took around 4 minutes. With Ammonium Persulphate, the water needs to be hot. Agitation is also necessary to etch the board evenly. Etching causes bubbles of gas to form on the board, and these need to be disloged from between close together tracks or the copper will not be removed from those areas. If shaking does not clear the bubbles, I find a gentle wipe with a small paintbrush works. Etch untill all uncovered copper is gone. Then rinse with clean water.
Drill holes with appropriately sized drills.
After etching and drilling, use acetone and a rag to clean away the toner and expose the copper tracks. If you are not going to use the board immediately, you can leave the toner on to help protect the copper from oxidation. The labeling on the board pictured was also done using the toner transfer paper, and ironed on after etching.