March 18, 2011

Arduino relays

I'm putting my newly learned Arduino knowledge to practical use. Since I don't really know any electronics, I went to a local electronics supplier called ETT to see what pre-made boards they have. While looking around, I discovered that they make a custom Arduino board with a mouthful name called ET-EASY MEGA1280 Duino Mega that easily connects to their boards using a simple 10-pin connector.


This is the Duino Mega connected to a 5V relay board. The 5V board can be powered directly from the Duino Mega board which is powered from USB. Also connected is a Sharp GP2Y0D21YK infrared sensor. The sensor is a digital sensor with a 24 cm range.


Here's another relay board also produced by ETT. This is a 12V relay board that needs to be externally powered. Actually I got the 12V board first, but then I saw the 5V board that can be powered from the Arduino. But after getting the 5V board I was afraid that it might draw too much power. But both seem to work perfectly fine.

I wrote a little sketch that controls the relays using commands transferred over USB serial as well as reads the status of the infrared sensor. My first Arduino project is a motorized computer scale system. One relay is used to control the motors of the conveyor belt and the second relay is used to toggle a warning siren. The infrared sensor (which will be replaced by a laser sensor in production) is used to sense when to stop the conveyor belt in order to weigh the product.

Of course, the system has a load cell and a weight indicator that also has to be connected to work. The load cell is connected to the indicator through a special load cell connector, and the indicator is connected to the computer using a simple USB serial port converter.

0 comments: