Square Thoughts

an engineering student's blog

Archive for the category “Arduino”

MD5 Hash Generation on Arduino

I implemented the MD5 hash generation algorithm on the Arduino. The algorithm is available freely by RSA Data Security Inc. subject to some usage restrictions. The algorithm files are written in C. They have to be ported to run on the Arduino, which basically  involves changes in the variables used in the algorithm. This 128 bit hash is handled with utter ease by the 8 bit AVR core on the Arduino.

It takes a string as the input serially over the Arduino IDE Serial Monitor. The return value is the MD5 hash computed on the 16MHz Arduino processor.

The complete step by step algorithm can be found here.

I intend to use it later in my projects for security enhancements and error detection and of course Geohashing.

Click here to download source code and library files used in this project.

Matrix Baby!

It’s been eight days since my Arduino arrived and I have not been able to take my hands off it. It’s simply brilliant!

I wanted to use extra electronic components other than the Arduino alone, which I have been doing so far, so I settled to design a 8×8 LED matrix using shift registers and lot and lots of transistors.

I am using two 74HC595 Serial In Parallel Out Shift Registers for the rows and columns and software multiplexing through them to create amazing LED patters. I am using 8 PNP transistors for current sources and 8 NPN transistors for current sinking.

The matrix is constructed in a manner such that LEDs in a single row have a common anode and in a single column have a common cathode. The PNP transistors are connected to the anode side and the NPN at the cathode.

But the best part, I am only using 6 I/O pins on the Arduino to control a matrix fo 64 LEDs which when connected individually would require 128 pins. So the technique is really useful and can be extended to drive bigger displays as well.

The matrix can be used as a text display, to scroll text, display sequential patterns, the possibilities are countless.

I have a made a simple animation on the matrix which you can see in the video below. I intend to use the display as an email notifier/RSS feed display in my room, but that would require some more thought process.

Let us Count

Salut!

So I have been playing around with the Arduino for a while and believe me, you will be mind struck by the amazing capabilities of this little device.

A LED is a very versatile electronic component, it can act as an actuator, a sensor and you all know, how lovely they look when lit up.

This time, I am experimenting with  a 4 Digit 7 Segment Display, which I got hold of from an old microwave oven display panel. What’s with the fancy name? Well, it is a grid of 4×7 LEDs arranged in a manner so as to form digits. But this doesn’t mean it has 4x7x2 leads, absolutely WRONG! It only has 4+7 leads and the multiplexing is done through software on the Arduino. However, one could use external multiplexers/shift registers, I just didn’t feel the need for the same.

I have made this small, basic but useful counter using the 4 Digit 7 Segment display which counts up to 9999 and then resets back to 0000. Again, this project just under estimates the capabilities of the Arduino, though very good for learning. The counter speed can be varied in the software and the brightness can be controlled by varying the current limiting resistors.

NOTE:- I am shuffling through each LED one by one with a frequency of 10,000 Hertz or a time period of 10 microseconds due to which the duty cycle is considerably reduced. To maintain optimum brightness I have chosen a resistance value of 100 ohms.

Check out the video below to see how this counter works.

PS:- One should aim to use the least possbile I/O pins on the Arduino making room for further enhancements. So I would be working out the counter using shift register in the next weblog.

Arduino 101

I have been waiting for this small dose of magic for over a month now. I am talking about my Arduino, the open source hardware prototyping platform for hobbyists, yes, I call myself a hobbyist rather than a to-be engineer.

It is small piece of hardware weighing about 50 grams and 3×2.5 inch size. It has everything you will ever need to design micro controller based projects. Offering 18 total I/O pins, 6 PWM pins and 6 Analog I/O pins it can be adapted well to almost all one’s requirements. To know more click here.

I got hold of my first Arduino today.

Before getting onto anything big on the Arduino, I decided to start with the basics as it was the first time I am using the hardware.

I made a simple, very simple in fact, LED Sequencer. It is the most basic thing you can do with the Arduino. I am basically controlling five LEDs over the five Digital I/O pins and sequencing them. Check out the video below.

I will be posting a weblog of all my experiences with the Arduino over the next couple of months.

Sorry for the abrupt tick at 00:10 when the light goes off. Stupid Clap Switches.

Post Navigation