Has Gunnery Sergeant Hartman (Full Metal Jacket) says during the riffle pray “There are many like it, but this one is mine”

Step 1: Material

Indeed there is many project like available on internet.

This one use a tilt switch as trigger

1 x Arduino board (http://shop.snootlab.com/lang-en/arduino/68-arduino-duemilanove.html)
7 x 500 ohms resitors ¼ W
7 x basic red leds
1 x 10 k ohms resitors ¼ W
1 x tilt switch (I use this one http://shop.snootlab.com/lang-en/parts/96-tilt-sensor.html)
A piece of prototyping board plated holes
Male header (0,1") 1 row, 40 pins (need only 28 for complet arduino connexion , and realy need 10 for this project) http://fr.mouser.com/ProductDetail/FCI/68004-236/?qs=sGAEpiMZZMtsLRyDR9nM10aphOtlQBeldG%252bobNTQj6E%3d


A PC to program the arduino
An soldering iron
Some tin
A cutter

Step 2: Prepare the Board

You have to cut the board to get a piece of about 21 x 18 holes (the hole spacing is 2,54 mm)
For this kind of board, just score with a sharp knife, place a metal ruler or similar on the top and snap it.

Then you have to solder the Male header.
First cut the male header in
2 pieces of 8 pins
2 pieces of 6 pins

Then, solder the Male header. Take care of the two 8 pins. They must be tilted to fit the arduino connectors. First, make a try with a single soldering point.

You can find instructable of this here =>https://www.instructables.com/id/Embarassingly-Easy-Arduino-ProtoShield/

and here https://www.instructables.com/id/Arduino-ProtoShield-from-quotHouseholdquot-Ite/

Step 3: Solder the Electronics Parts

Solder the 500 ohms resistors. They must be connected to the male header of the arduino pin 6 to 12

Solder the leds. The “upper” leds must be on the pin 6

Solder the tilt switch and the 10 kohms resistor.

With my tilt switch, I’m using only two pins (see picture)

Add some jumper wire… and finally it should looks like the last picture

Step 4: The Code

You can tune these parameters

If you use deferent pin for your leds or for your sensor
#define led1 6
#define led2 7
#define led3 8
#define led4 9
#define led5 10
#define led6 11
#define led7 12
#define sensorPin 2

Currently this code display two message : “SNOOTLAB” and “RULEZ”

The two messages are define in
char texte[] = "SNOOTLAB"; // data to write on startup
char texte2[] = "RULEZ"; // data to write after "repet" writing of the first message

The message changes after 10 displays. You can change this value here
#define repet 10 //number of repetition before changing message

Step 5: Enjoy

I think there is many way to improve this, by using interruption for example. For this purpose, I have connected the sensor on the pin 2 of the arduino of the external interruption.
If you made a think like this, please post this upgrade on instructable.
<p>If i am using a Hall Effect sensor, then do i need to change the code for sensor?</p><p>Means how it triggers the change and the time delay?</p>
<p>Hi Phil,,,, you did an excellent work...i want to try the same thing, but want to build it on a rotating base. Can you please guide me what changes i might need to do in the program?</p>
<p>Hi bhawick55</p><p>Thank you for your comment</p><p>For a rotating base, I <br>think this code can work without modification. The main modification is on the hardware part</p><p>The tilt sensor can&rsquo;t work <br>on a rotating base because the centrifuge force will &ldquo;stick&rdquo; the ball in the <br>tilt sensor</p><p>The way to do that is an <br>optical sensor, a REEL sensor or a hall effect sensor</p><p>You can find some inspiration <br>on this project &egrave; <a href="https://code.google.com/p/povglobe/" rel="nofollow"> https://code.google.com/p/povglobe/</a></p><p>Regards</p>
<p>Thank you for your feedback, i will try to do it using a hall effect sensor, will let you know how it works.</p>
<p>I built this project (on a breadboard for testing), and have come across two problems. 1. The led on pin 12 doesn't light up (I have checked that it works, and it works on the same pin in a different program). 2. I have tried changing the settings, but I can't get the text to show up, like it does in the video. I'm using an UNO, not a Duemilanove, if that makes any difference</p>
<p>Hi, thank you for your <br>interest for my project.</p><p>Can you send me a picture <br>of your breadbord ?</p><p>About the arduino UNO or <br>Duemilanove, I don't think it is important.</p><p>The code doesn&rsquo;t use any <br>uno or duemilanove specific function</p><p>About the led on the 12 <br>pin, this led is use with some char (like _, @ , j,...) but most of them doesn&rsquo;t <br>need the led on the pin 12.</p><p>Take a look in the file <br>font7x5.h. The char using the led 12 are like this one </p><p>//106 j</p><p>0b00010000,</p><p>0b00000000,</p><p>0b00110000,</p><p>0b00010000,</p><p>0b00010000,</p><p>0b00010000,</p><p>0b01100000,</p><p>If the last <br>line have some &ldquo;1&rdquo; the led 12 will lit</p><p>You can found here an example of this setup on breadbord ==&gt; </p><p><a href="http://forum.snootlab.com/viewtopic.php?f=32&t=142&p=3877&hilit=pov#p1842" rel="nofollow">http://forum.snootlab.com/viewtopic.php?f=32&amp;t=142...</a></p>
<p>hello author</p><p>i am little bit confuse because you <a href="https://www.instructables.com/files/orig/FZW/W1I1/HCV926KV/FZWW1I1HCV926KV.zip" rel="nofollow">pov05.zip</a> zip shows error</p><p>so please help me </p>
Hello;<br><br>What do you call error ? <br>Error to download, ?<br>Error to unzip ?<br>Error in the Arduino IDE ?<br>What is the error message ?<br><br>Regards<br><br>
<p>hello author,</p><p>I really liked this project.</p><p>I tried running this code and got the following errors. Can you please tell me what changes are to be made.<br>Thanks in advance.</p><p>ERRORS:-<br>sketch_apr10a.ino:6:21: error: font7x5.h: No such file or directory</p><p>sketch_apr10a.ino: In function 'void displayChar(char)':</p><p>sketch_apr10a:97: error: 'charbook' was not declared in this scope</p>
<p>In the file <a href="https://www.instructables.com/files/orig/FZW/W1I1/HCV926KV/FZWW1I1HCV926KV.zip" rel="nofollow">pov05.zip</a> you have two files : font7x5.h and pov05.ino you have to put this two files in to the same directory (in arduino you have to name this directory &quot;pov05&quot;)</p><p>Let me know if it works</p><p>Regards</p>
<p>Hello again</p><p>Thank you so much.</p><p>I put these 2 files in the same directory. Its still showing an &quot;error sketch_apr11a.ino:781:21: error: font7x5.h: No such file or directory&quot;</p><p>should i remove:- #include &quot;font7x5.h&quot;..?</p>
<p>It strange because your error message talk about : sketch_apr11a.ino file</p><p>You have to open the pov05.ino file with arduino and to copy the code from this file into the arduino ide.</p><p>Please find below a step by step guide to do that</p><p>1 - close all the windows of your Arduino IDE</p><p>2 - download the <a href="https://www.instructables.com/files/orig/FZW/W1I1/HCV926KV/FZWW1I1HCV926KV.zip" rel="nofollow">pov05.zip </a>file</p><p>3 - unzip it in your skectchbook folder</p><p>4 - be sure that the two files (font7x5.h and pov05.ino) are in a folder named pov05 at the root of your sketchbook folder</p><p>5 - start arduino ide, now in the menu &quot;file&quot; =&gt; &quot;skectchbook&quot; you souhld have a item called pov05.</p><p>6 - clic on pov05</p><p>7 - enjoy</p>
please help me! pov05.ino is the arduino sketch. but what about the font7x5.h? where should I install the font?
Copy the font7x5.h file in the same directory of the pov05.ino file. Thank you for your interest for my instructable.
Voil&agrave; ma bricole &gt;&gt;&gt; <br>Merci d'avance
Oups deux images !
hi, <br>I received all the materials needed for doing a similar pov :), i am on the soldering components part and i have a problem :s &gt;&gt;&gt; how can the 500 ohms resistors be connected to pin 6 to 12 of arduino male header meanwhile it is occupied by <br>two male header of 8 pins? <br>Don't know if i have missed something to resolve that <br>Thank you in advance!:)
You have several ways to make that.<br> The first way is to make a kind PCB trace like this <a href="http://www.niklasroy.com/images/ping/ping_04.jpg" rel="nofollow">http://www.niklasroy.com/images/ping/ping_04.jpg</a><br> The second way is to solder the leg of the resistor on the 8 pin header<br> I will post a picture of the back of my pcb with the two solution ASAP (maybe tomorrow)
you can found detail of the connexion here :*<br> <br> <a href="https://www.instructables.com/id/Simple-POV-homemade-arduino-shield/step3/Solder-the-electronics-parts/" rel="nofollow">https://www.instructables.com/id/Simple-POV-homemade-arduino-shield/step3/Solder-the-electronics-parts/</a><br> <br> Sorry for the delay !!!<br> <br> best regards
suggestion: 2 unnecessary dots can be removed by changing these lines <br> <br>for (a=0;afor (a=0;a <br>to <br> <br>for (a=0;a&lt;(sizeof(texte)-1);a++) <br>for (a=0;a&lt;(sizeof(texte2)-1);a++)
Thank you so much, I will update this instructable with your modification and some improvement <br>Thank y ou again and best regards
Oh i see, ok so i think i'm going to solder the leg of the resistor on the pin of the male header of the PCB (not arduino one), it is right ? <br>Ok cool can't wait to see it ! <br>Thks :)
Thks for datasheet and technical tips, i will read that very carefully.! <br>I do not even think about all that as i am a very new beginner, so i think i'm going to experiment and try try try 100000 times !!! (hope i will find the good path !) <br>No problem, i would pass here for updating some news on that (or if i have any problems again!) <br>Meanwhile, i have to wait my little components come at home ( free shipping on ebay are very long : between 15-30 days :s!!!) <br> <br>Thks for all &amp; best ideas for the future!!
Yes, I also told myself that it would be weird to use a switch with mercury for this sort of device ! but as it is named &quot;tilt&quot;, i thought maybe it would work....(or not!) <br>If you say the one you use has metal ball, then i have found something that i think can be used as the same way and largely cheaper, so i would buy that : <br> <br>http://www.ebay.com/itm/370516344093?ssPageName=STRK:MEWNX:IT&amp;_trksid=p3984.m1439.l2649 <br> <br>I don't know why but there is a bug when i want to sucribe at snootlab. But, if there is no free shipping, i think i'm dead!! <br> <br>If it works with &quot;Metal Ball Tilt Shaking Position Switches&quot; i would post it here ! <br> <br>Thks !
Your second tilt sensor looks like mine.<br> You can find the datasheet of my tilt sensor here <a href="http://snootlab.com/attachment.php?id_attachment=75" rel="nofollow">http://snootlab.com/attachment.php?id_attachment=75</a><br> This document tell us that the contact is close if the angle is superior to 15&deg; from horizontal.<br> <br> With yours : &quot;The switch would be in the &quot;off position&quot; in the horizontal positon,<br> &quot;on positon&quot; when raised to 10-90 degree or shakes&quot;<br> <br> So il think it can work with this sensor. Maybe you will have to change a part of the code.<br> Maybe the line &quot;if (digitalRead(2)==LOW)&quot;&nbsp; is not ideal for your sensor.... It can be better with if (digitalRead(2)==HIGH)... maybe.... try the two method...<br> <br> Please post your result here even if it doesn't works...<br> <br> Best regards<br> <br>
Hello ! <br>Seems to be a very great and interesting project ! <br>I have a question, the tilt switch you use, it is possible to use a mercury tilt switch, for example, these ones (saw on ebay) : <br> <br>http://www.ebay.com/itm/10pcs-Mercury-Tilt-Switch-0-3A-20V-101-/250777330926?pt=LH_DefaultDomain_0&amp;hash=item3a637e64ee <br> <br>Thank you in advance and Best regards ! <br>
Hi,<br> thank you for your interest for my project.<br> About the tilt switch, your &quot;ebay model&quot; works with a mercury drop... The problem can be that: when you shake your board the mercury drop can split into multiple drop.<br> Please not that I m not sure about that !!!! I have never use such tilt switch.<br> <br> If you try please post a comment here.<br> For information, the tilt switch I use work with a metal ball (you can hear the noise of this ball on the video) You can find this part here ==&gt; <a href="http://snootlab.com/lang-en/composants/96-capteur-de-basculement.html" rel="nofollow">http://snootlab.com/lang-en/composants/96-capteur-de-basculement.html</a><br> <br> <br> Best regards
What is &quot;PoliceX&quot; <br>Is it the font size or something?? <br> <br>Isnt the maximum size simply 7 for 7 LEDS?? <br>but it is set at 5. <br> <br>Cool sketch <br>Thanks! <br>
PoliceX is the police size on the X axis. The police used is 5x7 (x/y) police <br>So policeX is 5. If you change the police type with a different number of led for example change just the policeX parameter all the timer will be automatically adjusted to this new policiy... <br>Thank for you comment <br>
Perhaps Police means something in Italian (if that is what it is in the example?) <br> <br>So i can use more pins&amp; Leds, adjust the PoliceX and get bigger letters, correct? <br> <br>Cool! <br>Thanks for the reply!
ok ok ok, I see. Police is the french word for font...<br> So if I use corect (...) english my last relpy is<br> <br> PoliceX is the <strong>font </strong>size on the X axis. The <strong>font </strong>used is 5x7 (x/y) <strong>font. </strong>So policeX is 5. If you change the <strong>font </strong>type with a different number of led for example change just the policeX parameter all the timer will be automatically adjusted to this new <strong>font</strong>... Thank for you comment<br> <br> Sorry again for my very bad english.....
&quot;So i can use more pins&amp; Leds, adjust the PoliceX and get bigger letters, correct? &quot; ==&gt; Yes you can !!!<br> <br> For example is the TV-out library : <a href="http://code.google.com/p/arduino-tvout" rel="nofollow">http://code.google.com/p/arduino-tvout</a><br> you can find the following file : &quot;font4x6.cpp&quot;<br> Is a 4x6 font so in this case you have to set PoliceX to 4<br> But in this case, you have to change some other parameters....<br> <br> I will try to post an update of this skectch in the next day in order to use all the TV out library font...<br> <br> If you have a special font, please send me the font file, and I will make the code with this font too.<br> <br> Regards
will it work if I put it on a motor that rotates in high speed?
No, because the sensor if a tilt sensor...<br> If you put a motor, you have to use a REED switch (<a href="http://uk.mouser.com/ProductDetail/MEDER-electronic/KSK-1C90U-2034/?qs=Gn6sDDtUhEnntk6ouTT%252bgA%3d%3d" rel="nofollow">http://uk.mouser.com/ProductDetail/MEDER-electronic/KSK-1C90U-2034/?qs=Gn6sDDtUhEnntk6ouTT%252bgA%3d%3d</a>), a hall effect sensor (<a href="http://www.sparkfun.com/products/9312" rel="nofollow">http://www.sparkfun.com/products/9312</a>) and magnet. You can also use a led + photo transistor .<br> <br> A last point, if you use a motor with really high speed, the code can fail because it doesn&rsquo;t use interruptions...<br> <br> Please post a link with the result of your experimentation<br> <br> Regards
Do I have to use a switch?<br>I'm thinking of not using a switch at all.. you just plug the power to the arduino and it works<br>And sorry I don't know what do you mean with interruptions ( I'm new to arduino)
Yes you have!!!<br> <br>It's for synchro. It you don't use a sensor it will work like this<br> <br>==&gt; http://youtu.be/VIaAG9hHdEM<br> <br>or this http://youtu.be/9l2Vnq2NwHg<br> <br><br> <br>But if you use a sensor,<br> <br>==&gt; http://youtu.be/huHlfEiqA6Y<br> <br>In this last case the sensor is an opto isolator.<br> <br><br> <br>Last point, interruptions is the french word for Interrupts (sorry for my bad english)==&gt; http://arduino.cc/playground/Code/Interrupts
And there is an update of this code, with automatic timer calculation... see pov04.pde code...

About This Instructable




More by tempteta:Simple POV homemade arduino shield 
Add instructable to: