Archive

Posts Tagged ‘Arduino’

Arduino Mega and ILI9320 Display

Hi everybody.
Last week I started making a ILI9320 library for the Arduino Mega, as I was hoping it would work with my 2.8″ Display (with a ILI9320 controller of course).
After a couple of hours I’ve made the code doing the timings correctly, and then I made a simple PutPixel routine. It worked, so I continued to make a Text function, and afterwards different polygons commands.
When I had made all these commands I began to optimise everything, as the Arduino isn’t running fast enough, so a complete screen clear takes about 2-3 second. After a couple of days optimizing, I got it down to 1 second, and other commands such as rectangle was alot faster. I had also made a function so I could “scroll” the screen – which is descriped in the ILI9320 datasheet!

Here you can see some pictures of the final version, and download the code here: Arduino Mega and ILI9320 code

Arduino Mega and a 2.8-inch display (ILI9320)


A close up of the Hello World screen



And here is a user posted video of the library in action on an ATMEGA16A.
Thank you to ‘Maarten van ingen’ for showing us this video.

Magnetic Card lock with the Arduino

I have posted alot of projects recently, and here is another project with the Arduino!
This projects is about making a magnetic card lock using the Arduino, a servo and a $4 cheap magnetic card reader from AllElectronics.com

Magnetic Card Lock project


Magnetic Card Reader Connections

The card reader, which you can see in the first picture, has 7 pins. The picture below shows theese pins functionality!

I’ve made a video about the project which explains it all!

If you want to try it yourself, you can grab the code underneath and change the checkCode character array to match the string on your card!

#include <string.h>

#include <Servo.h>
Servo servo1;

 /* Magnetic Card lock with the Arduino and servo's
 * by Thomas Jespersen http://elec.tkjweb.dk
 *
 * Reads a magnetic stripe and opens lock (turns servo) if card is the same as programmed
 *
 */
 
// Connections: DATA = Pin 2, CLOCK = Pin 3, CARD IN = Pin 5
// See PDF "Magnetic Stripe Card Reader! << HACKMIAMI.pdf" for more connection information

Read more...
Categories: Arduino Tags:

Ultrasonic Range Sensor

Today I recieved a Ultrasonic Range Sensor bought on eBay.

It’s much like the Parallax Ping))), except that it has got a Trig and a Echo pin, instead of the Ping)))’s multipin (Trig and Echo on the same pin)

I quickly made some code in the Arduino IDE and got it running quick…

Just a sidenode from the physics class; as the sound is travelling thru air with a speed of 340 m/s, this can be recalculated to 0.034 cm/microsecond, which is the same as 29.411 microsecond/cm

Arduino with Ultrasonic Sensor

For those who may be interested the code is here:

/* Ultrasonic Sensor

This sketch reads a ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return.  The length of the returning pulse is proportional to
the distance of the object from the sensor.

The circuit:
* +V connection of the Ultrasonic Sensor attached to +5V
* GND connection of the Ultrasonic Sensor attached to ground
* Trig connection of the Ultrasonic Sensor attached to digital pin 2
* Echo connection of the Ultrasonic Sensor attached to digital pin 3

created 25. Januar 2010
by Thomas Jespersen

*/
Read more...

Categories: Arduino Tags: , ,

WiFi SMS Gateway

After a long search on the internet, trying to find a cheap SMS Gateway, I got the idea to create one myself.
As I already had a GM862 module laying around, and I’ve got the WiShield WiFi module for the Arduino too, I thought it would be easy – but it wasn’t!

The hardware setup is pretty easy, except the powering for the GM862, as it requires about 3.8V. That was made with a Linear LT1528 3A low dropout voltage regulator.
After alot of testing and measuring, I finally made a working circuit, and afterwards an Eagle Schematic.

WiFi SMS Gateway - Schematic

WiFi SMS Gateway - Schematic

 

In the following picture you will see the hardware setup, which consists of the Arduino with the WiShield on the top, the GM862 on two breadboards, and alot of wires!

WiFi SMS Gateway - Hardware

WiFi SMS Gateway - Hardware

 

But the real problems appeared when I started programming! I had alot of troubles with the serial connection between the Arduino and the GM862 module, which apparently wasn’t caused by the hardware setup!

 
After alot of debugging I figured it out, and a simple SMS sending code was working :)
Then after a couple of hours I’ve added the WiFi parsing code which sends an SMS to the requested number, with the requested message, read from the GET parameters!

You can grab the code here, and try it out:

/*
* WiFi SMS Gateway sketch by Thomas Jespersen - http://elec.tkjweb.dk/blog
* --- Remeber to change the PIN, if any, in the setup() routine! ---
*/

#include <WiServer.h>

#define WIRELESS_MODE_INFRA 1
#define WIRELESS_MODE_ADHOC 2

// Wireless configuration parameters ----------------------------------------
unsigned char local_ip[] = {192,168,1,111}; // IP address of WiShield
unsigned char gateway_ip[] = {192,168,2,254}; // router or gateway IP address
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
const prog_char ssid[] PROGMEM = {"SSID"}; // max 32 bytes
Read more...

Categories: Arduino Tags: , , , , ,

RFID Modded Safe

This project is about my RFID Modded Safe.

I’ve modded an old electronic toy-safe, which is unlocked by typing the 4-char password.

RFID Modded Safe

RFID Modded Safe

I’ve unsoldered the locking-mechanism from the circuitboard, and connected it to the Arduino instead.

Locking-Mechanism Hack

Locking-Mechanism Hack

Then I connected a ID-20 RFID Reader to the Arduino and programmed it to read the tag, and see if it was allowed to enter the safe.

ID-20 RFID Reader

ID-20 RFID Reader

If it was allowed, the Arduino will keep the safe unlocked in 3 seconds!

I’ve also made this video to show how it works:

You can grab the code here, and try it out:

#include <NewSoftSerial.h>

NewSoftSerial ID12(5,6);
// RX,TX

// RFID reader ID-12 for Arduino
// Based on code by BARRAGAN
// and code from HC Gilje - http://hcgilje.wordpress.com/resources/rfid_id12_tagreader/
// Modified for Arudino by djmatic
// Modified for ID-12 and checksum by Martijn The - http://www.martijnthe.nl/
//
// Use the drawings from HC Gilje to wire up the ID-12.
// Remark: disconnect the rx serial wire to the ID-12 when uploading the sketch
Read more...

Categories: Arduino Tags: , , , , , , ,

Ethernet TV

After my last success with the Serial TV, I’ve got the idea making it possible for you to the television using a browser.

I’m still using my Serial TV, but now it’s connected to an Arduino instead of the computer. The Arduino has an Ethernet Shield on top, and it’s programmed to make a homepage with a text-field and a submit button!

Here is some pictures of the project:

Ethernet TV - Full

Ethernet TV - Full


Ethernet TV - Arduino

Ethernet TV - Arduino


Ethernet TV - iphone

Ethernet TV - iphone


Ethernet TV - iphone + TV

Ethernet TV - iphone + TV


Ethernet TV - Test Text

Ethernet TV - Test Text

Categories: Arduino, PIC Tags: , , ,

Ethernet DMX

Last week I recieved the Arduino Ethernet Shield – http://www.arduino.cc/en/Main/ArduinoEthernetShield
There were all ready complete examples provided, so it was very easy to get started.
Then I thought it would be nice to have a Ethernet DMX Controller, so i could type the IP-Adress of the Ethernet Shield in explorer, and from there control my movinghead (Stairville MV250H). 

Then I found this page showing how to use an MAX485 and the Arduino as a DMX interface – http://iad.projects.zhdk.ch/physicalcomputing/hardware/arduino/dmx-shield-fur-arduino/
I tried it, and it worked :) – And the Arduino could communicate with my movinghead.

Then I combined the Ethernet example and the DMX example, to make a HTML Page where i could click on different buttons to change the DMX values that would be sent to my movinghead.
Try it out yourself… You need a MAX485, follow the link above on how to connect it to the Arduino. Just use pin 3 instead of pin 11, as the Ethernet shield uses Pin 9 to 13!

Read more…

Categories: Arduino Tags: , ,