Wednesday, May 8, 2013
Capstone Project Update
Well here is the deal. Today I ran into a very annoying problem with the receiver circuit. Turns out that one of my pins connected to one of my stepper motors continues to go to 0V, even though I connected a pull up resistor to it. I think it is an internal problem with my PIC16F887 but thankfully I have some coming in the mail tomorrow first thing in the morning. Once I have the problem figured out I will post the explanation of the original problem along with the solution I found. My soldering skills are still dreadful and I think this is the root cause of the problems I am having right now. Perhaps I burned out the internal latch of that pin, maybe its something else, its definitely not the pull-up resistor since I checked it more than once and it was fine. Maybe I will post questions on one of the many engineering forums out there and see if anyone has had a problem like mine in the past and they have a viable solution. Ok well if anybody reads any of this and you have any questions please feel free to ask me. I am writing on this thing in order to share my knowledge. Maybe you even have a suggestion on what my problems could be, even though I have not given much insight but I will later.
Saturday, May 4, 2013
Capstone Project - Servo's Interfacing Documentation
I used this servo for the turret and left/right steering. But almost any servo will work for this application. And here you can find the PIC16F887 Microcontroller.
Interface:
Both servos in the project work the
exact same way. A PWM(Pulse Width Modulation) signal is achieved
with the following algorithm to control the rotation. The servos
rotation was programatically limited to avoid vehicle stalling and
over-rotation. The L/R servo is connected to RB7 (Pin 40) of the
vehicle's microcontroller. The Turret servo is connected to RB6 (Pin
39) of the vehicle's microcontroller. When the receiver receives the
proper signals the servos will rotate accordingly and stop at their
preprogrammed positions.
Programming Algorithm: (Actual code will be discussed later..)
#define LRServo RB7
#define TURRServo RB6
int facenorth = 223, fullrotationdelay
= 3000;
int leftrightpositiondelay = facenorth,
turretpositiondelay = facenorth;
int rightbound = 265, leftbound = 180;
int delayincrementstep = 5;
while ( ProgramRunning )
{
//Update PWM signal for L/R Servo
if( TurnRight &&
leftrightpositiondelay <= rightbound)
{
//If right switch is pressed and we
have not reached the right bound
leftrightpositiondelay +=
delayincrementstep;
//increment the high pulse by the
delay increment step 5
}
else if( TurnLeft &&
leftrightpositiondelay >= leftbound)
{
//If left switch is pressed and we
have not reached the left bound
leftrightpositiondelay -=
delayincrementstep;
//decrement the high pulse by the
delay increment step 5
}
if( TurretRight &&
turretpositiondelay <= rightbound)
{
//If right switch is pressed and we
have not reached the right bound
turretpositiondelay +=
delayincrementstep;
//increment the high pulse by the
delay increment step 5
}
else if( TurretRight &&
turretpositiondelay >= leftbound)
{
//If left switch is pressed and we
have not reached the left bound
turretpositiondelay -=
delayincrementstep;
/decrement the high pulse by the
delay increment step 5
}
LRServo = 1; //PWM High Pulse
DelayMicroseconds(leftrightpositiondelay);
//High pulse delay
LRServo = 0; //PWM Low Pulse
DelayMicroseconds(fullrotationdelay –
leftrightpositiondelay); //TTOTAL – THIGH = TLOW
TURRServo = 1; //PWM High Pulse
DelayMicroseconds(turretpositiondelay);
//High pulse delay
TURRServo = 0; //PWM Low Pulse
DelayMicroseconds(fullrotationdelay –
turretpositiondelay); //TTOTAL – THIGH = TLOW
}
Capstone Project Definition
Project Definition
- A remote controlled
vehicle.
Project Significance
- Educating on the
principles of simple ASK(Amplitude-Shift-Key) modulated remote
control signals, interfacing two PIC16F887 microcontrollers at a
frequency of 433MHz, which will control 8 channels with the use of
the microcontroller's EUSART(Enhanced Universal Synchronous
Asynchronous Receiver Transmitter) module to control several
actuators with the end result of a remote controlled vehicle.
Remote
Controller Overview
-
The remote controller consists an ASK modulated transmitter
interfaced with a PIC16F887. There are also
several input switches to control the vehicles forward/backward and
left/right channels as well as the turret and other actuators. An
antenna serves as our transmitting medium. The ASK modulated
transmitter module is paired to the receiver at a frequency of 33MHz.
-
When one of the channel control switches is pressed, the
microcontroller will send the corresponding code to our transmitter and then out
through the antenna for reception.
-
The remote controller will have the ability to set itself to low
power consumption mode when no switches have been activated for
longer than 2 minutes. This feature will prevent the remote
controller battery from rapid exhaustion.
-
When the remote controller is not being used at all, an on/off switch
can be disengaged to cut out power to the components and save your
battery for later use.
-
All IC's will be placed on female headers for simple replacement and
repair.
Vehicle
Overview
- The
main vehicle is remote controlled. It will contain a 433MHz ASK
modulated reciever module connected to a PIC16F887 microcontroller. The signals received from the remote control unit
discussed earlier will control the vehicles forward, backward, left
and right movement through several actuators housed within the main
electronics control box. The actuators themselves consist of 2
individually controlled 12VDC stepper motors for the forward and
backward movement and a 6VDC Parallax Basic 180 degree servo for the
left and right guide controls.
- At the center top of the vehicle is another 6VDC Parallax Basic 180 degree servo. This servo serves to move the turret left and right. When the turret left or turret right signal are received, the microcontroller will be programmed to turn the servo in the respective direction through pulse-width modulation algorithms.
- The
left and right control servo will be programatically limited from
180 degrees to a lower amount because if too far left or right, it
could prevent the vehicle from moving forward. This is a safeguard
for vehicle stall.
- The body of the vehicle will be constructed with primarily wood, plastic, bolts and nuts and glue. It could later be visually re-designed.
Friday, May 3, 2013
Capstone Marks The Start
So here we go, I am almost completed with my final project for ITT Tech. I got a bright idea to start a blog here where I can document all the stuff I want about electronics and engineering. Maybe this isn't worth anything right now, but later my children might find it useful. I will try to document most of my electronics, programming and pretty much anything engineering I know about right here.
Subscribe to:
Posts (Atom)


