This week, I finished soldering the hall effect sensor circuit to a small protoboard which will be easily attached to the body of the bogie using double sided tape. Then I started planning out how to get power from the LCD shield of the Arduino to power the low pass filters of the eight switches, the hall effect sensor, and the 9 degrees of freedom (DOF) accelerometer-gyrocsope. The accelerometer-gyrscope sensor will be used for correcting the tilt of the bogie on sloped tracks.
At first, just attaching two more wires from the 5V and GND pins to the LCD shield caused a cold joint and the shield didn't turn on. Then I decided to attach wires from the switch-protoboard to the hall effect sensor, and it worked better. Next, I'll attach wires from the 3.3V pin of the Arduino-LCD shield to power the accelerometer-gyroscope.
Also, I learned how to use the accelerometer-gyroscope by using the analog pins to read the signals the accelerometer sends in the X, Y, and Z axis. From these signals, I found an equation online to convert the raw data into degrees of how far the sensor is tilting. Afterwards, I used the new values in conditional if statements to show the instructions to be executed at certain angles. At certain ranges of degrees, the Arduino will turn on specific LEDs to represent the instructions. What we expect the Arduino to do is that it will continuously read the sensor. Then, if the Arduino reads a change in degrees or if the degrees isn't nearly zero, it will turn on the DC motor of the tilting mechanism until the sensor says zero again.
Next week, the team should be building a test rig to demonstrate the tilting system and debugging the code to make sure it works correctly.
No comments:
Post a Comment