But with the appearance of digital electronics & microprocessors these functions are achieved by small changes in the software programs. Software is easier to modify than hardware, with a few keypress, one can radically change the logic of a device and can develop into another finer system. In all the above cases it’s very easy to develop his own level controller, temperature logger or a CAN bus battery monitoring system which will cost less than a few grands.
But it seldom happens that the engineer knows about the Arduino or the instrumentation man is aware of the easy physical computing by Arduino and both becomes frustrated – one for not having and the other for not providing.
Introduction to Arduino UNO:
Well, lets roll up the sleeves and have a close look what’s there in an Arduino. This magic board is about 9 years old. First developed in Italy, the first edition price was some $80 but over the years after being sold for a few million boards now the price in the international markets have come down to $10. In India the clones are available for as low as Rs:500 (ebay.in). However, the hardcore Arduino users make their own Arduino for as low as Rs:60 (The cost of the microprocessor chip)
This small beauty has the following hands and feet – 14 Digital I/O pins (D0 to D13), 6 analog in pins (A0 to A5), 6 PWM out pins, on board I2C BUS & UART BUS. The programming can be done using a small USB cable through your PC or laptop.
There is another bigger version of Arduino called – Arduino Mega. Which has more of the above pins besides it has slightly more memory to take more complex programs. But the most favorite form of Arduino is the Arduino ‘UNO’ which has wrapped the electronic world by storm.
What it does:
Well those small holes are those I/O [Input / Output ] pins. You add your sensors, relays, actuators, displays, LCDs, LEDs with those pins and then write a
Well those small holes are those I/O [Input / Output ] pins. You add your sensors, relays, actuators, displays, LCDs, LEDs with those pins and then write a minuscule, tinier than tiny program which is also called sketch and then upload it in it with the help of that cable & computer. The black 28 pin microprocessor takes the upload to its heart content and then keeps on doing endlessly whatever you have instructed in that program. It never defaults & never sleeps like the human operator. It becomes a genie for you.
OK now the audacious engineer will ask, ’So what? How to tie everything up with this board?’
It’s very simple, just like a motor has a supply point so is true for all sensors, relays, servos, LEDs or any other devices. Find out the supply lines of the device first. Most of the low power devices have 3.3 volt or 5 volt connections.
Now look at carefully the UNO board and it has the 5volt as well as 3.3 volt supply available onboard. Connect the devices to that supply lines first. Now find out the signal line of the device next. If it’s an analog measurement connect it to any of the analog I/O pins if not, connect it to any Digital I/O pins.
42 types of various sensors – most of them have 3 legs, 2 for power and 1 for the sensor output. The pack comes for <$20 at Chinese international markets.
The programs in Arduino is called sketches. Perhaps it’s no less valuable than an artistic sketch. It’s small, light does not reveal many things but function wise it’s complete! Perhaps that’s symbolises a sketch.
OK, after connecting the power line and the sensor line it’s time to write down the sketch to perform the work.
For creating and uploading sketches, Arduino has a beautiful open source Integrated Development Environment (IDE). Download it from the Internet as per your operating system ( Windows / Macintosh or Linux ) and then install it on your computer or laptop. Over the years this IDE installation has become so easy that you just need to double click it for a complete installation on all these different kinds of operating systems.
Above sketch is a classic sketch called the “Hellow World” program of physical computing. It turns an LED connected on it’s digital pin-13 one second ‘on’ and then one second ‘off’. The sketch is divided into two parts – setup & loop [anything starts with a ‘/’ or ‘//’ is comment and not part of the sketch]. Setup initiates the initial condition – like the beginning of the process etc. Loop is the infinite loop in which the sketch will work endlessly unless the power supply is stopped. Arduino UNO can get power supply from any of the two sources – the USB cord or the separate 9 Volt DC plug [centre positive, the common adaptor supply] .
After uploading of the sketch into the brain of the microprocessor [for which you need to attach the USB cord] remove the USB connection and insert the 9Volt DC plug into the external supply of the board and your automated system is ready to deploy for the actual fieldwork!