You are on page 1of 57

NAMARO Smart Car

By

Nadim Farah Maher Sleiman Roland Kallab

A Senior Project Report

Presented in Partial Fulfillment of the Requirements for the Degree

Notre Dame University - Louaize


Fall 2012

Approved by

Supervisor: ________________________________

Date: _________

Committee Member: _________________________

Date: _________

Abstract

Vehicles and transportation machinery are mainly based on gasoline motors or with internal combustion engines (ICEs), so the issue is that today the world is growing green which means ICE motors are not an effective way to achieve the goal as ICE motors produce pollution (noise and gas pollution) and gasoline vehicles only convert about 1721% of the energy stored in gasoline to power at the wheels. However taking a brief look on electric vehicles energy efficiency is much better (5962%) of the electrical energy from the grid to power at the wheels), it is environmentally friendly. EVs emit no tailpipe pollutants, although the power plant producing the electricity may emit them. Electricity from nuclear-, hydro-, solar-, or windpowered plants causes no air pollutants .In addition performance benefits. Electric motors provide quiet, smooth operation and stronger acceleration and require less maintenance than ICEs. They reduce energy dependence. Moreover electricity is a domestic energy source. This is why by introducing our so-called NAMARO smart car; this problem became easy to be solved especially as a home use car. In our case it could be a short distance transportation car. This car is formed of a DC motor related to a solar tracker circuit used to recharge the batteries. An LCD screen to visualize outside temperature, batteries status by measuring the voltage, and providing distance from objects around by an ultrasonic range finder circuit. Compared to state-of-the-art technologies, this novel car has the potential to introduce a new invention into home use electric cars and support go green campaign.

Table of Contents
Abstract. List of Figures/Graphs/Tables........... Chapter 1: Introduction..........1 1.1 Introduction..1 1.2 Historical overview.......................2 1.3 Types of electric cars.................3 1.4 General Overview of the NAMARO car..................5 Chapter 2: Joining Methods.........7 2.1 Introduction...7 2.2 Bolts, Nuts and Washers................,.......7 2.2.1 Bolts........................................7 2.2.2 Nuts....................................................................................................................................8 2.2.3 Washers..............................................................................................................................9 2.3 Welding Processes................................................................................................................10 Chapter 3: DC Motor..................................................................................................................11 3.1 Introduction..........................................................................................................................11 3.2 Motor design.........................................................................................................................11 3.3 Motor calculations................................................................................................................15 Chapter 4: Pulse Width Modulation ..........................................................................................16 4.1 Introduction...........................................................................................................................16 4.2 PWM Design.........................................................................................................................16 4.3 IGBT Design.........................................................................................................................19

Chapter 5: Solar Tracker...............................................................................................................21 5.1 Introduction............................................................................................................................21 5.2 Solar Tracker System Design..................................................................................................22 Chapter 6: Microcontroller ...........................................................................................................27 6.1 Introduction.............................................................................................................................27 6.2 Microcontroller Datasheet...28 6.3 Code design.29 6.4 How the code works on PIC18F4520.30 Chapter 7: Power Supply...37 7.1 Introduction.37 7.2 Power Supply Design..38 7.3 Battery Life..39 Chapter 8: NAMARO Car Procedure40 8.1 Introduction.............................................................................................................................40 8.2 How does it work?...................................................................................................................40 8.3 Total cost..................................................................................................................................41 8.4 Impact of the NAMARO smart car economically, environmentally and socially...42 8.5 Conclusion...............................................................................................................................43 References......44 Appendix45

List of Figures
Figure 1.1: Gasoline car.........................2 Figure 1.2: Electric car...........................2 Figure 1.3: NAMARO smart car5 Figure 1.4 NAMARO motor.6 Figure 1.5: Gear and Shaft6 Figure 2.1: Steel Bolts........................................................................................................8 Figure 2.2: Stainless Steel Bolts.........................................................................................8 Figure 2.3: Electroplated steel Bolts...................................................................................8 Figure 2.4: Steel Flat Washer..............................................................................................9 Figure 3.1: DC Motor........................................................................................................12 Figure 3.2: Commutator....................................................13 Figure 4.1: PWM Circuit...................................................................................................16 Figure 4.2: PWM Speed Control.......................................................................................17 Figure 4.3: IGBT Circuit....................................................................................................19 Figure 4.4: IC TLP250.......................................................................................................20 Figure 5.1: Dual Axis Tracker System..............................................................................22 Figure 5.2: Solar Tracker Circuit Dual Axis Rotation......................................................24 Figure 5.3: Solar Tracker PCB Test...................................................................................25 Figure 5.4 :Solar Tracker Voltage Controller and Voltage Reader..25 Figure 5.5: Solar Panel Specimen......................................................................................26 Figure 6.1: PIC18F4520 datasheet.28 Figure 6.2:PIC18F4520 Microcontroller and Pickit Programme28

Figure 6.3:Microcontroller Circuit.29 Figure 6.4: LM35 a precision temperature sensor..31 Figure 6.5: LM35 connected to the microcontroller (PIC18F4520)31 Figure 6.6: Wire from batteries to resistors..32 Figure 6.7: Wire batteries-resistors-pin3 (Batt volt)33 Figure 6.8: Range Finder Circuit.34 Figure 6.9: ISD Circuit35 Figure 6.10: Fingerprint Circuit..36 Figure 7.1: Power Supply Circuit.37 Figure 7.2 : Power Supply Circuit38

CHAPTER 1 INTRODUCTION
1.1 Introduction:
Before introducing the NAMARO smart car, a brief talk about gas emissions is an obstacle as it is increasing day after day and it is predicted to grow further in the coming years. That is why it is recommended to reduce CO2 emissions, as there is no simple solution to this challenge so in the coming decades, electric vehicles could play a significant role in this move towards sustainable transport which will run on renewable electricity and so will substantially cut CO2 emissions and improve local air quality. Electric vehicles might even help to make the electricity sector more sustainable, if the batteries in the vehicles could be used to manage the variable output of an increasing share of wind and solar-based power generation.

1.2

Historical overview:

Between the late 19th century and early 20th century electric cars had a lot of popularity, as electricity was the preferred method for car use , as it provides comfort, eases functionality at that time in comparison with gasoline cars. After advances in combustion technology, especially the electric starter, the greater range of gasoline cars, quicker refueling times, and growing petroleum infrastructure, and increasing the production of gasoline vehicles by companies, which reduced prices of gasoline cars to less than half that of equivalent electric cars, led to a decline in the use of electric vehicles. However, in recent years, increased concerns over the environmental impact of gasoline cars, higher gasoline prices, improvements in battery technology, have brought about renewed interest in electric cars, which are perceived to be more environmentally friendly and cheaper to maintain and run, despite high initial costs.

Figure 1.1: gasoline car

Figure 1.2: electric car (1837)

1.3

Types of electric cars:

Hybrid Electric Vehicle:

The hybrid electric vehicle uses a small electric battery to supplement an internal engine combustion which provides a better fuel efficiency. This kind of systems minimizes idling and helps providing an integrated electric start. The hybrid electric vehicle uses both the electric motor and internal combustion engine. The plug-in hybrid can run on electric power only up to about 40 mph, leading after to the internal combustion engine to take over. It is possible to use only the electric system and not engage the internal combustion engine.[1]

Extended-Range Electric Vehicle:

An extended-range electric vehicle is based mainly on an internal combustion engine to power an electric generator able to charge the battery system in a linear process. The engine powers a generator, which in spinning charges the battery. Unlike the dual-fuel system hybrid and plug-in hybrids, the electric motor is the only system to directly turn the wheels and make the car function. The internal combustion engine only charges the battery system. [1]

Battery Electric Vehicle (BEV):

Battery electric vehicles are all electric, with no internal combustion engine and are totally dependent on plugging into the electric power grid. It runs up to a range of 80-plus miles per battery charge; electric vehicles in this case require a larger battery ranging from 18 kilowatthours to more than 35 kilowatt-hour packs than the combined electric-petroleum cars. In order to accommodate charging these larger battery packs within the idle period (usually during night period) when power use is low, higher-power charging is required to get the job done faster. This is why the use of 240 volts and higher is preferable.

Other Personal Electric Vehicles


Other electric vehicles smaller vehicles having a speed of 25 mph and less are classified as home use electric vehicles. For example Golf carts dominate this vehicle category. Various manufacturers offer three and four wheel versions today that can be utilized in private and some commercial applications. Utilities can benefit from these vehicles on generation sites such as a nuclear power plant, where transportation of people and other resources are necessary but where efficiencies can be improved.

1.4

General overview of the NAMARO car:

The NAMARO car is consists of 145 cm height steel bars, width 125 cm and 145 cm long (Figure 1.3). For the records naming the car NAMARO came from the combination of our names, taking the first two letters of each of our names.

Figure 1.3: NAMARO smart car.

Starting with the chassis, basically it is composed steel tubes welded together. The motor that runs the car is placed vertically in the rear section of the car (Figure 1.3 and Figure 1.4). Under the motor a gear is placed to provide the necessary torque in order to run the car. Then the shaft is connected to the wheels as shown in figure 1.5.

Figure 1.4: NAMARO motor.

Figure 1.5: Gear and Shaft.


6

CHAPTER 2 JOINING METHODS


2.1 Introduction:

The car is mainly composed of a simple chassis composed of steel tubes welded together. In addition to the chassis an implementation of an electric motor and some circuits was done. Each of these circuits has a specific role to accomplish. The joining is done in some cases using simple nuts and bolts, and in another cases by welding.

2.2

Bolts, Nuts and Washers:

2.2.1 Bolts:
Joining the motor and the gearbox to the machine frame and joining the single parts mainly circuits, forming by that the NAMARO car was done using bolts and nuts, with the addition of welded parts. The choice of bolts was done from a wide range: Bolts made from brass are the major components of electrical equipments due to their good flexibility in use, but they present poor ductility and have a high tendency to promote corrosion by acting as strong fixtures, in presence of moister. Some of them are nickel.

Bolts made from steel (Figure 2.1) are the most widespread, including high tensile strength alloy steels. These bolts, 18 mm diameter were used in the assembly of the gearbox to the motor for their high strength. The precipitation-hardened, high strength stainless steel (PH steel) (Figure 2.2) for corrosion resistances, but more expensive than alloy steels.

Figure 2.1: Steel Bolts

Figure 2.2: Stainless Steel Bolts

Electroplated steel bolts (Figure 2.3) are a cheaper alternative to PH stainless steel, where the zinc produces a barrier between the surface of the steel and the moisture, to reduce corrosion. So our choice for the motor and differential joining to the frame landed on this type.

Figure 2.3: Electroplated steel Bolts

2.2.2 Nuts:
From a wide variety of nuts, we have chosen the lock nut, resists loosening under vibrations and torques, for the fixation of the differential. It has a nylon sleeve in it, and as the nut is tightened, the thread on the bolt cuts into the nylon holding it firmly in position.

2.2.3 Washers:
A washer is a thin flat, doughnut shaped part that serves to increase the area of contact between the bolt head or nut and the parts to be joined. In our case, where the motor needs to be tightly fixed to the frame, a soft washer may bend under its high load. So the washer used is Hardenedsteel (Figure 2.4) to help in distributing the load at the joint over a larger area than the bolt head or nut could provide. Flat washers have usually an outer diameter twice the length of their inner diameter and their sizes are standardized to bolt size. Non metallic washers are used when electrical insulation of the bolt from the parts to be joined is required. Lock washers help prevent spontaneous loosening of standard nuts as (opposed to lock nuts) and can be used under the nut of a bolt. But they are generally considered to be less effective in preventing loosening than lock nuts, which are preferred.

Figure 2.4: Steel Flat Washer

2.3

Welding processes:

The steel frame of the car, made of steel bars, was entirely welded using shielded metal arc welding. And the axial bar fixing the upper and lower bases was welded to the lower part using oxyfuel gas welding. These two types of welding join parts by heating the region at the interface above the melting point of one or two components to be joined. These joining processes may or may not use filler metals to make the joint.

10

CHAPTER 3
DC motor 3.1 Introduction:
This part includes the description of the motor used in the NAMARO car, the motor that will make the car roll. So detailed information are given about the motor including calculations to the design that will show how the batteries are charged by the motor.

3.2 Motor design:


A direct current motor is a simple electric motor that uses electricity and a magnetic field to produce torque, which turns the motor. A DC motor requires two magnets of opposite polarity and an electric coil, which acts as an electromagnet. The repellent and attractive electromagnetic forces of the magnets provide the torque that causes the DC motor to turn. In addition the motor uses these properties to convert electricity into motion. This motor requires at least one electromagnet. This electromagnet switches the current flow as the motor turns, changing its polarity to keep the motor running. Often, the electromagnet is located in the center of the motor and turns within the permanent magnets. We bought a DC motor (Figure 3.1) with these specifications: 30 Amperes, 1 HP, 2500 rpm and 24 V.

11

Figure 3.1: DC motor. This motor follows linear laws of operation and because of this it is easier to fully exploit its characteristics compared to synchronous or asynchronous motors. The wire of the solenoid within the motor is in practice the wire bundle located in each groove of the rotor. The rotor, when energized, then acts as an electromagnet, the magnetic field following the axis separating the wires of the solenoid in the direction of the current which flows through them. The motor, therefore, consists of fixed permanent magnets (the stator) a moving magnet (the rotor) and a metal carcass to concentrate the flux (the motor body). By the attraction of opposite poles and repulsion of like poles, a torque then acts on the rotor and makes it turn. This torque is at a maximum when the axis between the poles of the rotor is perpendicular to the axis of the poles of the stator. As soon the rotor begins to turn, the fixed brushes make and break contact with the rotating commutator segments in turn. The rotor coils are then energized and de-energized in such a way that as the rotor turns, the axis of a new pole of the rotor is always perpendicular to
12

that of the stator. Because of the way the commutator is arranged, the rotor is in constant motion, no matter what its position. Fluctuation of the resultant torque is reduced by increasing the number of commutator segments, thereby giving smoother rotation. By reversing the power supply to the motor, the current in the rotor coils, and therefore the north and south poles, is reversed. The torque which acts on the rotor is thus reversed and the motor changes its direction of rotation. By its very nature, the D.C. motor is a motor with a reversible direction of rotation.

Figure 3.2: Commutator Torque and speed of rotation: The torque generated by the motor, and its speed of rotation, are dependent on each other. This is a basic characteristic of the motor; it is a linear relationship and is used to calculate the no-load speed and the start-up torque of the motor. The curve for the output power of the motor is deduced from the graph of torque versus speed. The torque versus speed output power curves, depend on the supply voltage to the motor. The supply voltage to the motor assumes continuous running of the motor at an ambient temperature of 20 in nominal operational conditions. It is possible to supply the motor with a different voltage (normally between -50% and + 100% of the recommended supply voltage).If a lower voltage is used compared to the recommended supply the motor will be less powerful. If a higher voltage is used, the motor will have a higher output power but will run hotter (intermittent operation is recommended). For variations in supply
13

voltage between approximately - 25% to + 50%, the new torque vs. speed graph will remain parallel to the previous one. Its start-up torque and no-load speed will vary by the same percentage (n%) as the variation in supply voltage. The maximum output power is multiplied by (1 +%)2. Example: For a 20% increase in supply voltage, start-up torque increases by 20% ( x 1.2), no-load speed increases by 20% ( x 1.2), output power increases by 44% ( x 1.44). Torque and supply current: This is the second important characteristic of a D.C. motor. It is linear and is used to calculate the no-load current and the current with the rotor stationary (start-up current).

Efficiency: The efficiency of a motor is equal to the mechanical output power that it can deliver, divided by the power which it absorbs .The output power and the absorbed power vary in relation to the speed of rotation, therefore the efficiency is also a function of the speed of the motor. Maximum efficiency is obtained with a given rotational speed greater than 50% of no-load speed. The temperature rise of a motor is due to the difference between the absorbed power and the output power of the motor. This difference is the power loss. Temperature rise is also related to the fact that power loss, in the form of heat from the motor, is not rapidly absorbed by the ambient air (thermal resistance). The thermal resistance of the motor can be greatly reduced by ventilation. The nominal operating characteristics correspond to the voltage torque-speed characteristics required for continuous operation at an ambient temperature of 20. Only intermittent duty is possible outside these operating conditions: without exception, all checks concerning extreme operating conditions must be performed in the actual customer application conditions in order to ensure safe operation.

14

3.3 Motor calculations:


Assuming the car runs at 20 Km/h that gives 5.6m/s. Reaching 5.6 m/s in 20 seconds. So in 1 second we get a = 0.28 m/s^2. Fd: aero dynamic drag is neglected over small velocities. Fa: Fa= m.a = 200(kg) x 0.28(m/s^2) =56N. Fr: Fr= C.W = 0.03 x 1470 = 45N. W: W= m.g = 150 x 9.81 = 1470 N. Ftotal = 100N. T (torque) = F.R = 100 x 0.2 (wheel radius) = 20 N.m P (kw) =
( ) ( )

0.74 Kw motor with 2500 rpm is used. 0.74 = = Wwheels =354 rpm.

To reduce the motor rpm from 2500 to 350, a gear ratio reduction of 6 to 1 is applied.

15

Chapter 4
Pulse Width Modulation (PWM) Speed Controller

4.1 Introduction:
Pulse width modulation is a method of controlling the amount of power to a load without having to dissipate any power in the load driver. To make this circuit works properly an IGBT mosfet driver is implemented.

4.2 PWM design:

Figure 4.1: PWM circuit.


16

Figure 4.2: PWM speed control The pulse width modulation circuit is added to the car to play a role of controlling car speed. This is done as follows: as the pedal is down a change in the pulse is sent to the PWM and so the PWM change in its frequency and a signal is sent to the IGBT driver (TLP250) which will give an order to the motor to increase the speed. The IGBT circuit is used because it contains a mosfet which can support high current about 40 A in our case. So this is why the implementation of the IGBT circuit is done as the PWM circuit cannot contain high currents.

17

The resistors R2~R3 and the LEDs are removed. R1=110K, R4=22 ohms and the capacitor 103 (10 nano farad) form an RC circuit, which controls the oscillation frequency. How can we calculate the frequency? The data sheet tells us that time (period of time the oscillator is high) is equal to 4.4 multiplied by the value of R1 and the capacitor. As the duty cycle is always 50%, we double this value, and then divide the result into one. In other words:

And as the frequency from the OSC out pin is twice that of Q, the formula for the OSC out frequency is:

However the most useful formula would allow you to work with the values of R and C to use for a desired frequency f:

18

When calculating your values, remember that you need to work with whole units, such as Farads and Ohms- not microfarads, mega-ohms, etc. The only thing to take note of, is the tolerance of your resistor and capacitor. If you require a certain exact frequency try to use some low-tolerance capacitors. Then you can make adjustments and measure the result with a frequency counter. For example, when using a value of 0.1uF for C and 15 k ohm for R, the theoretical frequency is 151.51 Hz; however in practice this resulted with a frequency of 144.78 Hz. Dont forget that the duty cycle is not guaranteed to be 50% from the OSC out pin.

4.3 IGBT design:

Figure 4.3: IGBT circuit

19

In the figure above the IGBT circuit is presented. As we can see a TLP250 IC is connected which is the driver of the IGBT circuit. When the Input + at pin number two receive a pulse from the PWM output the driver gives a certain signal at its output at pin number six, which will go to the mosfet IRF740 and control the motor. The motor controlling depends mainly on the PWM variations and driven by the IGBT circuit.

Figure 4.4: TLP250 (IGBT IC driver).

20

Chapter 5
Solar Tracker

5.1 Introduction:
The increasing demand for energy, the continuous reduction in existing sources of fossil fuels and the growing concern regarding environment pollution, have pushed mankind to explore new technologies for the production of electrical energy using clean, renewable sources, such as solar energy, wind energy, etc. Among the non-conventional, renewable energy sources, solar energy affords great potential for conversion into electric power, able to ensure an important part of the electrical energy needs of the planet. The conversion of solar light into electrical energy represents one of the most promising and challenging energetic technologies, in continuous development, being clean, silent and reliable, with very low maintenance costs and minimal ecological impact. Solar energy is free, practically inexhaustible, and involves no polluting residues or greenhouse gases emissions. The conversion principle of solar light into electricity, called Photo-Voltaic or PV conversion.

Why Solar Tracking Systems

Global warming has increased the demand and request for green energy produced by renewable sources such as solar power. Consequently, solar tracking is increasingly being applied as a sustainable power generating solution. Solar Tracking System is a device for orienting a solar panel or concentrating a solar reflector or lens towards the sun. Concentrators, especially in solar cell applications, require a high degree of accuracy to ensure that the concentrated sunlight is
21

directed precisely to the powered device. Precise tracking of the sun is achieved through systems with single or dual axis tracking.

Dual Axis Tracking Systems

Dual axis tracking is typically used to orient a mirror and redirect sunlight along a fixed axis towards a stationary receiver.

Figure 5.1: Dual axis tracking system

5.2 Solar Tracker System Design:


The proposed solar tracking system should satisfy certain technical requirements specific to the studied application, as follows: Minimum energy consumption, for the maximization of global efficiency of the installation and optimum performance-cost ratio. Reliability in operation, under different perturbation conditions (wind, dust, rain, important temperature variations). Simplicity of movement solution (motor, gears, sensors), to diminish the cost and to increase the viability.

22

A measurement system for light intensity applied to the PV panel, representing the sensor that commands the solar panel movement.

The chosen technical solution offers the following important advantages: o Simplicity of power scheme: DC motor and H bridge converter (4 transistors) for the motor drive. o Use of an innovative solution, simple and reliable for the measurement system of light signal intensity.

Solar Cell Efficiency

In the solar cell market efficiency is crucial to avoid losing market shares on the global energy marketplace. There are two main ways to make solar cells more efficient, either by improving the actual cell or by installing the solar panels on a tracking base that follows the sun.

The solar panel which we have used has an output voltage of 29.5V, a power of 230Watt and dimensions of 164.5x98.5x5cm.The current is calculated from the equation P=VI which gives us a current of 7.8A.

23

Figure 5.2: Solar tracker circuit dual axis rotation.

24

Figure 5.3: Solar tracker PCB test.

Figure 5.4: Solar tracker voltage controller and voltage reader.

25

Figure 5.5: Solar panel specimen.

26

Chapter 6
Microcontroller 6.1 Introduction
In this project PIC18F4520 is implemented and programmed to display on an LCD screen a welcome note asking to swipe finger in order to have access to the following: Temperature measured. Voltage measured. Range finder output.

This family offers the advantages of all PIC18 microcontrollers namely, high computational performance at an economical price with the addition of high-endurance, Enhanced Flash program memory. On top of these features, the PIC18F4520 family introduces design enhancements that make these microcontrollers a logical choice for many high performance and power sensitive applications.

27

6.2 Microcontroller datasheet

Figure 6.1: PIC18F4520 datasheet.[2]

Figure 6.2: PIC18F4520 microcontroller and Pickit programmer.


28

6.3 Code design


The Sample code using MikroC software has been written and coded into the PIC18F4520 using pickit programmer. The code written is shown in the appendix section.

Figure 6.3: Microcontroller circuit.

29

6.4 How the code works on PIC18F4520


After programming the microcontroller by the code above in section 6.3, this is how it works. First, in order to start the NAMARO car, the microcontroller flashes on the LCD screen a welcome note as follows Welcome to Namaro. After the welcome note finishes, the microcontroller asks for swiping your fingerprint for security purpose following by a you are in command sentence. Then an audio is heard on the NAMARO speakers giving a brief introduction about the car and safety precautions.

Temperature sensor
Mainly the microcontroller will provide accurate outside temperature using temperature sensor consisting of a LM35. This IC will detect the temperature and output a voltage that have to be multiplied by 0.48 to display an accurate temperature in degrees Celsius. voltage=((val)/1023.0)*5*1000); //Voltage is in mV. since 10mV = 1 degree, to get temperature we must divide it by 10, so: t=((val)/1023.0)*5*100); //t is in degree centigrade. t=((val/1023.0)*500); t=(val*0.48876); Where t is the temperature measured by the LM35 temperature sensor.

30

Figure 6.4: LM35 a precision temperature sensor.

Figure 6.5: LM35 connected to the microcontroller (PIC18F4520).

31

Voltage Measurement
In this part the microcontroller measure the voltage at the batteries packs and gives an output on the LCD screen. In order to accomplish the measurement the battery packets are connected to two resistors as the figure 6.4 shows and then connected to pin number three on the PIC18F4520 as figure 6.5 shows. Now implementing the code into the microcontroller and pursuing the configuration done above, the microcontroller provide the corresponding voltage at the batteries.

Figure 6.6: Wire from batteries to resistors.

32

Figure 6.7: Wire batteries-resistors-pin3 (Batt volt).

Range Finder Sensor


Function: An ultrasonic range finder sensor enables the doctor to detect obstacles in its path by utilizing the propagation of high-frequency sound waves. The sensor emits a 40 kHz sound wave, which bounces off a reflective surface and returns to the sensor. Then, using the amount of time it takes for the wave to return to the sensor, the distance to the object can be computed. Application: The sensor can be used to determine distances to objects. It can be used as a tool to determine if any objects are in the cars path. In this car the sensor is used to protect the solar panel placed on the front hood, taking precautions of crashing it by any obstacle found in front of the car.

33

Figure 6.8: range finder circuit.[3]

If the ultrasonic wave to travel through the media, a large mathematical distance is calculated as follows: S = V. t / 2 Where s is the distance in units of meters, v is the speed of sound is 344 m / s and t is the travel time in seconds. While most obstacles ultrasound waves are reflected partly absorbed.

34

ISD2560 B PIC Circuit:

Figure 6.9: ISD circuit. Information storage devices ISD2560 chip recorder series provides high quality, single chip record/playback solutions for 60 to 120 seconds messaging application. The CMOS devices include an on chip oscillator, microphone preamplifier, automatic gain control, ant aliasing filter, smoothing filter, speaker amplifier, and high density multi level storage array.

35

Figure 6.10: Fingerprint circuit. The fingerprint identifier is formed by an array of pixels, and each pixel contains a sensing element and a processing element. The sensing element senses capacitances formed by a finger surface to capture a fingerprint image.

36

Chapter 7 Power supply 7.1 Introduction


Power supply is a device which converts AC power to DC power. In our case, it is needed to convert
a 220V AC to 24V DC power for battery use. The power supply is composed of a two transformers (220V-36V) which are connected in parallel.

7.2 Power Supply Design

Fig 7.1: Power Supply Circuit.


37

Referring to the circuit diagram, it explains what the main components of the power supply are and how they are connected. The capacitor C1 (50V-6800F) is connected in parallel with C2 (50V-6800F) to provide total capacitance of 13600F. The role of the capacitors is to maintain almost constant DC current.

Figure 7.2: Power supply circuit.

38

7.3 Battery Life


The battery capacity is 60Ah. The average current consumption is I=24A, therefore the estimated battery life is about 2.5 hours.

39

Chapter 8 NAMARO Car Procedure


8.1 Introduction:
This is a full description of the car process, performed manually and automatically in imbedded circuits, with its final cost. And the section will be concluded with an overview of the cars impact economically, environmentally and socially.

8.2 How does it work?


The process starts by visualizing on LCD screens a welcome note saying Welcome to NAMARO. Nearly after the LCD flashes another note Please swipe your finger asking the user to put his finger print in order to access the car notifications and status. This process discussed shows interfacing between the user and the smart car. Reaching this step an audible voice note is played on the NAMARO speakers providing an introduction about the car. At this point the user can manually drive the car and automatically the circuits imbedded work undercover. While the user steps on the pedal a variable resistor change its value providing a change in the PWM circuit, which will give an order to the motor either to decelerate or to accelerate. Notice that while driving the car, LCD screens supply the driver by the battery voltage available, outside temperature and the distance separating the front bumper from any obstacle. Consecutively this information revealed on LCD screens is the output of the microprocessor PIC18F4520 programmed using MikroC language. One by one the microprocessor gets the values, calculates it and yield the related output. Starting with the
40

voltage at the batteries, the microprocessor is connected to the batteries packs separated by resistors as mentioned in chapter 6. The value is calculated using the formulas already covered and the program results the right voltage at the batteries. Then to obtain outside temperature the microprocessor is associated to a precision temperature sensor LM35, and so temperature is obtained precisely. Additionally a range sensor is coupled with the microprocessor providing an accurate distance separating the car from any object in front of it. So the programmed microprocessor plays a role of receiving values and transforming it into useful information, for example: voltage, distance and temperature. At this moment solar panels placed on the roof and front section of the NAMARO charge the batteries continuously while the sun is up. The important component of this solar charging system is the solar tracker placed on the roof. Its importance is presented as this circuit will follow the suns direction in order to always get the maximum power provided by the sun. If there was any problem during the process, the emergency stop button could be used to stop the car and avoid any damages.

8.3 Total cost


Car Chassis: 800$. Polish: 20$. Motor: 350$. Gear box: 275$. Electronic components: 500$. Finger print detector: 98$.

41

8.4 Impact of the NAMARO smart car economically, environmentally and socially
Engineers are prompt to develop solutions for problems, by applying scientific knowledge, mathematics and ingenuity. And during any engineering design process, the responsibilities of the engineer may include defining problems, conducting and narrowing research, analyzing criteria, finding solutions and making decisions. Much of an engineer's time is spent on researching, locating, applying, and transferring information. And the most important researches conducted nowadays include the impact, of any invention, economically, environmentally and socially. So the NAMARO smart car, which needs electricity to work, could use the electricity formed from solar panels that are friendly to the environment and doesnt produce any pollution when converting the solar energy to electrical energy. On the economic point of view, it costs around 2100 $ which is considered as an affordable car and barely needs maintenance every ten years minimum. This car is a good helper for mechanics especially in the home use car field as it could be an electric car for kids. Moreover it could be a car to go shopping in nearby malls. Additionally tweaks can be easily done on the car, for example implementing a bigger electric motor, available in five horse powers in markets, so the car could run at higher speeds and could carry big loads taking into consideration the high torque provided by electric motors.

42

8.5 Conclusion
This car is a harmony between mechanical and electrical components. It represents a smart car that keeps the driver updated about the status of his car, meaning battery voltage, temperature outside, range finder and security finger print starter. Each and every part of the NAMARO was designed and selected carefully to fulfill a specific job. Never forget that this car use the electricity obtained from solar panels and batteries that are friendly to the environment and doesnt produce any pollution when converting the solar energy to electrical energy. However it could be modified in its future generations according to the customers need. For example, it could be an electric car for children or a home use car. Even more, the user has the opportunity to choose the electric motor power by replacing the motor by a bigger one (5hp) according to his needs.

43

References

[1] http://www.tva.com/environment/technology/car_vehicles.htm [2] http://ww1.microchip.com/downloads/en/devicedoc/39631e.pdf [3] http://www.micro-examples.com/public/microex-navig/doc/090-ultrasonic-ranger.html [4] Microprocessor architecture programming and applications with the 8085 by ramesh s. gaonkar, 5th edition, book.

44

Appendix
The Sample code using MikroC software has been written as follows:
// LCD module connections sbit LCD_RS at RD4_bit; sbit LCD_EN at RD5_bit; sbit LCD_D4 at RD0_bit; sbit LCD_D5 at RD1_bit; sbit LCD_D6 at RD2_bit; sbit LCD_D7 at RD3_bit; sbit UP at RB4_bit; sbit DN at RB5_bit; sbit LCD_RS_Direction at TRISD4_bit; sbit LCD_EN_Direction at TRISD5_bit; sbit LCD_D4_Direction at TRISD0_bit; sbit LCD_D5_Direction at TRISD1_bit; sbit LCD_D6_Direction at TRISD2_bit; sbit LCD_D7_Direction at TRISD3_bit; // End LCD module connections unsigned int adc; int digital_reading; unsigned long ADC_Temp,ADC_Volt,ADC_LE; unsigned long dispTemp,dispVolt,dispLE; char *temp = "00.0"; char *volt = "00.0"; char *dist = "0.00"; char leChar[16]; int Pos =0; int PrevPos = 0; int xt=0,xv =0,oldstate_UP=0,oldstate_DN=0,xr =0,xlew=0; int const PulseLen = 300; int thirtyCmCounter =0,OutOfRange =0,Distance =0;

45

//char chPos[16]; //char chPPos[16]; void interrupt() { // Timer1 Interrupt - Freq = 1133.79 Hz - Period = 0.000882 seconds if (PIR1.TMR1IF == 1) // timer 1 interrupt flag { PIR1.TMR1IF = 0; // interrupt must be cleared by software thirtyCmCounter++; //Counts 1 every 30 cm taking 340m/s speed of sound if(thirtyCmCounter > 6) { OutOfRange =1; thirtyCmCounter =0; } PIE1.TMR1IE = 1; // reenable the interrupt TMR1H = 238; // preset for timer1 MSB register TMR1L = 198; // preset for timer1 LSB register } } void getTemp(void) { if( xt == 0 ) //If first time in function clear screen Lcd_Cmd(_LCD_CLEAR); ADC_Temp = Adc_Read(0); //Red Analog pin 0 dispTemp = ADC_Temp * 48.828125; //dispTemp = Real Temperature * 1000 temp[0] = dispTemp /1000 +48; //Put 1st digit in temp[0] temp[1] = (dispTemp /100)%10 +48; //Put 2nd digit in temp[1] temp[3] = (dispTemp /10)%10 +48; // put 3rd digit in temp [3], temp[2] is reserved for "." Lcd_Out(1,1,"The Temperature is:"); Lcd_Out(2,1,temp) ; //Output on LCD xt =1; xv=0; xr=0; //X is variable to check if function was called before

46

} void getVoltage(void) { if(xv == 0) Lcd_Cmd(_LCD_CLEAR); ADC_Volt = Adc_Read(1); //Read Analog Pin 1 dispVolt = ADC_Volt * 5000/1023; // dispVolt = Voltage dispVolt = dispVolt *18/3; // dispVolt = dispVolt * (5.9/1.2); volt[0] = (dispVolt /10000) +48; volt[1] = (dispVolt /1000)%10 +48; volt[3] = (dispVolt /100)%10 +48; Lcd_out(1,1,"The Voltage is:"); Lcd_Out(2,1,volt); xv =1; xr=0; xt= 0; } void getRange(void) { if(xr == 0) Lcd_Cmd(_LCD_CLEAR); Lcd_out(1,1,"The Range is:"); PWM1_Start() ; // enable PWM output : transducer is pulsed at ultrasonic frequency Delay_us(PulseLen) ; // during PULSELEN microseconds PWM1_Stop() ; // stop PWM thirtyCmCounter=0; OutOfRange =0; if(Adc_Read(5)) { if(OutOfRange)

47

Lcd_out(2,1,"Target Out Of Range"); else { Distance = thirtyCmCounter *30; dist[0] = (Distance /100) +48; dist[2] = (Distance /10)%10 +48; dist[3] = (Distance)%10 +48; Lcd_out(2,1,dist); } }else Lcd_out(2,1,"Target Out Of Range"); xr =1; xv=0; xt=0; xlew =1; } /*void getLdrEW(void) { if (xlew == 0) Lcd_Cmd(_LCD_CLEAR); Lcd_out(1,1,"LDR Voltage Is :"); ADC_LE = Adc_Read(3); dispLE = ADC_LE * 5000/1023; IntToStr(ADC_LE,leChar); Lcd_out(2,1,leChar); xr = 0; xv = 0; xt = 0; xlew =1; } void getLdrUD(void) { } */

48

void main() { Lcd_Init(); //Initialize LCD PWM1_Init(40000); //Initialize PWM 1 with 50kHz for ultrasound PWM1_Set_Duty(128); // Set duty cycle to 50% //Timer1 Registers Prescaler= 1 - TMR1 Preset = 61126 - Freq = 1133.79 Hz Period = 0.000882 seconds T1CON.T1CKPS1 = 0; // bits 5-4 Prescaler Rate Select bits T1CON.T1CKPS0 = 0; // bit 4 T1CON.T1OSCEN = 1; // bit 3 Timer1 Oscillator Enable Control bit 1 = on T1CON.T1SYNC = 1; // bit 2 Timer1 External Clock Input Synchronization

Control bit...1 = Do not synchronize external clock input T1CON.TMR1CS = 0; // bit 1 Timer1 Clock Source Select bit...0 = Internal clock (FOSC/4) T1CON.TMR1ON = 1; // bit 0 enables timer TMR1H = 238; // preset for timer1 MSB register TMR1L = 198; // preset for timer1 LSB register // Interrupt Registers INTCON = 0; // clear the interrpt control register INTCON.TMR0IE = 0; // bit5 TMR0 Overflow Interrupt Enable bit...0 = Disables the TMR0 interrupt PIR1.TMR1IF = 0; // clear timer1 interupt flag TMR1IF PIE1.TMR1IE = 1; // enable Timer1 interrupts INTCON.TMR0IF = 0; // bit2 clear timer 0 interrupt flag INTCON.GIE = 1; // bit7 global interrupt enable INTCON.PEIE = 1; // bit6 Peripheral Interrupt Enable bit...1 = Enables all unmasked peripheral interrupts Lcd_CMD(_LCD_CURSOR_OFF); CMCON = 0x00; ADCON1 = 0xC0;

49

TRISA = 0xFF; // PORTA is input TRISB = 0xFF; // PORTB is input Lcd_Out(1,4,"Welcome To"); // Write text in the middle of first row Lcd_out(2,6,"NAMARO"); //Write text in the middle of second row Delay_ms(1000); Lcd_CMD(_LCD_CLEAR); oldstate_UP =1; oldstate_DN =1; while(1){ if (Button(&PORTB, 4, 1, 0)) { // Detect Up Button Pressed oldstate_UP = 0; // Update Flag } if (!oldstate_Up && Button(&PORTB, 4, 1, 1)) { // Detect Button Released PrevPos = Pos; if(Pos<4) Pos++; else Pos =0; oldstate_UP = 1; // Update flag } if (Button(&PORTB, 5,1,0)) { //Detect Dn Button Pressed oldstate_DN = 0; // Update flag } if (!oldstate_DN && Button(&PORTB, 5, 1, 1)) { // Detect Dn Button Released PrevPos=Pos; if(Pos > 0) Pos--; else Pos = 4; oldstate_DN =1; // Update Flag }

50

switch (Pos) { case 0: getTemp(); break; case 1: getVoltage(); break; case 2: getRange(); break; } } }

51

You might also like