The stepper motor was set on contineous motion, and the power consumption was measure. The power consumption was equal: 0.247A
In the individual assignment, we had to output something using a board we have designed.
So as a first step, i already built my Hello Board in the past weeks having a built in LDR sensor on it. The board has 2 LEDs of different colors, one Red and one Green, in addition to a Photoresistor (LDR) and a Button.
In this example, the LED is considered to be the output device.
The objective of the board is to measure the light intensity and based on that, the LEDs will turn on. The Green LED will turn ON when there is light and the Red LED will turn on when there is darkness. Note that the frequency of the LEDs flash depends on the intensity of Light or Darkness measured by the LDR. The more the light or darkness, the faster the blink of the LED.
Due to my limitation, the only way to represent the values read was by using the on board LEDs. Thus the board reads an Analog Value from the LDR, and converts it into a frequency for th LEDs blinks.
So i gave the board an extenal power using an FTDI Basic Breakout - 5V and checked if it works all by itself. And it did work :D. The video represents the functionality of My Hello Board.
As a second step in this week's individual assignment, I wanted to start designing a new board that will be used on board of the Pipe Surveying Robot i am planning to build in my Final Project.
Thus to do that, some research was done to check the available outputs that i will be using to control the robot. The main mission of my Robot is to survey existing pipes, gather data related to its path underground, mainly anglural data, and save this data on a memory stick.
So the set of outputs needed that i could be using on my robot are mainly the following:
Next i need to design the control board of my pipe surveying robot i am building. Many points had to be taken into consideration while designing the board, mainly the Architecture of the Microcontroller i am using, the pin connection to the sensors and outputs i am using.
When i first designed my board, the idea was to have 6 wheels drived by 6 small stepper motors. However, because i could not find the stepper motors i want in the market, i decide to change my design to have 4 NEMA 17 stepper motors. Those motors will drive 4 Mecanum Wheels that will achieve front motion and linear motion when needed, to correct the angle of the robot inside the pipe.
In addition to that, a servo motor will be used to control the angle of contact between the wheels and the inner survace of the pipe. Another servo could be used to push to the top side of the pipe to prevent slipage while motion.
Based on the new design, some edits were made on the board design, to achieve what i want. Two stepper motor output pins were deleted, and 2 Servo motor output pins were added.
After connecting all the components on the board, the next step is to organize the schematic of the components. This schematic represents the location of the components on the board and the path of the connection in between the components. This step takes time and requires some art and concentration. During this level, the following points must be taken into consideration:
After finalizing the layout of the PCB on Eagle, we want to extract the image that represents the PCB design. To do so we need to follow the following steps.
After extracting all images that represent the internal and external paths of the milling bit, it's time now to produce the g-code. I used Fab Modules to produce the g-code for PCB milling on the Roland MDX-40.
The following steps were followed on Fab Modules to generate the g-code:
After preparing the G-code, the following steps were taken to mill the layout onto the copper board:
Now that we have the PCB layout cut-out, the next step is to start soldering. In order to do so we first need certain tools to proceed, find the list with specs below:
After finalizing the code, the next step is to upload the code to the newly constructed Board. To do that, we have to set first the Arduino Board as an ISP. To do so, the following steps are followed.
Because nothing works correctly for the first time, i had a problem in my board. Downloading the code was working correctly, but the code wasn't launching on the baord unless i pressed the Reset button. So i was sure that there is something wrong in the Reset Button Design.
After checking all connections, i noticed that the +5V and GND were switched in the design, so tynically the system was always on reset mode, and presseing the button would allow the microcontroller to start the code.
Some minor changes were done on the board, mainly remaping the +5V and the GND, which fixed the problem, and the design was then edited.
After burning the bootloader, the next step is to test the various inputs and outputs using the newly constructed board.
But first, i wanted to make sure that my board really works before testing the inputs and outputs.
So in the beginning, I performed various test to check if my board is working, and then to check if i can successfully recieve data from my inputs and issue and save data on my outputs.
You can download the test file from the following link:
Serial Test This code tests if the board works and sends data to the serial monitor
Next i tested the board using the very famous Blink code.
After that, i tested all the previously used codes that are used during my test with the Arduino board. All codes are linked above and in the previous week. The codes were edited based on the pins that are used to connect to the inputs and outputs. The image represents the relative Arduino pins that i will be using during coding, with respect to the ATMEga 328/p Microcontroller
To program the board, I used an FTDI cable through the FTDI pin found on my board. As shown in the image above, the Ground pin is the one near the Crystal. The following process is usually followed to upload the code on the Board.
In order to control a stepper motor, a Stepper Motor Driver is required which will recieve two signals from the microcontroller in addition to two power supplies, one coming from the Control Board and the other is the Voltage Needed to power the Stepper Motors.
The stepper motor driver has the the following pins
The Servo motor is maily used to produce a controlled angular motion. The servo motor is connected to the control board using 3 pins:
The main tool i will be using to save the data collected by the robot is the microSD Transflash Breakout.
Breakout board for the microSD socket that is not much bigger than your fingernail. Compatible with the SPI interface found on any SD card, this tiny form factor was created for cell phone storage and is perfect for your next MP3 project! Board comes fully assembled and tested.
The microSD Transflash Breakout has 7 pins:
As mentioned previously, the Ultrasonic Distance Sensor is a Digital Sensor. The HC-SR04 Ultrasonic Sensor Module has four pins:
The main sesnor i will be using in my Pipe Surveying Robot is the the MPU-6050.
The InvenSense MPU-6050 sensor contains a MEMS accelerometer and a MEMS gyro in a single chip. It is very accurate, as it contains 16-bits analog to digital conversion hardware for each channel. Therefor it captures the x, y, and z channel at the same time. The sensor uses the I2C-bus to interface with the Arduino.
The MPU-6050 is not expensive, especially given the fact that it combines both an accelerometer and a gyro. Also note that Invensense has combined the MPU-6050 with a magnetometer (compass) in a single chip called MPU-9150.
The accelerometer measures the acceleration along one direction, while the gyroscope measures the angular acceleration on one axis. The module has 8 pins: