Saturday, 14 December 2013

Rotary encoder

Having decided what functionalities our device should incorporate we decided to split the group into 2 teams: software side and hardware. Since I haven't had much experience with electronics I opted to work on the hardware team along with Madalina, while Rupert, Max and Vlad decided to work on the software side of things.

After receiving the rotary encoders I wanted to get started with building the device as soon as possible just in case we had to drastically change our design further down the line. However, Madalina had other commitments at the time so me and Rupert decided to make a start.

The two of us went to the workshop to solder wires to each of the eight pins of an encoder but soon came to a disagreement about how the wires should be connected. We had two options, either solder the encoder to a breadboard and then solder wires to the breadboard, or skip the breadboard and solder the wires directly to the encoder.
Rupert wanted to use the breadboard because it would be more stable whereas I thought using the breadboard would give us problems further down the line when we have space constraints, since all the 6 encoders along with eight wires for each of them would need to fit inside a Rubik's cube.
Since we couldn't come to an agreement I proposed we make one of each, get the group's input on it and solder rest of the encoder on a later date.

After the workshop we went back to the MVB with our the two soldered rotary encoders to see which one the rest of the group preferred. Although Madalina and Vlad both acknowledged Rupert's concern about not using a breadboard we agreed in the end that it's best if we just solder the wires directly to the encoder to save some space.

Having agreed on the design for our encoders, me and Rupert set about connecting the rotary encoder to the Arduino board by following this guide. We soon came to a halt and asked Vlad to help us out as he's had some previous experience with Arduinos.
With Vlad's help we were able to connect the rotary encoder to the Arduino and receive data when the encoder was rotated. The two of us then decided to take it a step further and incorporate the encoder's push button feature as well. Soon enough our program was able to receive information about both, the button and the rotation. The image below shows our rotary encoder connected to the Laptop via an Arduino.


No comments:

Post a Comment