Forward-collision warning (FCW) is an advanced safety feature that Consumer Reports highly
recommends for car owners.ME 105
Homework 8 – Ford Collision Warning System Simulation
Forward-collision warning (FCW) is an advanced safety feature that Consumer Reports highly
recommends for car owners.
Ford uses a radar-based system to detect what’s in front of the car. If the FCW system senses contact
with something might happen, most likely another car, it will sound an audible alarm and activate a
warning light. The Ford forward collision warning system is enabled by default and can be disabled
by the driver.
Here is a link to the Ford collision warning system explained at the Dearborn R&D Center.

Here is another link showing how to adjust the forward collision warning system to 3 different
sensitivity (high, normal, and low) settings and to turn on/off the FCW system.

Write a c program, using the Arduino’s integrated development environment (IDE), to simulate the
Ford Forward Collision Warning System with 4 buttons, a distance sensor, a buzzer, and a red LED.
1. Use one (1) button to enable and disable the Forward-collision Warning System.
a. The forward-collision warning system is enabled by default [5 pt].
b. If the forward-collision warning system is enabled, press the button once will disable the
feature [5 pt].
c. If the forward-collision warning system is disabled, press the button will enable the feature [5
pt]
.
2. Use three (3) buttons to adjust the sensitivity of the Forward-collision Warning System to high, normal
and low sensitivities.
a. The forward-collision warning system is set to normal sensitivity by default [5 pt].
b. The high sensitivity button will sound alarms when any object is within 30 cm [10 pt].
c. The normal sensitivity button will sound alarms when any object is within 20 cm [10 pt].
d. The low sensitivity button will sound alarms when any object is within 10 cm [10 pt].
e. The safety distance value for this project is reduced tremendously for indoor programming
practice.
f. The FCW system should remember the most current FCW sensitivity setting as long as the car
battery is alive [5 pt].
g. Modifying the FCW system sensitivity should not enable or disable the FCW system [5 pt].
3. Use one (1) distance sensor to simulate the radar in front of the car.
a. If the forward-collision warning system is enabled, use the distance sensor to detect object
distance in front of the distance sensor [10 pt].
b. If the distance sensor detects any object within the safety distance of the sensor, the system
will blink LED light and sound alarm 3 times. The safety distance value is determined by the
FCW system sensitivity setting [5 pt].
c. If the forward-collision warning system is disabled, objects in front of the distance sensor
should not trigger any warning [5 pt].
4. Use one (1) LED light to simulate the warning LED light.
a. Blink the LED light 3 times for warning while the alarm beeps [5 pt].
b. The LED light should not flash when the FCW system produces no warning [5 pt].
5. Use one (1) buzzer to sound the alarm.
a. Beep the alarm 3 times. For example, beep the alarm at frequency 2000 for 50 milliseconds
then pause 100 milliseconds between beeps [5 pt].
b. The alarm should not beep when the FCW system produces no warning [5 pt].
Light-emitting diodes (LEDs) have many advantages over incandescent light sources, including lower
energy consumption, longer lifetime, improved physical robustness, smaller size, and faster
switching. LEDs are used in a wide range of applications, for example, aviation lighting, automotive
headlamps, advertising, general lighting, traffic signals, camera flashes, lighted wallpaper,
horticultural grow lights, and medical devices.
Connect the Arduino Uno R3 compatible board with a breadboard using jumping wires and connect
a 220Ω (red-red-black-black-brown) resistor with one light emitting diode (LED). The following
figure shows that the long positive terminal of the LED is connected to the 220Ω resistor, and the
220Ω resistor is connected to the Uno’s digital I/O pin 8 and the short negative terminal of the LED is
connected to the ground.
Here is a link to an online 5-Band Resistor Color Code Calculator:
https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-resistor-colorcode-5-band
Test the LED installations with the Arduino IDE example sketch located at File -> Examples ->
01.Basics -> Blink. Remember to modify the LED pin number in the program to pin 8 to test the LED.
Buttons are widely used in electronics to obtain user input. The “push-button” has been utilized in calculators,
push-button telephones, kitchen appliances, and various other home and commercial mechanical and
electronic devices.
A button typically has two pairs of legs. One pair of the legs can connect to a digital I/O pin, the other pair
connect to ground. When the button is not pressed, there is no connection between the two pairs of legs, so
the pin is connected to 5 volts and we read a HIGH. When the button is pressed, it makes a connection
between the two pairs of legs and ground the connection. We will read a low.
Connect a button to the Uno’s digital I/O pin 9 and ground to simulate the FCW enable/disable button.
Connect another button to the digital I/O pin 6 and ground to simulate the FCW high sensitivity button.
Connect another button to the digital I/O pin 5 and ground to simulate the FCW normal sensitivity button.
Connect another button to the digital I/O pin 4 and ground to simulate the FCW low sensitivity button.
Test the button installation with the following test code.
// Sample test code for buttons
int buttonPin = 4;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600); // enable serial debug
pinMode(buttonPin, INPUT); // set pin to input mode
digitalWrite(buttonPin, HIGH);// set pin value to 1
// if the button is pressed, the button is grounded
// the value will be 0
}
void loop() {
// put your main code here, to run repeatedly:
int b;
// read value from the button pin
b = digitalRead(buttonPin);
// print the button value in the serial debug window
Serial.print(“button = “);
Serial.println(b);
}
Buzzers are widely used in computers, printers, copiers, alarms, electronic toys, automotive electronic
equipment, telephones, cell phones, timers, etc…
A buzzer contains a crystal that changes shape slightly when voltage is applied to it. By applying high and low
voltages to a piezoelectric crystal at a rapid rate, it causes the crystal to rapidly change shape. The result is
vibration. Vibrating objects cause the air around them to vibrate also. This is what our ear detects as sounds
and tones. Every rate of vibration has a different tone.
Connect the Arduino Uno R3 compatible board with a breadboard and a passive buzzer, using jumper wires.
The following figure shows that the positive terminal of the buzzer is connected to the Uno’s digital I/O pin 7
and the negative terminal is connected to the ground. A passive buzzer has built-in circuits and can play
tunes.
The buzzer installation can be verified by loading the Arduino IDE example sketch located at File -> Examples > 02.Digital -> toneMelody. Remember to change the pin number to 7 at 3 locations in the toneMelody
program.
Ultrasonic sensors cover a vast variety of industrial automation applications. They detect a wide range of
materials, they are not influenced by problematic surfaces, and they are largely immune to environmental
influences. Whether the task is material handling, mobile equipment, food and beverage, fill level
measurement or detection at gates and doorways: ultrasonic sensors offer solutions for the most diverse
application requirements.
Here are some of the popular applications for ultrasonic sensors:







Measure the fill level of silos or tanks used for milk, chemicals, lacquer, as well as grains or mineral.
Monitor the construction materials maximum fill level.
Monitor the waste produced by wastewater treatment to prevent overfilling the containers.
Detect the crop height on agricultural machines.
Anti-collision detection for moving mechanisms.
Use ultrasonic sensors to save pesticides by detecting tree gaps.
Pallet detection on forklifts.


Bottle counting and drink filling machines.
Automatic doors and gates.
The ultrasonic distance sensor in the LAFVIN Ultimate starter kits can measure distance in front of the sensor
at a range from 2 cm to 400 cm with 3 mm accuracy. The unit includes an ultrasonic transmitter, ultrasonic
receiver, and control circuit. The unit transmit ultrasonic sound waves and wait for a return signal on the
ultrasonic receiver. If a return signal is detected, the time for the return signal to come back is proportional to
the distance of the object that reflects the signal.
Connect the Vcc pin on the Distance Sensor to the Uno’s 5V pin.
Connect the Trig pin on the Distance Sensor to the Uno’s digital I/O pin 2.
Connect the Echo pin on the Distance Sensor to the Uno’s digital I/O pin 3.
Connect the Gnd pin on the Distance Sensor to one of the Uno’s ground pin.
Test the distance sensor hardware with the following program from the SainSmart website.
const int TrigPin = 2;
const int EchoPin = 3;
float cm;
void setup()
{
Serial.begin(9600);
pinMode(TrigPin, OUTPUT);
pinMode(EchoPin, INPUT);
}
void loop()
{
digitalWrite(TrigPin, LOW); //send low-high-low pulse to TrigPin
delayMicroseconds(2);
digitalWrite(TrigPin, HIGH);
delayMicroseconds(10);
digitalWrite(TrigPin, LOW);
cm = pulseIn(EchoPin, HIGH) / 58.0; //Echo time conversion into cm
cm = (int(cm * 100.0)) / 100.0; //Keep two decimal places
Serial.print(cm);
Serial.print(“cm”);
Serial.println();
delay(1000);
}
Zip the entire Sketch folder for Homework 8. Rename the folder to LastNameFirstName_hw8.zip and submit
the zipped file on Moodle.
Homework 8 is also strongly recommended to be presented in lab. If you are not able to present Homework
8 during the lab time, I will grade your Homework 8 with my circuit board with the specified setup and pin
numbers. I will not modify my setup or your program to get your project to work.

Purchase answer to see full
attachment




Why Choose Us

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How it Works

  • Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the "PAPER DETAILS" section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.