Control electromagnet using arduino uno +ULN 2803AGP+KEYPAD

Helo,

I am newer to using arduino and electronics component both.I am a student and i have a project in wich i must control an electromagnet using the arduino uno board ,the ULN 2803AGP and a KeyPAD.I need your helps please for the schematics because i haven't good skills in electronic and some pseudo code to control the electromagnet.
To have clear ideas abouts components i give you the link of them:

ULN2803AGP:http://www.engr.usask.ca/classes/EE/392/DataSheets/ULN2803.pdf
KEYPAD: http://electromaroc.com/12-module-arduino-pic-fpga/84-clavier-matriciel.html
electromagnet: http://www.mecalectro.com/4.aspx?ProdID=bb13de81-fb26-43d8-af71-6c8710b12509&CatID=309b2775-5fb7-43c1-a5fc-b613fe831821&sr=1

Thank you very much and i will be gratefull of each help :slight_smile:

What is the idea of using the keypad? You only have 1 electromagnet or you have a few?

EDIT: For the rest,you need something like this:

but instead of use the TIP120 you use yours ULN2803AGP. Pay attention to the diode between the electromagnet pads, is very important.

Good evening,

I want to thank you very much.First of all ,the idea of the project is to develop an acces control using a keypad.When the person intoduce the right code the arduino board send order to open the electromagnet to let person enter.
About your question,i just use one electromagnet wich need 3v ,330 mA and consume 1watt. Now I ama using arduino uno to prototype the board and to learn but after that i want to use arduino pro mini (8Mhz,3.3v)wich consume less than arduino uno because i want pilot it by 3.6V battery.

Thank you again

i just use one electromagnet wich need 3v ,330 mA

I don't like this. You have a regulator in the Arduino board of 5V (that can supply up to 800mA). You can supply the Arduino board with 7-12V. So, I don't like to ear talk about 3V that don't is one of this voltages.

because i want pilot it by 3.6V battery.

If you can supply to the electromagnet with this voltage, you can forget what I write before.

i just use one electromagnet wich need 3v ,330 mA

This another time. I think that 330mA is to mush current to drive with a battery. (eg. if your battery have 1000mAh you only have a "acces control" system that only will work during 3h) So you need that the electromagnet only work to open the door, and not always (I believe that you had thought in this, I say it only in the case).

You have here the Arduino UNO description, and here the same for Arduino Pro Mini.

I like your project's idea, but if I was in your place I will do it with RFID card reader. The reader is not very expensive, I believe that is not very difficult to work with, and the final project will be mush more nice. I believe that you may need (or not) a LCD.