Pages

Saturday, August 29, 2015

Physics 295 Project / Connecting MPU-6050/GY-521 to Arduino UNO

It was a while since I wrote the last post. I have some of them almost ready to publish, but they still need some polishing. Recently, I've enrolled in the course called Physics 295; it's an independent research in physics. Check out the video below:



The video shows Far Horizons Project at the Alder Planetarium in Chicago. The project uses a weather balloon to perform experiments at high altitudes. It flies over 100,000 feet into the stratosphere, as it goes up, the air is so thin the balloon expands until it ruptures. Here is the view:


As you can see, the camera moves in every direction, but our project is to make it rotate into one, set direction without all of that swiveling. My role in the project is to program the Arduino with all of it's component to fulfill that goal. I'll post the pictures of the construction next week, so you'll have a better idea of what it looks like.

Today, I would like to show you how I connected the MPU-6050/GY-521 Accelerometer with Gyroscope. The MPU-6050 sensor contains a MEMS accelerometer and a MEMS gyroscope in a single chip. More on it, here. 


MPU-6050/GY-521

Connecting MPU_6050/GY-521 to Arduino UNO

Step 1: Arduino connections



Here are schematics and graphics, please notice that you have to connect the power to 3.3V.




MPU-6050/GY-521
Arduino UNO
VCC
3.3V
GND
GND
SCL
A5
SDA
A4
INT
2


Step 2: Upload the code and test



Download the Arduino Library for MPU-6050/GY-521, extract the library. Copy/Cut the folder ‘MPU6050’ and paste it in C:\Users\UserName\Documents\Arduino\libraries (Windows OS), or in the Arduino’s library folder (for other OS).

You should see the library’s examples added to your menu.




The other way to do this after you download the zip file, without extracting it, go to Sketch > Import Library... > Add Library... > Select the location of MPU6050.zip file.

Add I2Cdev library following the same instructions.


Before we start, let’s calibrate MPU6050. Open AccelGyro_calibration file and upload it to Arduino.




Next, open up a Serial Monitor and set the baud rate to 115200. Make sure, the sensor is placed on levered surface in horizontal position, with package letters facing up, and don’t touch it until you see a finish message.






Make sure you note the offsets and close the sketch.

Open the example program from File > Examples > MPU6050 > Examples > MPU6050_DMP6.


Inside the code, supply your own offsets from the calibration, make sure you type them in the right fields.



After all is set, run Serial Monitor (115200 baud). At this point you should see the values coming in from MPU-6050/GY-52.



Step 3: Model values from MPU-6050 using processing.


Download processing IDE. Open up MPU6050_DMP6 from examples library. Comment #define OUTPUT_READABLE_YAWPITCHROLL  by  //#define OUTPUT_READABLE_YAWPITCHROLL.

Uncomment: //#define OUTPUT_TEAPOT  by  #define OUTPUT_TEAPOT.




Upload the sketch to Arduino. Then open processing example for the MPU-6050. File > Open > navigate the folder where your MPU6050 library for the Arduino (Windows: C:\Users\User_Name\Documents\Arduino\libraries\MPU6050\Examples\MPU6050_DMP6\Processing\MPUTeapot).

Inside the code, change the values (notice, you’re not in Arduino software now, you’re in Processing):

Comment - String portName = “/dev/ttyUSB1″  by  //String portName = “/dev/ttyUSB1″;

And uncomment - //String portName = “COM4″;  by  String portName = “COM4

Replace COM4 with COM port on which your Arduino is connected (Tools > Serial Port).



Download toxiclibs-complete-0020 folder and copy it to Processing libraries folder (Windows: C:\Users\UserName\Documents\Processing\libraries).

You are ready to run processing code by clicking play symbol. Wait for about 10 seconds for the sensor to get stabilized, after that you can see 3D model of your MPU-6050/GY521.

Quick demo:





I got two more sensors to connect to Arduino, it's a Magnetometer HMC5883L and a Pressure Sensor BMP180 which I'll write a tutorial next time. The sensors will talk to Arduino and the board will adjust the motor to rotate accordingly. More pictures coming!

Wednesday, October 29, 2014

IoTWF 2014 Chicago

Cisco Systems Inc, presented the second, annual Internet of Things World Forum which took place on October 14-16 in Chicago at Hyatt Regency Hotel. More than 1500 customers attended. One of the key features from the forum was the Smart City Walking Tour. The tour presented a variety of smart solutions deployed in the city of Chicago. The Cisco division from Chicago planned to construct a Dream Team of students to work with Cisco Engineers in order to create the best experience for the Walking Tour. I was honored to be a part of the City Colleges of Chicago - Wright College team. We had to go through the application process on which we have been chosen to participate in the event! Cisco Engineers invited us to their Chicago headquarters located in Rosemont, Illinois. We went over the project and responsibilities of the team which included assistance in manning the Operation Center and monitoring the wireless network infrastructure along with data center infrastructure. It also included attending and monitoring connectivity during walking demonstration tours. Among us, they also choose the Cisco Academy students from Moraine Valley CC and Robert Morris University. We also met a day before the event to perform a dry run of a tour to prepare us for the big day. Engineers showed us where the access points were located on the street, the stops of the tour and what we should expect during the event. The whole Walking Tour experience started off with a keynote inside the Hyatt Hotel. Then attendees were instructed to download a special application for their smart devices in order to follow the tour. Everyone received headsets and they went to the first stop. Here is the overview of the tour:





The first stop consisted of a smart intersection, connected traffic signals, the Cisco NERV Vehicle and the Chicago Police Command Vehicle. At the smart intersection we could see the air-quality and traffic sensors which provided a real-time data analysis. Connected traffic signals offered remote monitoring and control of the active signal phases of the intersections. Next was the Cisco NERV Vehicle which enables restoration of communication after emergencies. It is capable of providing high quality video communication with other emergency and city service agencies and vehicles. Next to the Cisco vehicle we could see the Chicago Police Command Vehicle which serves as a mobile command and control post that is integrated with existing city public safety technologies.









Cisco NERV Vehicle

The list of deployments for NERV Vehicle

US Amateur Radio Bands

The inside of NERV Vehicle




The inside of Chicago Police Command Vehicle

The inside of Chicago Police Command Vehicle

The inside of Chicago Police Command Vehicle


At the second step, attendees could experience Chicago Landmarks and views including the Tribute Plaza, the Wrigley Building, three layers of Wacker Drive, the Jardine Water Filtration Plant and of course the Chicago skyline.

At the third stop attendees were introduced to the City Wi-Fi. City Wi-Fi is a city ICT (information and communications technology) network that connects all the sensors and actuators with a central operations center, city personnel and optionally with the general public. We could also see street lights that were connected to the whole smart infrastructure. The lights had LED light fixtures that reduce the energy consumption.


One of many Cisco Access Point (white box on the light pole)



Cisco AP along with LED street light




Stop number four presented the connected buses and shelters. Each bus is sending its positional information to allow Chicago Transit Authority to predict arrival times at each station and show that information to travelers who are at the bus shelter at that time. This is not a new technology, everyone from Chicago saw this at various bus stops around the city, mostly downtown area. One of the Divvy Bike Stations was introduced at the same stop. Divvy Bike Stations provides bicycle rentals to Chicago residents and travelers. The stations communicate with the Divvy Service Center so bikes can be redistributed as needed to higher-demand areas. We could also see the solar-powered trash compactors located at every intersection on Michigan Avenue. When they are full, the cans signal the Sanitation Department in order to be disposed.





Stop number five was very similar to stop two which showed Chicago Landmarks and views of Millenium Park, Maggie Daley Park, and Grant Park.

At the end of the third day we were exhausted, but very happy since we were told that we are going to meet John Chambers, the CEO of Cisco Systems Inc. We took a group picture with Mr. Chambers, Cisco Engineers and the members of the Dream Team. Mr. Chambers thanked us for our help in this event and wished us all the best and for the most part this was the end of the Internet of Things World Forum. It was a great experience working for the worldwide leader in networking.



Few more photos from the Forum:








Wednesday, August 13, 2014

DEF CON 22

This weekend me and couple of my friends went to attend the largest hacker gathering in the world called DEF CON. The event was 22nd event in the history of the conference and it's happening every year in Las Vegas, Nevada.
Too bad the badges ran out in the second day of the conference and we received the Kinkos badges...

DEF CON 22 badge

Too bad, because the badge is a hackable badge, here is the article that tells you everything that you want to know. It's really cool, because you have to find the clues all over the conference halls, inside the CD that they give you along with the badge, etc. Here is the link to the group that was able to hack the badge and received the Black Badge which allows free entrance to DEF CON for life.

Couple of more pictures from the event:

Line for badges

Penn&Teller Track

Track 1


DEF CON grew so big that in the next year it is going to be August 6-9, 2015 at Paris AND Bally's on the Las Vegas Strip. DEF CON 22 website - check out the content to find out what happened during this DEF CON. See you next year!


Tuesday, July 29, 2014

Computer Forensics Lab Project - Network Racks cleaned up

My current project is coming to an end. I just finished up connecting and organizing cables. I did not post a lot of details, but there was a strict deadline for the project. I still did not finish everything, but here's how the network racks are looking right now:


Neat and organized cables with a lot of free space between the equipment.


Here's the closer look up front:




and from the back:



I decided to use the color codes for the cables. Green cables are the ones that connect every workstation to the network along with the servers. White cables are cross-over cables that are connecting the switches, and the blue cable connects the domain, DHCP, and other services server.

We have bunch of HP ProLiant DL360p Gen8 Servers ready to be imaged and deployed for the student use. Each one of them consists of three 300GB hard drives. I'm planning to image them with Windows Server 2003, 2008 and 2012 operating systems. It would be fun for the next couple of days. Hopefully I will be able to find some time and post some pictures.




For the end, the look of the lab itself, as of today: