Description: A PIC is a Programmable Integrated Circuit. It is the large black rectangle on the breadboard. The standard PIC used in the course was a 28-pin package, the Microchip PIC18F2455. For our project, however, we used a more robust PIC with more advanced PWM (Pulse Width Modulation) features, specifically a 40-pin package, the Microchip PIC18F4455. This more robust PIC operates similarly to the other in terms of software and the function of the inputs and outputs, facilitating an easy transition. However, due to its 40-pin configuration compared to the smaller 28-pin package, a direct replacement was not feasible. To successfully convert from the 28-pin PIC to the 40-pin PIC, extensive documentation from the Microchip website was reviewed. After locating the specifications for both PICs, the course materials describing the PIC18F2455 and its circuitry connections were translated to identify the corresponding pins on the new PIC (See Figure 1). Once the mapping of the PIC was completed, the circuit was constructed.
The PIC is a programmable microcontroller with digital and analog inputs and outputs. It features a USB interface that enables command and data transfer between the PIC and external devices. In this circuit, six digital outputs and three analog inputs are utilized. The analog inputs convert a voltage range of 0 to +5V into a numerical value between 0 and 1023. Due to a loss of 2 bits of resolution, the effective value range is between 0 and 255. The breadboard serves as the white grid on which the circuit is prototyped, typically replaced with a more permanent board in finalized designs. However, time constraints prevented a more permanent solution in this case.
The circuit comprises four main components. The first is the PIC, as previously discussed. The second component is the PIC programmer interface, which facilitates a straightforward connection to the PIC's ICD2 (In-Circuit Debugger), allowing for easy program transfers from a computer without complex rewiring. The third component is the USB port, enabling data transfer between the control laptop and the PIC during operation, allowing for real-time control of the hovercraft from the connected computer. The final component on the breadboard is a set of three H-Bridges.
Before discussing H-Bridges, it is essential to mention the motors used in the hovercraft, which are newer model LEGO motors. These motors operate at speeds proportional to the voltage difference across their terminals. If one terminal is grounded while the other is connected to +5V, the motor will rotate in one direction; reversing the voltages will cause the motor to turn in the opposite direction. This electronic reversibility is advantageous for control purposes.
For controlling three motors, six outputs are used, with two outputs allocated per motor. Each motor must have three operational states: forward, reverse, and off. With two binary bits, it is possible to create four distinct states. The output pins are designated as A and B. The control logic is straightforward: if pin A is high (+5V) and pin B is low (ground), the motor moves forward. Conversely, if pin A is low and pin B is high, the motor runs in reverse. If both pins are either high or low, the motor remains off. This binary control scheme effectively manages the motor operations, allowing for precise control of the hovercraft's movement.A PIC is a Programmable Integrated Circuit. It is the big black ractangle on our breadboard. The standard PIC used in the course was a 28-pin package, the Microchip PIC18F2455. For our project, however, we uses a more robust PIC with more advanced PWM (Pulse Width Modulation) features that we were hoping to make better use of, so we used a 40-pin package, the Microchip PIC18F4455. This more robust PIC works in almost the same way as the other when it comes to the software and the function of the inputs and outputs, which made it easy to switch to, but because it is a 40-pin package as opposed to the much smaller 28-pin package, We couldn`t just drop in the new PIC. In order to successfully convert from the 28-pin PIC to the 40-pin PIC, we had to sort through the documentation on the Microchip website.
Once we found the specs for the two PICs, We were able to translate from the course materials which described the PIC18F2455 and how to connect it to the circuitry, and get the technical names associated with the pins on that PIC, and then find the right pins on the new PIC (See Figure 1). Once we were done decoding the PIC, we had to build the circuit. About the PIC - The PIC is a programmable computer with digital and `analog` inputs and outputs. It has a USB interface which allows us to send commands and data to the PIC, and to request data from the PIC.
In our circuit we only use 6 digital outputs and 3 analog inputs. These analog inputs are not really analog, but rather convert a voltage between 0 and +5V to a number between 0 and 1023. (As stated in the Code section, we lose 2 bits of resolution, so our utilized value is between 0 and 255).
The breadboard is the white grid on which our circuit is built. The breadboard is mainly a prototyping utility which would usually be replaced with a more permenant board. In our case, however, we did not have time to make our circuit more final. More important, however, than the surface on which our circuit is built, is the circuit itself. The cuircuit has 4 main components. The first component is of course the PIC which we have already discussed in detail. Along with the PIC comes the very important PIC programmer interface, which allows us to easily connect the PIC`s ICD2 (In-Circuit Debugger).
This means that we can use our computers to easily transfer programs onto the PIC, without complicated rewiring. The third component is the USB port. The USB port allows us to transfer data between the control laptop and the PIC while everything is running.
This means that we can control our hovercraft from the computer that is connected to the PIC via USB, and even beyond that. The final piece on the breadboard is the set of three H-Bridges. Before we can talk about H-Bridges, we should talk about motors. The motors we used in our hovercraft were newer model LEGO motors. These motors run at a speed proportional to the voltage difference across their terminals. This means that if one terminal is grounded and another is held at our circuit`s +5V, the motor will run one direction, but if these voltages are switched, the motor will run in the opposite direction.
The fact that these motors can be electronically reversible can be very handy. As I mentioned before we use 6 outputs for 3 motors, so clearly we are using 2 per motor. Why, you may ask Well, our motors must have 3 states: Forward, reverse, and off. Anyone with a little knowledge of binary can tell you that 2 binary bits is enough to create 4 distinct states. The question is how First we will assign a name to each output pin, (A and B will do). If we do the `simple` thing and map the value of pin A to the voltage on terminal A of the motor, and the same for B, our control should be rather simple.
In this way, if A is high (+5V) and B is low (Ground), the motor will go forward. If A is low and B is high, the motor runs backward. If A and B are either both high or both low, the
The process of interfacing an LCD (Liquid Crystal Display) module with a PIC microcontroller involves understanding the nature of LCDs as passive components that modify light rather than generate it. LCDs are specifically designed for use with microcontrollers and cannot...
This was my first successful project with a PIC chip. I used a 16F84 with a 10MHz resonator with built-in caps. Click here to view the source code to this project. The code is written in Hi-Tech C. Click here...
The inquiry pertains to identifying the component within the circuit that regulates the minimum RPM achievable. The current operational range of the motor is between 1400 and 3700 RPM, and there is an interest in modifying the circuit to lower...
This document outlines a simple PWM (Pulse Width Modulation) DC to AC voltage inverter circuit based on the SG3524 integrated circuit. The SG3524 is a fixed frequency PWM voltage regulator control circuit that offers indifferent outputs suitable for both single-ended...
The NCP5201 chip contains two sets of PWM signal generating circuits, each with a dedicated set of output pins. These circuits produce two opposite phase PWM signals, which are applied to the gates of three field effect transistors. This arrangement...
A simple and efficient PWM lamp dimmer utilizing the timer IC NE555 is presented in this article. Traditional linear regulator-based dimmers achieve a maximum efficiency of only 50%, which is significantly lower than PWM-based dimmers that can exceed 90% efficiency....
The circuit presented on this page attempts to be an interface to convert pulses such as provided by a Basic Stamp or R/C receiver to a dual PWM (Pulse Width Modulation) signal required by an H-bridge. The simplest circuit would...
Development board for 18-pin PIC microcontrollers featuring a power supply circuit, crystal oscillator circuit, RS232 port, ICSP/ICD port, 4 relay outputs, and 4 optocoupler isolated inputs.
This development board is designed to facilitate the prototyping and testing of applications utilizing 18-pin...
Detailed plans to build devices for HHO, HOH, HOD, PWM pulse width modulators, and EFIE electronic fuel injection enhancers.
The schematic for constructing devices related to HHO (Hydrogen-Hydrogen-Oxygen) production, HOH (Water), HOD (Hydrogen-Oxygen-Diatomic), PWM (Pulse Width Modulation) controllers, and EFIE (Electronic...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more