Welcome to the website of the automated car light division. the main manufacturers are John and Chubba. our goal is to make alternating lights on a car the drives itself around a scrap yard parking lot. for this we will set up two different relay systems that communicate with each other while the car is on and can be activated automatically. Further pictures will be posted as the project progresses.
We now have a few more photos we are willing to post. we have made a circuit that will run read and blue LED's at the top of the car giving the idea of police or security. and the circuit will also make the headlights flash in a similar type of way. we now have the relays and connectors we will be using.
Here is the wiring diagram for the car, a 1994 ford Tempo:
Circuit board for lights. Relays used for headlights.
Example of Relay:
Schematics for light controls-
This link takes you to a video of the fully functioning guard lights. The lights are operated through a bluetooth app, linked soley to a IOIO board.
Code from Eclipse-
package ioio.examples.lights;
import ioio.examples.hello.R;
import ioio.lib.api.DigitalOutput;
import ioio.lib.api.IOIO;
import ioio.lib.api.IOIO.VersionType;
import ioio.lib.api.exception.ConnectionLostException;
import ioio.lib.util.BaseIOIOLooper;
import ioio.lib.util.IOIOLooper;
import ioio.lib.util.android.IOIOActivity;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.widget.ToggleButton;
import android.widget.RadioButton;
public class MainActivity extends IOIOActivity {
private ToggleButton button_;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
button_ = (ToggleButton) findViewById(R.id.button);
}
class Looper extends BaseIOIOLooper {
@Override
protected void setup() throws ConnectionLostException {
showVersions(ioio_, "IOIO connected!");
led_ = ioio_.openDigitalOutput(42, false);
enableUi(true);
}
@Override
public void loop() throws ConnectionLostException, InterruptedException {
led_.write(!button_.isChecked());
Thread.sleep(100);
}
@Override
public void disconnected() {
enableUi(false);
toast("IOIO disconnected");
}
@Override
public void incompatible() {
showVersions(ioio_, "Incompatible firmware version!");
}
}
@Override
protected IOIOLooper createIOIOLooper() {
return new Looper();
}
private void showVersions(IOIO ioio, String title) {
toast(String.format("%s\n" +
"IOIOLib: %s\n" +
"Application firmware: %s\n" +
"Bootloader firmware: %s\n" +
"Hardware: %s",
title,
ioio.getImplVersion(VersionType.IOIOLIB_VER),
ioio.getImplVersion(VersionType.APP_FIRMWARE_VER),
ioio.getImplVersion(VersionType.BOOTLOADER_VER),
ioio.getImplVersion(VersionType.HARDWARE_VER)));
}
private void toast(final String message) {
final Context context = this;
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(context, message, Toast.LENGTH_LONG).show();
}
});
}
private int numConnected_ = 0;
private void enableUi(final boolean enable) {
// This is slightly trickier than expected to support a multi-IOIO use-case.
runOnUiThread(new Runnable() {
@Override
public void run() {
if (enable) {
} else {
}
}
});
}
}
This is Jamison Burton. I've been assigned to assist John after Chubba dropped Electronics II. I've already finished the starter project and have now been moved to the light systems.
The device you will now find controlling the lights is a series of relays and a micro-controller powered by a 9V battery with wires going to the interior and exterior lights. To control the light to turn on and off, plug a lead into the IOIO board with a positive digital input to the micro-controller to activate or deactivate the device.
The interior lights can be connected together with blue cable I spliced that extended from the main control board. The red and blue wires are ground wires that goes to the lights. The yellow wire is the positive supply for the lights running on 5V.
The exterior lights were a bit trickier. The headlight mounts have been spliced to ground so that the relays can control them. In order to finish the circuit for the lights, you connect the black wires to the ground on the battery. The same program runs the headlights as the interior lights so that makes it easier. The only problem is that I can't get the two light systems to work at the same time. Some kind of power drain I think. That's for the next guy to figure out.