top of page

TACHOMETER

Hi there!
This week, our assignment was to have a gauge on a dashboard that changes as a lego motor turns. There were two different ways of doing the assignment, EV3 and Pyboard.
For EV3, I created the necessary rotation reading code in LabView and connected that value to a tag that I made on systemlinks. This tag is connected to the value of a gauge on a dashboard. So, as the value changes when I spin the wheel, the gauge value on dashboard changes as well. Here is the simple LabView code that I made and a video of me using EV3.

Tachometer Reading: About

LabView Code

Screen Shot 2019-03-14 at 5.12.26 PM.png
Tachometer Reading: Gallery

EV3 Tachometer

Tachometer Reading: Gallery

For the second part, I used the sample codes given by Professor Chris Rogers. The first step was to figure out how to read from the tachometer. For this, I used the code "tacho_interrupt". It uses Taco0 and Taco1 of the LEGO motor cable, and this is how I read the angle of rotation.  
After that, the difficult part began. Combining all of the codes together was really challenging. I used Dipehwor's code to connect my Pyboard to Wifi. Then, I created a tag to store the angle and used this angle to change the gauge value. Also, I made three different LEDs and assigned each of them a boolean tag.  In my python code, it checks the rotation and changes the boolean value of LEDS as necessary. The aim is to light a LED as the motor rotates 100 degrees.
I got the inspiration for these LEDS from racing games and I now have a dashboard that acts as a start light for car races. Now, whenever a person needs to use a LEGO motor to start a racing game, I got all the necessary codes and dashboard.
I am attaching the video of this and my github for the python code.

Tachometer Reading: Text
Tachometer Reading: Gallery

For the last part, we were supposed to connect the Trinket m0 microprocessor to Pyboard and make them communicate serially. The main idea is to use UART and make them communicate with each other. The way UART works is that Pyboard sends the information and the Trinket reads it. For the coding part, in Pyboard and Trinket we initialize UART and then make Pyboard write a value while Trinket reads a value. Trinket checks this value and if the value satisfies the necessary condition, Trinket's LED changes color. 

For wire connections, Tx of Pyboard goes to Rx of Trinket and Rx of Pyboard goes to Tx of Trinket. I got the connections right and prepared the necessary coding for all of them. 

Even though, I have talked about the process and described everything, it did not work out for me unfortunately. So, I can not attach anything for this part.

Programs that are used:

  • Python

  • LEGO Mindstorm EV3

  • SystemLink

Tachometer Reading: Text

©2019 by Tahsin Can Sarlak. Proudly created with Wix.com

bottom of page