Go Down

Topic: DIY Laser Maze Concept - In Over My Head? (Read 4367 times) previous topic - next topic


Hello everyone.  I am obviously new here and I was uncertain whether to post such vague questions, but the description for this particular category is "Advice on general approaches or feasibility" and that is exactly what I need.

First, I would like to provide a little background about me and the project I am trying to complete.  Last fall, I had the brilliant idea of making a DIY laser maze for the kids.  I basically have/had no electronic background so I depended on what I could find online and an incredibly helpful forum (not here, but more on that later).

After starting with a simple 555 IC, I eventually came up with a circuit using a quad op-amp IC.  From the beginning, I was just using LDR's.  I had some luck getting a "prototype" course set-up up in our extra room so I had moved on to a separate part of the project - tracking the number of times the kids hit the laser(s).

I also coach youth wrestling and once the season started all progress on this project came to a screeching halt.

Fast forward to a few weeks ago (wrestling is over, time to get back on the horse) and I quickly found out anything I thought I "learned" last fall must have been in short term memory.  It was a bit frustrating trying to get back up to speed and I found myself searching the net for guidance.

Well, at some point during my searching I found some videos on the Arduino and my brain has not stopped since.  I think/hope I can learn enough of the basics to have a pretty awesome setup.  So please keep in mind my background/lack of programming(or even electronics) has I try to layout my plan and ask for your feedback.

My Plan
I would like to have 12 laser/LDR circuits (simple voltage divider feeding into analog pins).  I would "dial" in the sensitivity on the programming side.  (I have played with a tutorial I found online already.)
If/when an LDR goes dark, the corresponding laser would shut off for approx. 2 seconds, then be turned back on.
I would like to have three levels (easy, medium, ninja) that would be determine by which PB was pressed at the start.

I am assuming I will need some delay between when the lasers/LDR's are powered up and when the program checks the corresponding analog pin.

Even before I became aware of the arduino world, I had planned to have each "LDR/laser trip" trigger a small 3 digit LED display to keep track of the number of strikes.  I also had a large 5" LED display planned for the overall time. (Most of the fancy pants mazes in malls have "penalty time" added directly to the overall time).

And the final item I hope to add in is a "siren"/noise maker whenever a laser is tripped.  It would play for 4-5 sec. maybe, then shutoff.

I have added a drawing for the laser/LDR portion and would like some opinions on any show stopping issues with my overall intent.  I have many questions regarding what can be/can not be done with the Arduino, so I figured I would put my concerns/question below.

1.  One of my main concerns is not burning the arduino up.  I have tested the lasers and each one draws about 25 mA @ 3V.  I have an external power supply of 5V - 4A for the lasers, but I am not sure how to ensure the arduino does not see more current than it can handle.  I know/think my circuit is missing resistors around each transistor, but I wanted to get my general concept out here so if there are major issues I can get on the right track.  Will the use of transistors work to power the laser/LDR circuits and still keep the arduino safe?

2.  I have succeeded in getting a 5" LED display working.  The 5" displays are actually powered by a 20V supply, while the "main" portion of the circuit is powered with a 9V supply.  Currently, the "time" part is just coming from a 555 circuit I found online that triggers every second.  The official circuit has a crystal/timer IC portion, but I have not incorporated that yet.  So, would it be possible to use the 9V supply from this circuit to power the arduino?  Could I start/stop the time with it?  And, the best case scenario, could I eliminate my small 1" strike counter and somehow add the time via the programming side?  If I can't eliminate, can I use the arduino to count the strikes?

3.  My last "hope" is to be able to have some sort of siren.  Again, my concern is doing something wrong and burning up the board.  The siren I salvaged from our old short bus runs approx. 31mA @ 12V.  Yes, another, separate power supply.

I apologize for the novel right out of the gate.  I would appreciate any feedback on flaws in the concept/plan I have.  Please remember I have very little electronics background and zero programming.  I have spent the last 2 days taking pages of notes on what I think I will need to do on the programming side.  I was even going to try to start a sketch, but I did not want to invest the time upfront if I am hunting an incorrect path.

Thank you in advance for any guidance you may give - and Happy Father's Day to all the Dad's on here!


Your idea is very plausible, and I think arduino can handle it. I'm not a large electronics guy, so try taking some of those questions to General Electronics. You're project has some good potential, but I do have a few questions about how it will work. First off, how is the game played? Are there more than one kid in at a time? Are the lasers hidden? At odd angles? Should they have different score value? Also when a laser is crossed, do you want a universal sound? or only a sound near that laser? Other then that programming it wouldn't be too hard.


The game is basically how fast can you navigate the lasers (odd angles, high/low).  The siren would be centrally located and just for the purposes of adding excitement during the game.  I am still wondering if the arduino can provide the necessary communication to the timer display, but that is for later.

Thanks for the lead on the electronics section.

I have tried to write a quick sketch trying a smaller version of what I hope to do.  Not starting off so good.
My idea was to have a NO Pushbutton into Pin 51(Input).  I have 2 different led's on the board with Pins 22 and 23 as Outputs to them.

If Pin 51 goes HIGH, Pins 22 and 23 would go HIGH.  After a 5 second delay, led1 would turn off, but led2 would stay on.

If I can figure out how to insert a sketch, I will post here and maybe someone can show me what I did wrong.

For some reason, even though I have set both Output pins to LOW in the setup portion (and 51 to LOW), both 22 and 23 have 5V as soon as the arduino powers up - leds stay on regardless if pin 51 is even hooked up.

I know it is probably useless to talk about without seeing the sketch, so I will look around to see if i can figure out how to insert what I tried.

Thank again.



Hopefully this works ...


//Laser Maze Program
//Assign laser units to pins
int laser1 = 22;
int laser2 = 23;
int pbeasy = 51;  //This PB, when HIGH will turn on laser1 and laser2
                  //start the game. 

int ldr1 = 1;
int ldr2 = 2;

void setup()
    pinMode(laser1, OUTPUT);
    pinMode(laser2, OUTPUT);
    pinMode(pbeasy, INPUT);
    digitalWrite(pbeasy, LOW);
    digitalWrite(laser1, LOW);
    digitalWrite(laser2, LOW);

void loop()
    if(pbeasy == HIGH);
       digitalWrite(laser1, HIGH);
       digitalWrite(laser2, HIGH);
       digitalWrite(laser1, LOW);

  /*  if(analogRead(ldr1)< 200);
       digitalWrite(laser1, LOW);
       digitalWrite(ldr1, HIGH);

     if(analogRead(ldr2)< 200);
       digitalWrite(laser2, LOW);
       digitalWrite(ldr2, HIGH);*/

I had been working on the ldr portion (analogRead stuff), but I just wanted to test the laser (named laser in sketch, using leds for now) so I just "commented" the portion I was working on.  Hopefully I can do that without messing the other part up.


Yout gonna wanna learn about delay without using delay() command
it prevents other things from going on in the background
also writing high to an input will just enable the pullups, which you should do once in the beginning not in the loop


Yout gonna wanna learn about delay without using delay() command
it prevents other things from going on in the background
also writing high to an input will just enable the pullups, which you should do once in the beginning not in the loop

Could you offer what part of the reference I could look over instead of using the delay?  I am a complete beginner trying to muddle through this.  I am not sure what you are referring to about writing the input to high.

I was trying to write it low at the start and then use the if() to check it was turned high by the PB.  I thought I read that I could just use a single if() without the else portion.  If the if criteria was false, the next line would just be ignored.

Is there something in my sketch that would cause Pins 22 and 23 to have 5V at them, even though I have them designated as LOW OUTPUTS?


I was looking at the digital write to ldr pins, which are inputs, that's turning on pullups
im on my phone so I can't get an exact link but a google search for arduino blink without delay will find the page



Long time ago, but how did this project end?
I also want to make a laser maze, so maybe you have some tips and information for me?


Go Up