# Using voltage change as light bulb switch

Hey

So some friends and i have got this school project, where we want to create a program for the Arduino, that lights up a light bulb, every time a voltage change appears within the connected inductor.

The sense of is to reinact the way a modern traffic light senses an incomming car, and thereafter changes the light accordingly.

In our project we just want to put this into the world of parking lots, where a light bulb lights up to indicate free parking lots from a distance.

If anyone can explain to us how we're supposed to program and/or do a such thing, we'd appreciate it a lot. Any external tutorials are also appreciated

take decision
change outputs.

So you need to read this sensor you mention "the connected inductor", whatever that is - please
give full details of all hardware if you want more than guesswork answers, BTW.

You need to control the light bulb - what is it, again full details please.

I've never been to a "world of parking lots" and I never want to! Do you mean you want to
implement this in a real parking lot? If so then say so clearly, again full details please, it saves
pointless guesswork

Sinny:
very time a voltage change appears within the connected inductor.

Then just let the Arduino measure the voltage over the inductor. Be sure to add protection for over voltage because a rapid change can generate more voltage then a Arduino can handle.

But uhmm, what is going to turn of the light again?

And more important, what is going to change the voltage over the inductor?

Sinny:
In our project we just want to put this into the world of parking lots, where a light bulb lights up to indicate free parking lots from a distance.

But just a inductor alone will not do this... You need to apply some sort of signal and check if it changes because you put iron on it. A check would be to run inductor in it resonance frequency and check if it changes the frequency because of change in iron in the inductor.

If anyone can explain to us how we're supposed to program and/or do a such thing, we'd appreciate it a lot.

Read a value from the sensor. Since you have only done a bit of hand-waving about the sensor, you're on your own as far as reading data from it.

Use an if statement to compare the value read from the sensor to some threshold. If the value exceeds the threshold, the body of the if statement will be executed.

Set a pin high to turn on the light bulb. Of course, this assumes that the "light bulb" is a low current, 5V device. If you want to control high current light bulbs, AC bulbs, or bulbs that require more than 5V, you need some more hardware.