Monday, January 18, 2016

arduino - 1

i "too" started playing with this micro-controller board, implying there are toooooooooo many players out there, many masters and few novices(meeeee!).

automation attracted me towards this, later i thought of working on a small prototype to measure mould oscillation mechanism( jargon of steel making, more precisely continuous casting field).

what i thought was to measure the acceleration generated by the mould as it moves/oscillates UP & DOWN throughout production process. any deviation unidentified during oscillation has the potential to cost dearly. but unfortunately in my previous workspot, we didnot have any means to measure these deviations, if any.

so i thought, "something is better than nothing"; i decided to make use of arduino coupled with an accelerometer, measuring the dynamic acceleration generated by the oscillating mould.

then again i had to be very careful about, "nothing is better than non-sense". so i HAD TO start working on someway to get those readings MAKE SENSE. this called for coding in PROCESSING language( im yet to START writing original code). that will help me display real-time graph.

point of focus of this article is....the EASE with which arduino coding can be done. here...is the screen shot of MY OWN original-tamilised code. ;-)



that's it. code is complete!

adxl335 is the accelerometer i use. it measures acceleration in x, y & z axes; feeds them to arduino's (induino-clone) 3 analog INPUT pins(A0, A1 & A2). internal 10bit-ADC converts that analog(voltage zero-to-3.3V) signal into digital(zero-to-1023) values.

those digital values are sent to my PC through USB(through usb to serial communication) connection.

those values are received by my PC as tab-separated-values (for easy storing as notepad friendly *.tsv files).

any serial monitor software can read those values in real-time. great thing is arduino-IDE has an inbuilt serial monitor, making the job very convenient.

when i attach this accelerometer to oscillating mould( oscillates in sinusoidal curve form), that accelerometer measures the dynamic acceleration and reports it to arduino; arduino then passes that converted info to PC.

if i these readings are graphically represented, then it will show a smooth sinusoidal curve( representing mould's smooth oscillation). if any abnormal jerk is observed, it is shown as unusual spike in the graph. this will give me an opportunity to get some useful info about oscillation mechanisms of my previous work unit( this doesnot have any means, till now).

not to deviate much from the context, these FEW LINES of code GET the INFO displayed on any serial-monitor.JUST a few lines! arduino is sooooooooooo simple!!!!!!!!

graphing THAT is a separate work on processing software.

No comments:

Post a Comment