Introduction: Kids Hot Wheels Car Mat

5 step guide to building a Hot Wheels car mat with sensors that trigger lights and sound at stations of your choice. I chose to put an LED in the sharks eye and two on the roof of both the fire station and police station.

Step 1: Things You Will Need

1. Kids play car mat. (bought mine from Wal-Mart for $18

2. 4-6 Red and Blue LED lights

3. Lily Pad computer

4. 24 gauge speaker wire

5. Conductive thread

6. Copper wire and tape

7. Small speaker ( mine was in a kit with the lily pad)

8. Soldering iron and solder

9. Hot glue to hold wires down to mat (optional) (helps so wires don't snag when moving rug around)

10. A hot wheels car or two

Step 2: Draw Out Wiring Guide

This portion of the project is very important and saves you a lot of time in the long run. Just like any project you have to plan things out before you start to dive in. I made a wiring guide that isn't that neat looking but it makes sense to me and that is all that really matters. Every one plans and draws things out a little differently. Most important is that you have a good idea where everything needs to be placed and have all of your negatives and posotives drawn out. You will see a little later in these instructions where i placed my sensors for my hot wheels cars to drive over and where i put my lights.

Step 3: Let the Wiring Begin

As you can see in the pictures I labeled where the lights and the sensors should go. This part took a little bit of time but it was a lot easier than i thought it would be. I ran wires to each LED and to each sensor. To push the LED's through the mat i got a sharp knife and cut a small slit, the LED's pushed through pretty easily. Note: I didn't push the LED light all the way though, leave the bottom 1/4 of the LED on the back of the mat so the positive and negative leeds are easy to access. To fasten the wires to the lily pad I had to use a little bit of solder which i thought was going to be hard, but only took me a few minutes. As far as the sensors that the car drives over to trigger the lights and sounds, I simply sewed a small line of conductive thread over the wire. This allowed me to put a small copper wire on the top side of the mat. If you look closely at the third picture with the shark you can see that i pushed a small piece of copper wire through the thread on the top side. (Make sure the wire is tucked down so the cars down snag it when they drive over it.

You are still probably wondering about what i did with the hot wheels cars. I simply got a small piece of copper tape and put it across the bottom of the each car. This allowed the cars to complete the circuit on the sensor. ( I bought a fire engine and a police car from matchbox for $1 each)

Step 4: Now for Programming

int policered = 10;

int policeblue = 11;

int firered1 = 6;

int firered2 = 9;

int sharkred = 5;

int firesense = A2;

int policesense = A4;

int speaker = A3;

int sharksense = A5;

#define wait 1

#define time 10 int freq = 0;

int sensorstate;

void setup () { pinMode (policered,OUTPUT);

pinMode (policeblue,OUTPUT);

pinMode (firered1,OUTPUT);

pinMode (firered2,OUTPUT);

pinMode (sharkred,OUTPUT);

pinMode (firesense,INPUT_PULLUP);

pinMode (sharksense,INPUT_PULLUP);

pinMode (policesense,INPUT_PULLUP);

pinMode (speaker,OUTPUT);

Serial.begin(9600); }

void loop () { // read the state of the pushbutton value: sensorstate = digitalRead(policesense);

// print out the value you read: Serial.println(sensorstate); delay(1); if (sensorstate == 0) { for (freq = 150; freq < 1800; freq += 1) { tone(speaker, freq, time); // Beep pin, freq, time delay(wait); } for (freq = 1800; freq > 150; freq -= 1) { tone(speaker, freq, time); // Beep pin, freq, time delay(wait); } }else { tone(speaker, 0, time); } }

This is only the first speaker coding. It is very easy to make a different siren noise on the other sensor or sensors.

Where you see freq 1800 and Freq =150 you can simply change those numbers and you will get a different siren noise all together. ( I chose to make siren noises for the police station and the fire station as well as a low tone for the shark loop)

To do the lights you use the same exact pattern as the sounds but instead of using freq you define up at the top as a light instead of freq. For example you could put #define light1

Step 5: Final Thoughts

These are some pictures of my police station and fire station just so you have another visual of the how i put the LED's up through the mat. There is a lot you can do with this project. You can make it easier or harder simply by how many stations you make with lights and sensors.

Comments

About This Instructable

868views

1favorite

License:

More by j_steezy369:Kids Hot Wheels Car Mat
Add instructable to: