Spring 2016 Pathfinder: Project Tango Bluetooth API

tango_system

by:

Peiyuan Xu (Project Manager)

with contribution from:

Qianyi Tang (CSULB Computer Science Major Graduate Student)

Table of Contents

Introduction:

In our Project Tango system block diagram, one of the software module is to develop Bluetooth API in the Point Cloud App command sequence. This blog post is to show the approach of modifying point cloud App to pair and connect another device to Tango tablet through Bluetooth while still running Point Cloud.

Steps:

  1. Download and install Android Studio and Tango SDK
  2. Download the Point Cloud sample code and import it into Android Studio
  3. Connect the Tango tablet to the PC and enable the Android Debugging Bridge (ADB)
  4. Build and run the Point Cloud sample code. This would automatically install the App in Tango tablet
  5. Open project → app → Java → PointCloudActivity.java
  6. Open project → res → layout → activity_jpoint_cloud.xml
  7. Open project → res → values → strings.xml
  8. Breakdown and modify the code

The download instruction and links can be found here:

 

Code Breakdown and explanations:

1.Create the Bluetooth Button

Add the following code to “activity_jpoint_cloud.xml”
/******/
<Button
android:id=“@+id/bluetooth_button”
android:layout_width=“100dp”
android:layout_height=“wrap_content”
android:layout_above=“@+id/first_person_button”
android:layout_alignParentRight=“true”
android:layout_marginBottom=“5dp”
android:layout_marginRight=“5dp”
android:paddingRight=“5dp”
android:text=“@string/bluetooth” />

/******/

The code above will generate a button on the screen called”bluetooth” with the width of 100 dp(density-independent pixles). The “bluetooth” button will be placed above the “first_person_button” in the point cloud App.

2. Add the string of “bluetooth”

Next, go to “strings.xml”. Add one line of code:

/******/

</string>
<string name=”bluetooth”>bluetooth</string>

/******/

This gives the string type of “bluetooth” that can be called in the “activity_jpoint_cloud.xml”

3. Modify the code in point_cloud_activity

Now, go to “PointCloudActivity.java”. Add the following private classes:

/******/

private BluetoothAdapter BA;
private Set<BluetoothDevice>pairedDevices;
private boolean bluetoothFlag = false;

/******/

This declares Bluetooth adapter and store the list of paired Bluetooth devices. The last line is to store the state of Bluetooth(on/off) because the button can be used as a switch. By initial, it is set to off.

Add one line below:

/******/

BA = BluetoothAdapter.getDefaultAdapter();

/******/

This will assign the BluetoothAdapter.

Now go down to public classes, Add the following code:

/********/

public void bluetoothOn(){
if (!BA.isEnabled()) {
Intent turnOn = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(turnOn, 0);
Toast.makeText(getApplicationContext(),”Turned on”,Toast.LENGTH_LONG).show();
visible();
}
else
{
Toast.makeText(getApplicationContext(),”Already on”, Toast.LENGTH_LONG).show();
}
}

/********/
This creates a function “bluetoothOn()” to turn on Bluetooth device and toast a message (“Turned on” or “Already on”).
/********/

public void bluetoothOff(){
BA.disable();
Toast.makeText(getApplicationContext(),”Turned off” ,Toast.LENGTH_LONG).show();
}

/********/

similarly, this creates a function “bluetoothOff()” to turn off Bluetooth device and toast a message “Turned off”

Next add the following lines below:

/********/

public  void visible(){
Intent getVisible = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
startActivityForResult(getVisible, 0);
}

/********/

This will alter the Bluetooth device into visible state.

Continue adding these lines of code:

/********/

public void list(){
pairedDevices = BA.getBondedDevices();
ArrayList list = new ArrayList();

for(BluetoothDevice bt : pairedDevices)
list.add(bt.getName());
Toast.makeText(getApplicationContext(),”Showing Paired Devices”,Toast.LENGTH_SHORT).show();

}

/********/

This creates an array and add paired devices into list.

Finally, incorporate the main function:

/********/

@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.first_person_button:
mRenderer.setFirstPersonView();
break;
case R.id.third_person_button:
mRenderer.setThirdPersonView();
break;
case R.id.top_down_button:
mRenderer.setTopDownView();
break;
case R.id.bluetooth_button:
if(bluetoothFlag == false){
bluetoothOn();
bluetoothFlag = true;
}else {
bluetoothOff();
bluetoothFlag = false;
}
default:
Log.w(TAG, “Unrecognized button click.”);
}
}

/********/

This will create the click event handler. Based on different click event,it will switch viewer’s perspective and turn on/off Bluetooth device. In Bluetooth button section, this function will switch adapter between on/off.

IMG_3210

This is what the App will looks like after the modification. Notice the Button shows upon on the screen.

The modified Java Code can be downloaded here

 

Conclusion:

Modifying an existing Android App could be difficult since it requires good knowledge of Java Programming language as well as understand Android Studio platform. In this approach, I first did research and learn the basic Android App development and Java programming on Udacity website. Then I start modifying code in Point Cloud Existing App but unfortunately I crushed the App over and over again. After we got the Project Tango system block diagram from professor Hill, I start researching into Android Bluetooth API and trying to implement existing bluetooth sample code into the Point Cloud activity. Finally I successfully debug and run the modified App but the button itself does not work properly. After trying to debug the code, I found out that I need assistant from someone who develop the point cloud App to let me know where the breakpoints goes since I lost track of the breakpoints when stepping into the code.

This blog post does not show the fully functional Point Cloud App with Bluetooth feature, but can be documented and used as a good resource for individuals or groups from future class to continue developing the Java Point Cloud App.

 

Source Materials:

Spring 2016 Pathfinder: Project Tango Module#5 – Android to Arduino Via Bluetooth

amarino_905

By:

Xiong Lee (Missions, Systems and Test)

Table of Contents

Objective:

The objective of this test is to be able to send data from Android OS (Java, android studio)  to the Arduino via Bluetooth. We use a simple open source code found on github to see if we can send data to the Arduino. The mission of this experiment is to move us closer to sending data from the Google tango (the Google tango is an Android OS device, therefore it uses java/Android studio) to the Arduino via Bluetooth.

Tools:

  1. Android Studio
  2. Arduino IDE
  3. Bluetooth Module (we used the HC-06)
  4. Arduino Uno / Mega
  5. LED
  6. Breadboard
  7. Android Phone with usb cord.

LED Test Java Code:

The Java code that is on github should work when you import it to Android studio. After importing the code into android studio, you have to wait and let android studio build the project. This will take from seconds to minutes. Once the gradle has been built, you can run the app. Before you run the app, you have to make sure your android phone is in debug mode (if you don’t know how to get it to debug mode, just google it with your version of phone) so you can connect it to android studio. Once your phone is connected to android studio, you can run it and choose your phone so the app can be on your phone. When have the app on your phone, then you need to go to the Arduino code. If you want to know more about the code, I suggest that you read and run through the code yourself to get an idea of how this app works.

The sample code can be found here

LED Test Arduino Code:

The Arduino code is also on github. It is at the bottom of this page here. Just copy and paste it to Arduino ide. Once you have it, go through the code so you know where to connect everything on the Arduino. Once you have connected everything the right way, verify the code and upload it to your Arduino. (Note: There are sometimes problem uploading code to the Arduino when the Bluetooth module is connected on the Arduino at the same time it is uploading. So to get over this problem, simply just take the Bluetooth module out before uploading the code and put it back on when the code has successfully been uploaded to the Arduino.)

 

The first LED is connected to pin 9 and ground. The second LED is connected pin 2 and ground. The third LED is connected to pin 3 and ground. The RX on the Bluetooth module is connected to pin 11 and the TX is connected to pin 10. On the picture above, the button “Light Up” were pushed and as you can see, all the LEDs lit up.

Results:

When you have both the Java code and Arduino code, you should be able scan and find your Bluetooth module on the app. Once connected, turn on the LED lights by sliding the bars to the right or pressing all light up. Below is a picture showing how it should look like when you are lighting up the LED. In the end, we were able to send data from java to Arduino via Bluetooth. To take this a little further, we successfully move our pathfinder prototype with the app.

1

Changing just bits and pieces of the code, we were able to make the rover go forward, backwards, and turn. The java code that was changed was only the button name. The  main change that made our rover move was changing the Arduino code. We sent the data to the motors instead of LED.

Making the LED App Control Motors:

The main thing that we changed in this code was the serial port, and adding the motor shield code. We changed the serial port that we use to send data to the Arduino. Since we are using the Arduino Mega, we use serial port 2 instead of pins 10 and 11 as above. In the first LED case, we made the rover go forward. The second LED made our rover turn right and the third LED made it go in reverse. On the Java code side, we didn’t change anything from the code, we just changed names of LED1, LED2, and LED3 to forward and reverse.

The demo video can be found here

Moving Rover Arduino Code:

The the code highlighted below is what was changed from the code given in the link above. These code were added so we can move the motors of our pathfinder.

 

#include <SoftwareSerial.h>

#include <stdio.h>

#include <DualVNH5019MotorShield.h>

DualVNH5019MotorShield md;

 

int ledONE = 2;

int ledTWO = 9;

int ledTHREE = 4;

int bluetoothTX = 11 ;

int bluetoothRX = 10 ;

char receivedValue ;

 

SoftwareSerial bluetooth ( bluetoothTX, bluetoothRX );

void setup()

{

 Serial2.begin(9600);  

 Serial2.println(“console> “);

 

 pinMode(ledONE, OUTPUT);

 pinMode(ledTWO, OUTPUT);

 pinMode(ledTHREE, OUTPUT);

 

//  bluetooth.begin(115200);

//  bluetooth.print(“$$$”);

//  delay(100);

//  bluetooth.println(“U,9600,N”);

//  bluetooth.begin(9600);

}

 

void loop()

{

int brightness = 0;

int led = 0;

signed int data = 0;

 

//if( bluetooth.available() )

  if (Serial2.available())

 {

   //data = (int) bluetooth.read();

   data=(int) Serial2.read();

   Serial2.println( data );                 // for debugging, show received data

 

     if(data == 26)

     {

       allDown() ;

     }else if(data == 89)

     {

       allUp() ;

     }else{

     led = data / 100;                     // which led to select ?

     brightness = data % 100 ;             // 0 – 25 , LED brightness ( * 10 ) for actual value

 

   switch(led)                             // Now, let’s select the right led.

   {

     case 0  : setLEDthree ( brightness * 10 );  break;

     case 1  : setLEDone ( brightness * 10 );    break;

     case 2  : setLEDtwo ( brightness * 10 );    break;

     default : setLEDthree ( brightness * 10 );  break;       // DO NOT know what to do ? must be led 3

   }

     }

 

   //bluetooth.flush();                       // IMPORTANT clean bluetooth stream, flush stuck data

 }

}

 

// SHUT DOWN all leds

void allDown()

{

   digitalWrite(ledONE,  LOW ) ;

    digitalWrite(ledTWO,  LOW ) ;

     digitalWrite(ledTHREE,  LOW ) ;

}

 

// ALL up now 

 

void allUp()

{

   digitalWrite(ledONE,  HIGH) ;

    digitalWrite(ledTWO,  HIGH ) ;

    digitalWrite(ledTHREE,  HIGH ) ;

}

 

void setLEDone(int brighteness)            // move rover foward

{

   int m1Speed = brighteness; // left motor

 int m2Speed = brighteness ;// right motor

 md.setSpeeds(m1Speed, m2Speed);

//analogWrite(ledONE,  brighteness*16 ) ;

}

void setLEDtwo(int brighteness)     // turn rover to the right

{

      int m1Speed =  brighteness; // left motor

 int m2Speed = -brighteness ;// right motor

 md.setSpeeds(m1Speed, m2Speed);

//analogWrite(ledTWO,  brighteness*16 ) ;

}

 

void setLEDthree(int brighteness)   // move rover in reverse

{

     int m1Speed = -brighteness; // left motor

 int m2Speed = -brighteness ;// right motor

 md.setSpeeds(m1Speed, m2Speed);

//analogWrite(ledTHREE,  brighteness*16 ) ;

}

Conclusion:

In conclusion, we were able to send data to the Arduino from Android OS via bluetooth. We then tried to control the our motors by changing up the code to light up LEDs to control the left and right motors on the pathfinder. The next step is to implement this code to the Google tango point cloud app and see if we can extract the depth and send it to the Arduino.

Source Materials:

  1. Sample code:       https://github.com/hishriTaha/AndroidLEDcontrol
  2. Demo video:        https://www.youtube.com/watch?v=G-8PoH8V9-Q
  3. Image:                  http://payload71.cargocollective.com/1/7/248583/3734433/amarino_905.png

 

 

Spring 2016 Pathfinder: Project Tango – Interactive Visualization of data from Tango using Paraview

2

 

By:

Tuong Vu (E&C – Sensors, Actuators and Power)

Peiyuan Xu (Project Manager)

Table of Contents

Introduction:

Google tango tablet can perform depth perception by using point cloud app, however, the  source code of  point cloud app is written in Java with different  modules. This  blog post assumed the reader has no experience in Java  programming, yet they can still extract data out from point cloud app. Paraview is an program on PC that offers alternate method to manipulate point cloud data, while the other method would involve  changing the Google tango Source code.

Paraview and VTK:

Paraview is a program run on the foundation of C, python,  and Java language. Paraview  version 4.01 was  design  for google tango  project. VTK (Visualization Toolkit) is used  to create digital filter in order to exclude any  unnecessary point  cloud data gather by Paraview.

For reference of how to set up Paraview on both PC and Tango tablet, see here

Testing Results:

Screenshot_2016-05-02-00-03-16

The above picture is a screenshot of Paraview Tango Recorder App. On the left side, There is a scroll button “record” that can be turned on and start recording the point cloud image.

Screenshot_2016-05-02-00-05-21

Then turn on the “Auto Mode” button, it will start scanning the area and capturing point cloud images. The “Take Snapshot” button will only take one image.

 

Screenshot_2016-05-02-00-05-43

Once the “Record” button turned off, the app will save the files in VTK format and send them via Bluetooth or through Wi-Fi to emails or Google Drive. In order to process the data on PC, we choose to save to Google Drive and then import the files to Paraview program.

1

In the Paraview program, you can 3D view the point cloud data. if you record the data in “Auto Mode”. you can enable the animation view and see the video. Paraview has some build in filter that you can use to filter out the point cloud data, however, most of the filter applications are designed for 3D indoor mappings. Next step for us is to research into VTK library and learn to build our custom filter to filter out the irrelevant data and only leaves a single point or an area that we are interested.

Task for future semester

 After paraview and VTK  filter all  points, the specific point needed to be transferred to  Arxterra  app.  Arxterra app will use the depth information from point cloud to drive pathfinder.

VTK example code :

#include <vtkSphereSource.h>
#include <vtkPolyData.h>
#include <vtkSmartPointer.h>
#include <vtkPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>

int main(int, char *[])
{
 // Create a sphere
 vtkSmartPointer<vtkSphereSource> sphereSource =
   vtkSmartPointer<vtkSphereSource>::New();
 sphereSource->SetCenter(0.0, 0.0, 0.0);
 sphereSource->SetRadius(5.0);

 vtkSmartPointer<vtkPolyDataMapper> mapper =
   vtkSmartPointer<vtkPolyDataMapper>::New();
 mapper->SetInputConnection(sphereSource->GetOutputPort());

 vtkSmartPointer<vtkActor> actor =
   vtkSmartPointer<vtkActor>::New();
 actor->SetMapper(mapper);

 vtkSmartPointer<vtkRenderer> renderer =
   vtkSmartPointer<vtkRenderer>::New();
 vtkSmartPointer<vtkRenderWindow> renderWindow =
   vtkSmartPointer<vtkRenderWindow>::New();
 renderWindow->AddRenderer(renderer);
 vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
   vtkSmartPointer<vtkRenderWindowInteractor>::New();
 renderWindowInteractor->SetRenderWindow(renderWindow);

 renderer->AddActor(actor);
 renderer->SetBackground(.3, .6, .3); // Background color green

 renderWindow->Render();
 renderWindowInteractor->Start();

 return EXIT_SUCCESS;
}

1

This  code  filters  the pixels  to make white  sphere and green background. The idea of this approach is trying to use the image processing and filtering method to get the point cloud data we want and on some level avoid Java Programming and modifying the point cloud app.

Source Materials:

  1. VTK example code:                                                                                              http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere
  2. Paraview Setup:                                                                                                      https://blog.kitware.com/interactive-visualization-of-google-project-tango-data-with-paraview/
  3. Image:                                                                                                                                          http://ngcm.soton.ac.uk/blog/images/training/2015-06-24-VTK-logos.png

 

 

 

Spring 2016 Additional Fan Bracket Design

Posted by: Luis Valdivia (Project Manager)
Written by: Juan Mendez (Manufacturing Engineer)

Table of Contents:
Introduction
Design
Conclusion

Introduction:
Since weight became an issue with our vehicle, we had to think of an alternative solution to fix the yaw problem. Our alternative solution was to add an additional brushless fan to counter the yaw problem. In order to add on another fan we needed to find a way to mount it on to the current frame. We thought of drilling new holes on to the frame to add on to the bracket, but instead of making new holes, we decided to use the ones that were already on the frame. In order to put the fan between two of the ducted fans, I had to use the holes that were between two of the current metal brackets. I modeled the bracket to be 1.67 by .31 inches as shown in Figure 1 so that they can fit perfectly between two ducted fans.

Figure 1 Demonstrating dimensions of 5th fanbracket

5thfanbracket

Design:

I wanted to make sure that the bracket would enclose the bracket provided by the brushless fan so I made the bracket extend approximately 1.25 inches as shown in Figure 1.
After measuring the bracket that came with with brushless fan, we saw that it was 3.4 by 3.4 mm thick. This is equivalent to .13 inches. In order to make sure that the brushless fan bracket could fit into mine, I made the inner cut of .14 by .14 inches so it can slip in smoothly as shown in Figure 2A. In order to make sure that the 3D printer could print the part without having it warp, I had to make the outer dimensions be .33 by .34 inches thick as shown in Figure 2B. This allowed the part to be printed without any trouble.

Figure 2A and Figure 2B Demonstrating dimensions of bracket design

bracket design

Conclusion:

The result were the parts fabricated shown below in Figure 3 A & B. The brackets were able to mount on smoothly into the brushless fans with no problem. They were then easily mounted on between the ducted fans on the vehicle as seen in Figure 4. Additional brackets were fabricated incase we needed to add a 6th fan to fix the yaw problem.

Figure 3A and Figure 3B alternate angles of 3D printed brackets

printed piece

Figure 4 5th fan attached to 3D printed bracket

attached

Spring 2016 RoFi: PCB Layout

Christopher Andelin (Project Manager)

Mario Ramirez (Systems Engineer)

Qui Du (Manufacturing Engineer)

Andrew Laqui (Electronics and Controls Engineer)

Henry Ruff (Electronics and Controls Engineer)

Table of Contents

PCB Layout

Qui Du (Manufacturing Engineer)

 

Once I received the PCB schematic from the Electronics and Controls Engineers, I create the PCB layout.

First, I clicked on the Generate/Switch to board  button button at the top left corner of the schematic window. Then I clicked Yes on the Warning window to confirm that we will create a PCB layout from the schematic. The below window will appear:

figure 2

Figure 1: Generate/Switch to Board

 

Adjust PCB Board Size

I designed the PCB board the same size as the Arduino Mega (101.6 X 53.33mm) to allow the user to interchange the PCB with the Arduino Mega in RoFi’s head. To adjust the PCB board size, first I turned grid on by clicking the Grid button → changing the Unit to mm → selecting On at Display → and then by clicking Ok. Then I clicked on the top right corner of the white rectangular and adjusted the until shape until it reached 101.6mm X 53.33mm.

figure 2

Figure 2: Turn on Grid Display and change unit length

figure 3

Figure 3: Adjust the size of PCB board

 

Visualize and Understand PCB Design

figure 4

Figure 4: System Block Diagram with Arduino Mega

Since our level one requirement requires that we not use the Arduino Mega; we installed the ATmega1280 chip onto our PCB board. We still need to adjust the pin mapping from the ATmega2560 board to the ATmega1280 chip on the system block diagram. More information can be found at, https://www.arduino.cc/en/Hacking/PinMapping2560.

 

Component placement

The power trace takes up a lot of space on our PCB, therefore, it is better to isolate the power supply with other components.  In my design, I placed the power trace on the top border of the PCB board.

I began placing the ATmega chip, Bluetooth, USB chip, Accelerometer/Gyroscope onto the board and placed all the supporting components around them. Then I used smash features to smash and delete unimportant names on the PCB layout.

figure 5

Figure 5: PCB Component Placement

 

Make a Ground Plane and Copper Pours

Apply polygon on top layer.

figure 6

Figure 6: Draw Polygon on Top Layer

Next click the Ratsnest button to view the ground plane.

figure 7

Figure 7: Top Layer Ratsnest Results

Apply Polygon in bottom layer.

figure 8

Figure 8: Polygon Applied to Bottom Layer

Click Ratsnest button.

figure 9

Figure 9: Bottom Layer Ratsnest Results

 

Draw a Wire Signal

Determine a current width trace

According to our power report found here, https://www.arxterra.com/spring-2016-rofi-preliminary-project-plan/ each servo can draw up to 1.896A.

figure 10

Figure 10: Current Draw

Since we plan to order our PCB board from www.4pcb.com, I used the trace width calculator from their website to determine the trace width of each wire.

Note: The thickness of the trace cannot be adjusted in Eagle CAD. We can order the trace thickness when we send the PCB layout to the PCB fabrication house. In our PCB layout, we ordered a 2 oz/ft^2 thickness.

figure 11

Figure 11: Required Trace Width

figure 12

Figure 12: Visual of Current Trace Width

 

DRC Check

Each PCB fabrication house has its own set of design rules, since we are using www.4pcb.com to fabricate our PCB, we followed their design rules.

4pcb Fabrication House DRC Check

Step 1

Download the DRC file by going to,  http://colinkarpfinger.com/blog/2010/ordering-pcbs-designed-with-eagle/.

Right click typical_4pcb.dru → choose Save link as → Save the file

figure 13

Figure 13: Right Click typical_4pcb.dru

Step 2

The window below appears once the DRC check icon is selected in the board window.

figure 14

Figure 14: DRC Window

figure 15

Figure 15: No DRC Error in our PCB Layout

 

Create Gerber Files

Step 1

Enable vector front by going to Option → User Interface → check Always vector front → OK

figure 16

Figure 16: Enable Vector Front

figure 17

Figure 18: Select CAM Processor

Open the CAM job → choose the CAM job file → click Open → click Process Job to generate Gerber files.

 

Get PCB Layout Quote From Fabrication House

After I zipped all the Gerber files and uploaded them to, www.4pcb.com, I received the PCB Layout Quote.

figure 18

Figure 19: PCB Layout Quote from www.4pcb.com

 

Spring 2016 re-design of structure rods

Posted by: Luis Valdivia (Project Manager)
Written by: Juan Mendez (Manufacturing Engineer)

Table of contents
Introduction
Approach
Re-design

Introduction

Space and weight was an issue with the vehicle. Since we were going to add a buck converter to control the brushless fans we had to reduce the weight of our current vehicle in order to compensate for the weight added on by the brushless fans and buck converter. We also noticed, some of the rod ends were broken from over tightening the set screws to the brackets (from previous semesters). Figure below demonstrates the damaged rods. 

Figure 1.1 Demonstration of damaged Carbon Fiber rods

20160501_135111

Approach

To reduce the weight, I redesigned the rods that were hold the ducted fans together and made them smaller in length. There were three rods that held the fans together, One of which was 6 inches long and the other two were 2.75 inches long. This was a simple modification. I made the rods to be .46 inches in diameter which was the same size as the previous rods. Since we wanted the rods to be shorter, I made them 1.7 inches long. By doing so, we were able to get rid of the long rod and have four individual rods for each ducted fan. We were able to reduce the weight from 5 grams to 3 grams. 

Re-design

Figure 1.2 Design of rod next to 3d print of rod

rodcomparison

Figure 1.3 New position of battery due to 3d printed rod

We were also able to remove the middle part of the frame which gave us more space to work with. Now we have no worries about the battery hitting the floor or any surface that the vehicle is resting on.

batterycomparison

Spring 2016 Trade off study: 5 Blade EDF vs 10 Blade EDF

Written by: Luis Valdivia (Project Manager)
Posted by: Luis Valdivia (Project Manager)

Table of contents
Introduction
Results
Conclusion

 

Introduction:
Due to weight concerns, the spring 2016 UFO Ab-ducted group was advised [by the instructor] to perform trade off studies between 5 blade Electric Ducted Fans (EDFs) and 10 blade Electric Ducted Fans (EDFs). This study will give our group and understanding the benefit of either configuration. Ideally, the 5 blade fans would be lighter than the 10 blade fans. If we are able to deliver the same amount of thrust with a lighter fan, our vehicle would be able to achieve liftoff with the same sized EDFs.

 

Results:
Weighing both EDFs, we measured the 5 blade EDF at 93g and the 10 blade EDF at 100g.

Figure 1.1 Weight of 5 blade EDF (in grams)

5bladeweight

Figure 1.2  Weight of 10 blade EDF (in grams)

10bladeweight

Table 1.1 results from different thrust values for 5 blades edfs and 10 blade edfs

Throttle 5 blade EDF (g) 10 blade EDF (g) Allowed weight of vehicle with 5 blades in (g) Allowed weight of vehicle with 5 blades in (g)
off 0 0 0 0
min 7 7 14 14
mid 140 235 280 470
max 530 650 1060 1300

Figure 1.3 Throttle position at minimum (after multiwii has been armed)

zerothrust

Figure 1.4 Throttle position at middle

midthrust

Figure 1.5 Throttle position at maximum

fullthrottle

Conclusion:

Measuring the thrust with the setup in figure 1.6 and figure 1.7 , we concluded the 10 blade fans produced more thrust with no significant change in weight or size to the 5 blade competitors. For our application, it seems like the 10 blade fans will bring in slightly more weight that won’t contribute to much since they produce almost twice the amount of thrust the the 5 blade fans.

Figure 1.6  Set up used to measure thrust (in grams) of 5 blades

5bladethrustweight

Figure 1.7 Set up used to measure thrust (in grams) of 10 blades

10bladethrustweight

Spring 2016 RoFi: Bluetooth Verification Test

Christopher Andelin (Project Manager)

Mario Ramirez (Systems Engineer)

Qui Du (Manufacturing Engineer)

Andrew Laqui (Electronics and Controls Engineer)

Henry Ruff (Electronics and Controls Engineer)

Bluetooth Verification Test

Mario Ramirez (Systems Engineer)

Test Objective

To verify that a Bluetooth module, HC-06 and a cell phone are able to communicate within a distance of 10 feet +/- 0.5 feet.

Tools

Figure 1 indicates that a measuring tape is needed to verify this test.

figure 1

Figure 1: Measuring Tape

Preliminary Info

Bluetooth code: https://drive.google.com/drive/my-drive

Bluetooth Circuit

Figure 2 shows how to connect the Bluetooth to the Arduino for this test.

figure 2

Figure 2: Fritzing Diagram

Procedure

Setup the Bluetooth module, Arduino and a LED.  Verify that the code is uploaded to the Arduino and begin.

1.Lay the measuring tape and create a distance of 10 feet.

figure 3_compressed

Figure 3: Measure Distance

2. Starting at 1 foot away from LED, turn the LED on and off with your phone to insure you are connected.

3. Move away 0.5 feet and again turn the LED on and off to insure you are connected.

figure 4_compressed

Figure 4: Turn LED on and off while moving back

4. Repeat step 3 until you reach 10 feet.

figure 5_compressed

Figure 5: Turn LED on and off at 10 feet

Results

Figure 6 is a table of my results.

figure 6

Figure 6: Results

In our requirements the Bluetooth module must have a range of at least 10 feet; from our verification test, we have met this requirement.  Trial 4 was a test to verify our max range and 27 feet was the maximum range we could physically move away from the Bluetooth module while remaining in the same room.

Spring 2016 RoFi: Bluetooth Communication

Christopher Andelin (Project Manager)

Mario Ramirez (Systems Engineer)

Qui Du (Manufacturing Engineer)

Andrew Laqui (Electronics and Controls Engineer)

Henry Ruff (Electronics and Controls Engineer)

Bluetooth Communication

Mario Ramirez (Systems Engineer)

To meet requirement 1.8, RoFi must communicate with the Arxrobot App and have an on and off state using the users phone.  Begin your Bluetooth connection by downloading the Arxrobot firmware, https://github.com/arxterra/BiPed-Robot.  This code has the commands and command decoder subroutine to control RoFi using the Arxrobot app.

First, connect and setup your Bluetooth mode, HC-06.  The pass code for connecting to the module with your phone is ‘0000’.

figure 1

Figure 1: Bluetooth Fritzing Diagram

 

figure 2

Figure 2: Bluetooth Fritzing Schematic

Within the Arxrobot firmware a custom command will be made.

figure 3

Figure 3: Arxrobot Custom Command

To initially test the custom command, a simple LED on and off command will be implemented within the command decoder subroutine.

figure 4

Figure 4: LED Subroutine

Once proper Bluetooth connection is tested, change the implemented command to your desired action.  For RoFi, we created a trigger after the command is received.

figure 5

Figure 5: Trigger Command

When the command packet is sent, the code will then read the 3rd byte.  If the byte is HIGH it will set trigger to HIGH.  If the byte is LOW it will set trigger to LOW.  Using this trigger variable, an “if” statement was implemented into our main loop code.

figure 6

Figure 6: HIGH or LOW Command

Figure 6 shows two “if” statements for different values of the trigger.  When the trigger is HIGH, it will light an LED and put RoFi into an Update Action subroutine which allows RoFi to update to its next frame.  When trigger is set to LOW, RoFi will not take any action and will remain at its current frame until trigger is set back to HIGH.

Spring 2016 RoFi: Calibration

Christopher Andelin (Project Manager)

Mario Ramirez (Systems Engineer)

Qui Du (Manufacturing Engineer)

Andrew Laqui (Electronics and Controls Engineer)

Henry Ruff (Electronics and Controls Engineer)

Calibration

Mario Ramirez (Systems Engineer)

Introduction

Before attempting to walk with RoFi, a calibration test must be done.  Using Robot Poser, Jonathan’s instructions and the calibration file (located below), perform the needed test and create your own calibration file.  This file will be RoFi’s starting/zero position for each routine in the future.  All future angles will be in reference to these zero frames.

Robot Poser:  http://www.projectbiped.com/prototypes/rofi/programs/robot-poser

This download includes the calibration file.

Jonathan Dowdall’s instructions: https://docs.google.com/document/d/1H0iGTlUO-VljwtqiN5W3QWxoLYYhNEEphhULrg87Wgc/edit

Blender File for RoFi calibration:

https://docs.google.com/file/d/0By_h1KTMNaWNcmlMS0FNWGJ5OVE/edit

This post is in reference to, https://www.arxterra.com/bipedal-robot-calibration/.

Our team’s calibration

Figure 1 shows RoFi in High Roll Position.

Figure 1: High Roll Position

Figure 2 shows that RoFi’s foot is level.

figure 2_compressed

Figure 2: Verifying Level Foot

Figure 3 shows RoFi’s leg is perpendicular to the table.

figure 3_compressed

Figure 3: Verifying Perpendicular Leg

Figure 4 shows RoFi in High Position.

figure 4_compressed

Figure 4: High Position