Archive

Archive for June, 2010

Magnetic Reed Switch

June 18th, 2010 1 comment

Let’s have a look the definition of the reed switch from Wikipedia first:

The reed switch is an electrical switch operated by an applied magnetic field. It was invented at Bell Telephone Laboratories in 1936 by W. B. Ellwood. It consists of a pair of contacts on ferrous metal reeds in a hermetically sealed glass envelope. The contacts may be normally open, closing when a magnetic field is present, or normally closed and opening when a magnetic field is applied. The switch may be actuated by a coil, making a reed relay, or by bringing a magnet near to the switch. Once the magnet is pulled away from the switch, the reed switch will go back to its original position.

An example of a reed switch’s application is to detect the opening of a door, when used as a proximity switch for a burglar alarm. You can watch the video below and see a PIC project using magnetic reed switch. 

In ths video PIC programmer has added a magnetic reed switch to his robot, it plugs into the ICSP header on the board and over-uses the program clock PIN. He had a small 15 tooth gear and added 5 small magnets equally spaced out, but the mag field was too strong and the reed switch did not switch off. So he reduced the number to 3 magnets which works fine. One wheel rotation is 9.6cm and with three magnets that’s one reed click every 3.2cm. In the software, programmer used the existing pulse width modulation interrupt thread, operating at about 5000 Hz to read the switch values. By using this, he is able to de-bounce the reed switch on the fly no extra code required. The code size is around 519 statements, out of a maximum program memory of 1024 statements.

 

Parallel Parking Robot With PIC

June 16th, 2010 No comments

Here is another inspirational PIC project which is a parallel parking robot. In this PIC project ultra sonic sensors, servo motors and a stepper motor is being used in addition to the PIC microcontroller. As an answer to the questions coming from most of our visitors, ultrasonic sensors (SRF05) are used to measure the distance of the robot to the obstacles. The SRF spec is apprximately between 2cm to 4m.