A Project By:
Sacheth Hegde - ssh88
Ope Oladipo - ooo25
Jason Zhang - jcz28
Contents:
Introduction
High Level Design
Design
Results
Conclusion
Appendix:
A - Release Permission
B - Program Listing
C - Schematics
D - Cost Details
E - Task Breakdown
F - References
Oftentimes, photographers need to create moving timelapses across a landscape. A motorized camera dolly can be used to create these. The dolly is essentially a moving robot with the ability to move the camera position as well. Photographers can program the dolly with certain motions and place it on a landscape. After setting the time-lapse mode on, the camera dolly will move accordingly and take the timelapse until the photographer determines the shot to be sufficient.
Our camera dolly can be controlled using an iPhone application that we created. There are two modes: free mode, where the photographer can manually control the dolly or camera angle, and programmed mode, where the photographer can program many different actions (such as moving forward, moving the camera, etc.) over a time period so the time lapse can be complete.
Project Rationale
Ope Oladipo, one of the members of our group, is an avid photographer (you can check out some of his photography here). One of the common photography/videography practices includes timelapses, which are held for a long period of time and show a changing landscape spedup. Camera dollies (an example of a professional setup can be seen here) are used to hold cameras and slowly move over time to capture a timelapse. The have the ability to control the speed of the camera and slowly update the angle. These end up creating very professional looking timelapses. What is important here is to make sure movement is consistent and stable so the motion through the timelapse is seemless. Therefore, our goal was to end up making one of these camera dollies that could be used to make professional looking timelapses. Additionally, if the user wanted to, we wanted the ability to have free control if necessary to move the dolly to a given location manually.
Logical Structure
As mentioned in the Introduction, the high level view of our project includes an iPhone application, which is used to control the motorized dolly. The layout for this can be seen in the block diagram below.
Program Details
As mentioned, we wrote code to work on an iPhone app and the PIC32. We will first talk about the PIC32 software implementation.
There was no TFT requirement for this lab, so we did not need to use any of the communication pins for TFT display. As with most of the labs, we used the ProtoThread library to perform most of the threading to collect data, perform actions, etc.
To rotate the stepper clockwise, the phases must be sequenced from 1 to 4 (the reasoning for which will be described in the hardware section), wrapping around after phase 4 has completed. To rotate the stepper counterclockwise, the phases must be sequenced in the opposite direction. A protothread was used to handle the rotation of the stepper motor. The 4 phases were encoded within this protothread, and the phase of the stepper was updated each time the protothread yielded. Using this scheme, we could vary the rate of rotation by varying the length of time that the protothread yields for. A shorter yield time leads to a faster rotation speed because the phase of the stepper is updated more frequently. Conversely, a longer yield time will lead to a slower stepper rotation speed.
For receiving data from the iPhone application, a serial input protothread handles the receiving functions on the UART. Within this protothread, a thread is spawned that waits for a valid input from the bluetooth module. The spawned thread is non-blocking, so other threads can execute while the bluetooth module does not have a valid message to give the PIC32. Once a message is received from the bluetooth module, the spawned thread is killed and the input protothread parses the message to determine the course of action that should be taken. The following list enumerates the messages that are recognized by the PIC32, as well as the actions that are taken upon receiving the message:
"RST" | • Stops all movement of the robot wheels • Sets the robot speed and stepper rotation rate to default values |
“ASPD {time in seconds}” | • Sets the length of time it will take to rotate the stepper to the angle specified in the “ANG” command |
“ANG {angle between 0 and 360}” | • Rotates the stepper to the angle specified |
“SPD {number from 0 to 100}” | • Sets the speed at which the robot should move |
“UP” | • Moves the robot forward indefinitely |
“DOWN” | • Moves the robot backwards indefinitely |
“LEFT” | • Rotates the robot counterclockwise indefinitely |
“RIGHT” | • Rotates the robot clockwise indefinitely |
“STP” | • Stops all movement of the robot wheels |
The technical aspects of the project were completed on par with our expectations. Our robot was able to traverse forwards and backwards, as well as rotate clockwise and counterclockwise in place. This allowed for freedom of motion in the xy-plane. A user can configure the robot to move on this plane in any way desired. In addition, the attached camera could rotate 360 degrees, independent of the robot platform. The camera rotation was limited in granularity by the stepper motor, which could rotate in multiples of 7.5 degrees at a time. However, this issue can be avoided by rotating the entire robot itself, which allows for an infinite range of degrees. Free mode on the robot, we found, was very accurate. When controlling the robot through the phone, we saw that the robot's movement was very swift and there were never any issues with unexpected movement. At times, due to uneven or unideal surfaces, the robot didn't go perfectly straight when the user intended it to.
The robot was highly responsive to commands from the iPhone app. We leveraged existing technology to avoid the need to create a complex communication scheme from scratch. Bluetooth is a proven close-range communication technology that provides high speed data transport.
There was no lag between when the user touches a button on the app and when the robot responds. As such, we could provide highly accurate timing in programmed mode. For rotating the stepper, timing was done on the PIC32 by changing the protothread yield times. This does not ensure precise timing, as there are no guarantees that a thread gets scheduled immediately after yielding. To optimize against these uncertainties, we programmed the hardware with efficient code and very few, short, non-blocking threads. We found that performing timing on the hardware yielded very results. The stepper was very responsive and did indeed rotate to a desired position in the specified time. Any slight inaccuracies would be unnoticeable in the recorded time lapse video. Also, for a short range device, bluetooth performed very well, being responsive at distances of up to 40 ft.
We never encountered a case where the robot continued motion beyond its instructed path. Nonetheless, we programmed an emergency stop button into the app and hardware to safely stop the robot in the case of a miscommunication.
We also believe this robot/app is very usable by the general public. Because we have an iPhone application that can be downloaded, and the robot is very modular in usage (with no detailed setup required), anyone can easily connect to the robot and control it. There is no need to run programs, or calibrate any part of the robot, which makes usage very simple.
Shown below are a few pictures of our robot from different views.
Overall, we believed that we did a respectable job with the project, as it is a project that we could potentially use for making neat videos or timelapses (mostly Ope, the photographer but can easily be extensible to anyone). All the features we expected to be on the vehicle were implemented (as we thought up initially during the mandate). All the individual components worked as expected and there were no major issues that prevented proper usage of the project. We were also able to make the multiple modes of usage (free mode and programmed mode), which made the project much more flexible.
If we were to do the project again, however, we would definitely change many things to improve the complexity of the project and make it neater. With regards to complexity, we definitely would have tried implementing more complicated programmed instructions that would allow better control of the dolly if it were to travel in an unusual landscape. An initial thought for a UI included drawing out a path, and programming the robot to move as such. Additionally, we also had ideas of allowing for more complex camera movements (all of pitch, roll, and yaw). Finally, a lot of the final robot could have been a bit neater (though it didn't hinder functionality), and we could have solved this by either making a PCB or figuring out wiring for the entire device before soldering individual components on a circuit board.
There weren't too many standards we needed to comply with for our project. We did use bluetooth to help communicate between our iPhone and the robot, but the chip satisfies all required standards. This can similarly be said about the iPhone application side, as all development was done through official Apple software.
Intellectual Property Considerations
Through the development of the project, we believe we did not violate common rules of intellectual property or reuse protected code. All of the code on the PIC32 was written by ourselves, and was based off of work we had completed in previous labs. The code for the iPhone application was also written by us entirely.
Unfortunately, there are no patent opportunities of opportunities for publishing for this project, as camera dollies are used commonly in practice. This was our own internal project however, and is able to function off of tools built by us.
Ethics
We took a look at the IEEE code of ethics before starting our project and followed it as closely as possible. We were consistently looking at the safety aspects of our projects. We did a lot of testing of the individual components and as a whole as well. We also tested our product in multiple terrains and made it safe to handle, making sure to hide and insulate all our wires and arrange them in such a way as to prevent noise and interference between batteries and motors like using different sources of power for different components and using a common ground. In writing this report we were sure to be as honest as possible and detail any pitfalls and limitations to our knowledge so as to avoid any confusion or misrepresentation of our project. We also made sure to do a lot of research and to ask people with better technical competence when needed for parts we didn’t know how to proceed on. In all this was a project with little ethical concerns from the builder's perspective. The consumer might have to answer their own ethics questions as to where would be an acceptable place to use this device (e.g, it’s use on private property) but that is beyond our control. We’re proud to have built a safe and easily controllable device with multiple fail safes that has been tested thoroughly.
Legal
For our bluetooth scheme, we were sure to use commercially available products, which adhered to any bluetooth regulations as specified within the chip datasheet. Additionally, as specified in the previous sections, we used legal and official software (Xcode) for iPhone app development, and were able to test the application through provided certificates.
The group approves this report for inclusion on the course website.
The group approves the video for inclusion on the course youtube channel.
Our PIC32 code, written in C, can be found at the following link. The code written for the iPhone application can be found at the following link.
DC Motor Schematic:
Shown below are the various purchases we made for the project. Everything else in the project (such as some of the ICs, the stepper motor, etc.) were scavenged within the lab.
Name | Description | Cost |
INSMA Motor Smart Robot Car Chassis | This package contained a laser-cut chassis, two DC motors, a battery pack container, and wheels. | $13.85 |
CTYRZCH AT-09 BLE Bluetooth Module | This was the bluetooth chip we used to communicate from the PIC32 to the iPhone application. | $10.99 |
AA Batteries | The batteries were used to power the DC motors and stepper motor. | $5.03 |
PF35T-48L4 Unipolar Stepper Motor | This stepper motor was used to rotate the camera. The motor was found in the lab space. | $0.00 |
ULN2003BN Chip | This is the transistor array chip (H-bridge) used to control the stepper motor. We were able to obtain a free sample from TI. | $0.00 |
PIC32MX250F128B | Microcontroller | $5.00 |
Solder Board | Board used to integrate the PIC32 and other components. We scavenged this in class. | $2.50 |
Shown below is the distribution of work on the project according to approximate tasks. While we did all have somewhat discrete tasks, there was plenty of cross collaboration and work done on other sections.
Member | Tasks |
Jason Zhang |
• Stepper Motor Functionality and Calibration - This included working through the stepper motor and making it functional. He went through many steps, first through manual usage • bluetooth Integration - This included testing the bluetooth module using UART and writing the corresponding functions to determine what commands the iPhone application specified, and routing them to actions for the PIC32. |
Sacheth Hegde |
• Robot Construction - This included getting the robot chassis, wheels, and camera stand built together and made to be structurally sound. • DC Motor Functionality and Calibration - This included getting modularized functions for moving the vehicle, experimenting with PWM to properly rotate or move the car, and create the H-bridge circuitry (with the L293D chip) to make the DC motors functional. Calibration was also required afterwards for proper speed with weights. |
Ope Oladipo |
• iPhone Application - This included building out the iPhone application to interface with our robot and creating the protocol to communicate (through Strings) the various actions are robot needed to perform. • bluetooth - This included properly testing the bluetooth module through UART and creating modularized functions so our robot could communicate with the iPhone. |