Maker Pro
Maker Pro

Raspberry Pi BB Target

blane

Jan 5, 2016
2
Joined
Jan 5, 2016
Messages
2
Hi Folks,

Im new to electronics and was looking to create a little project.

I have experience coding php, html, java etc and just got a raspberry pi for xmas.

I had an idea to create a little bb target for use in the airlift range.

The idea is that when the target is hat, an led will light up red then a second hit will register orange, then a third will be Green.


After a little research i have found that some piezo elements mounted on some hard plastic should do the job. That being said i am completely new to electronics so if you could let me know what else i would need to create the target.

Thanks in advance
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Hi Folks,

Im new to electronics and was looking to create a little project.

I have experience coding php, html, java etc and just got a raspberry pi for xmas.

I had an idea to create a little bb target for use in the airlift range.

The idea is that when the target is hat, an led will light up red then a second hit will register orange, then a third will be Green.


After a little research i have found that some piezo elements mounted on some hard plastic should do the job. That being said i am completely new to electronics so if you could let me know what else i would need to create the target.

Thanks in advance
Break it down into blocks first.

You need:
-The sensor.
-Method to read the sensor. (Note... connecting piezzo element directly to Pi may damage it! piezzo elements can create very high voltages)
-The brain. You need to monitor inputs and deal with outputs. This will be your Pi.
(Note... when running an OS like Linux on the Pi, you loose the ability to very quickly detect changes in the pins. There are work arounds. The Pi is used for more processor intensive tasks. Microcontrollers are used for simpler tasks like this one. Both will work though!)
 

blane

Jan 5, 2016
2
Joined
Jan 5, 2016
Messages
2
Break it down into blocks first.

You need:
-The sensor.
-Method to read the sensor. (Note... connecting piezzo element directly to Pi may damage it! piezzo elements can create very high voltages)
-The brain. You need to monitor inputs and deal with outputs. This will be your Pi.
(Note... when running an OS like Linux on the Pi, you loose the ability to very quickly detect changes in the pins. There are work arounds. The Pi is used for more processor intensive tasks. Microcontrollers are used for simpler tasks like this one. Both will work though!)


Thanks very much for the info...

Yes i was considering an arduino but it was just down to the fact that i have a pi, that i wanted to put it to use. If arduino would be better i don't mind purchasing one.

How would i go about avoiding direct connection to the pi for the sensor and the LEDs.

I was hoping it would be a simple enough piece of code.

-sensor detects vibration
-sends signal to pi
-pi processes the signal and outputs info to LED

Thanks
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Thanks very much for the info...

Yes i was considering an arduino but it was just down to the fact that i have a pi, that i wanted to put it to use. If arduino would be better i don't mind purchasing one.

How would i go about avoiding direct connection to the pi for the sensor and the LEDs.

I was hoping it would be a simple enough piece of code.

-sensor detects vibration
-sends signal to pi
-pi processes the signal and outputs info to LED

Thanks
The sensor you are using will produce a very sharp fast signal. The voltage is unknown, but will be relatively high, and the duration will be incredibly short. You will need to condition this first before sending to the pi or any other 'brain' you plan to use.
From there, the code will be in a loop, or you need to setup an 'interrupt'.

Loop will basically check over and over again for the voltage on the pin to go high... whereas an interrupt will automatically trigger something if the voltage changes.
Then you can do something useful ;)
 
Top