Motion/Vibration activated blacklight?

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ProtorG
 
Posts: 3
Joined: Wed Nov 17, 2021 4:19 pm

Motion/Vibration activated blacklight?

Post by ProtorG »

I'm an absolute beginner to circuits, so please excuse me if I'm asking super basic questions.

But I'm trying to make a jar lid with motion/vibration activated black lights. In other words, when the jar is picked up or moved around, or if the jar is opened, the black lights would turn on for a few seconds, and then turn off on their own.

Black light is needed because the lid is glow-in-the-dark, and the lights would charge the material from the inside. The glow-in-the-dark material is transparent, so the light being on the inside of the lid, would show up as green glow on the outside of the lid and the glow would slowly dissipate after the light shuts off.

I'm assuming I need black light LEDs and some kind of vibration sensor? But I'm unsure of anything else. I have a FLORA board I got as a gift, but I'm unsure how to use it, or if it's even helpful with this project.

If anyone could help me figure out how to make this, or at least point me in the right direction. I would appreciate it a lot!

Thanks!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Motion/Vibration activated blacklight?

Post by adafruit_support_mike »

You've made a good start at an important part of the process: requirements.

A wide swath of technology can be usefully broken down into "something comes in, something goes out, and something connects the two." You've identified a possible input (a vibration sensor), an output (the UV LEDs), and a possible system to connect them (the Flora).

Those pieces will work together to make the system you want, though you may need a few additional parts like resistors.

A broad outline is that the Flora can read input from a switch like a vibration sensor, and it can generate output that does things like light LEDs. By default those two things are independent of each other, but you can create a link between them by writing the appropriate code for the Flora. The additional twist is that the Flora will count time (another thing it can do) to decide how long the UV LED stays lit.

Take a look at our Learn Arduino seires of tutorials for help getting started:

https://learn.adafruit.com/lesson-0-getting-started

The basic ideas will be the same no matter what microcontroller you use. Certain tasks tend to show up over and over when you build projects, and each tutorial covers such one such task. Reading switches and controlling LEDs are a couple of the early lessons.

User avatar
ProtorG
 
Posts: 3
Joined: Wed Nov 17, 2021 4:19 pm

Re: Motion/Vibration activated blacklight?

Post by ProtorG »

adafruit_support_mike wrote: Sat Mar 18, 2023 5:17 am You've made a good start at an important part of the process: requirements.

A wide swath of technology can be usefully broken down into "something comes in, something goes out, and something connects the two." You've identified a possible input (a vibration sensor), an output (the UV LEDs), and a possible system to connect them (the Flora).

Those pieces will work together to make the system you want, though you may need a few additional parts like resistors.

A broad outline is that the Flora can read input from a switch like a vibration sensor, and it can generate output that does things like light LEDs. By default those two things are independent of each other, but you can create a link between them by writing the appropriate code for the Flora. The additional twist is that the Flora will count time (another thing it can do) to decide how long the UV LED stays lit.

Take a look at our Learn Arduino seires of tutorials for help getting started:

https://learn.adafruit.com/lesson-0-getting-started

The basic ideas will be the same no matter what microcontroller you use. Certain tasks tend to show up over and over when you build projects, and each tutorial covers such one such task. Reading switches and controlling LEDs are a couple of the early lessons.
Thank you very much for your reply! I will go ahead and take a look at the Arduino route. I asked for some help with this project on reddit too and was recommended learning how to build 555 Timer circuits. But I think learning some Arduino could help me with other projects down the line too.

Thank you for helping me get started! :)

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Motion/Vibration activated blacklight?

Post by adafruit_support_mike »

The 555 timer is a more direct approach to generating signals.

It's a wonderfully versatile circuit, but its general function is to watch an input voltage change and produce a corresponding output. When the input voltage is low, the output goes high, and when the input is high the output goes low.

If you connect the output back to the input, you get a circuit that's constantly feeding itself new input: once the input voltage gets high enough the output goes low, and the input voltage starts falling. When the input voltage gets low enough, the output goes high and the input voltage starts rising again. It can keep flipping between those two states indefinitely, producing a square-wave output.

You can also leave the 555's output disconnected from the input and have it respond to a single event. For your application, it would get input from a vibration sensor.. for the sake of argument let's say that pulls the input voltage low and sends the output high. Then you can have a signal always connected to the input that gradually pulls the input voltage high again. When the input voltage gets high enough the output will go low again, and you'll have gotten a fixed-duration pulse in response to the momentary input from the vibration sensor.


Both the 555 timer and a microcontroller are valid alternatives.. there's no universal standard that says one is better or worse than the other. They're just different approaches to solving the same problem.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”