Instructables
Picture of Simple POV homemade arduino shield

Has Gunnery Sergeant Hartman (Full Metal Jacket) says during the riffle pray “There are many like it, but this one is mine”
 
Remove these adsRemove these ads by Signing Up

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

Tools

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 =>http://www.instructables.com/id/Embarassingly-Easy-Arduino-ProtoShield/

and here http://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


The code can be found downloaded here

Step 5: Enjoy

Picture of Enjoy
rulez.jpg


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.
veersingh064 months ago

hello author

i am little bit confuse because you pov05.zip zip shows error

so please help me

tempteta (author)  veersingh064 months ago
Hello;

What do you call error ?
Error to download, ?
Error to unzip ?
Error in the Arduino IDE ?
What is the error message ?

Regards

nikhil04arora5 months ago

hello author,

I really liked this project.

I tried running this code and got the following errors. Can you please tell me what changes are to be made.
Thanks in advance.

ERRORS:-
sketch_apr10a.ino:6:21: error: font7x5.h: No such file or directory

sketch_apr10a.ino: In function 'void displayChar(char)':

sketch_apr10a:97: error: 'charbook' was not declared in this scope

tempteta (author)  nikhil04arora5 months ago

In the file pov05.zip 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 "pov05")

Let me know if it works

Regards

Hello again

Thank you so much.

I put these 2 files in the same directory. Its still showing an "error sketch_apr11a.ino:781:21: error: font7x5.h: No such file or directory"

should i remove:- #include "font7x5.h"..?

tempteta (author)  nikhil04arora5 months ago

It strange because your error message talk about : sketch_apr11a.ino file

You have to open the pov05.ino file with arduino and to copy the code from this file into the arduino ide.

Please find below a step by step guide to do that

1 - close all the windows of your Arduino IDE

2 - download the pov05.zip file

3 - unzip it in your skectchbook folder

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

5 - start arduino ide, now in the menu "file" => "skectchbook" you souhld have a item called pov05.

6 - clic on pov05

7 - enjoy

please help me! pov05.ino is the arduino sketch. but what about the font7x5.h? where should I install the font?
tempteta (author)  englishfire1 year ago
Copy the font7x5.h file in the same directory of the pov05.ino file. Thank you for your interest for my instructable.
Grenat1 year ago
Voilà ma bricole >>>
Merci d'avance
Untitled Sketch.jpg_bb.jpgUntitled Sketch.jpg_bb.jpg
Grenat Grenat1 year ago
Oups deux images !
Grenat1 year ago
hi,
I received all the materials needed for doing a similar pov :), i am on the soldering components part and i have a problem :s >>> how can the 500 ohms resistors be connected to pin 6 to 12 of arduino male header meanwhile it is occupied by
two male header of 8 pins?
Don't know if i have missed something to resolve that
Thank you in advance!:)
tempteta (author)  Grenat1 year ago
You have several ways to make that.
The first way is to make a kind PCB trace like this http://www.niklasroy.com/images/ping/ping_04.jpg
The second way is to solder the leg of the resistor on the 8 pin header
I will post a picture of the back of my pcb with the two solution ASAP (maybe tomorrow)
tempteta (author)  tempteta1 year ago
you can found detail of the connexion here :*

http://www.instructables.com/id/Simple-POV-homemade-arduino-shield/step3/Solder-the-electronics-parts/

Sorry for the delay !!!

best regards
suggestion: 2 unnecessary dots can be removed by changing these lines

for (a=0;afor (a=0;a
to

for (a=0;a<(sizeof(texte)-1);a++)
for (a=0;a<(sizeof(texte2)-1);a++)
Thank you so much, I will update this instructable with your modification and some improvement
Thank y ou again and best regards
tempteta (author)  tempteta1 year ago
Done
Grenat1 year ago
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 ?
Ok cool can't wait to see it !
Thks :)
Grenat1 year ago
Thks for datasheet and technical tips, i will read that very carefully.!
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 !)
No problem, i would pass here for updating some news on that (or if i have any problems again!)
Meanwhile, i have to wait my little components come at home ( free shipping on ebay are very long : between 15-30 days :s!!!)

Thks for all & best ideas for the future!!
Grenat1 year ago
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 "tilt", i thought maybe it would work....(or not!)
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 :

http://www.ebay.com/itm/370516344093?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

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!!

If it works with "Metal Ball Tilt Shaking Position Switches" i would post it here !

Thks !
tempteta (author)  Grenat1 year ago
Your second tilt sensor looks like mine.
You can find the datasheet of my tilt sensor here http://snootlab.com/attachment.php?id_attachment=75
This document tell us that the contact is close if the angle is superior to 15° from horizontal.

With yours : "The switch would be in the "off position" in the horizontal positon,
"on positon" when raised to 10-90 degree or shakes"

So il think it can work with this sensor. Maybe you will have to change a part of the code.
Maybe the line "if (digitalRead(2)==LOW)"  is not ideal for your sensor.... It can be better with if (digitalRead(2)==HIGH)... maybe.... try the two method...

Please post your result here even if it doesn't works...

Best regards

Grenat1 year ago
Hello !
Seems to be a very great and interesting project !
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) :

http://www.ebay.com/itm/10pcs-Mercury-Tilt-Switch-0-3A-20V-101-/250777330926?pt=LH_DefaultDomain_0&hash=item3a637e64ee

Thank you in advance and Best regards !
tempteta (author)  Grenat1 year ago
Hi,
thank you for your interest for my project.
About the tilt switch, your "ebay model" works with a mercury drop... The problem can be that: when you shake your board the mercury drop can split into multiple drop.
Please not that I m not sure about that !!!! I have never use such tilt switch.

If you try please post a comment here.
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 ==> http://snootlab.com/lang-en/composants/96-capteur-de-basculement.html


Best regards
What is "PoliceX"
Is it the font size or something??

Isnt the maximum size simply 7 for 7 LEDS??
but it is set at 5.

Cool sketch
Thanks!
tempteta (author)  oliverkellow1 year ago
PoliceX is the police size on the X axis. The police used is 5x7 (x/y) police
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...
Thank for you comment
Perhaps Police means something in Italian (if that is what it is in the example?)

So i can use more pins& Leds, adjust the PoliceX and get bigger letters, correct?

Cool!
Thanks for the reply!
tempteta (author)  oliverkellow1 year ago
ok ok ok, I see. Police is the french word for font...
So if I use corect (...) english my last relpy is

PoliceX is the font size on the X axis. The font used is 5x7 (x/y) font. So policeX is 5. If you change the font type with a different number of led for example change just the policeX parameter all the timer will be automatically adjusted to this new font... Thank for you comment

Sorry again for my very bad english.....
tempteta (author)  tempteta1 year ago
"So i can use more pins& Leds, adjust the PoliceX and get bigger letters, correct? " ==> Yes you can !!!

For example is the TV-out library : http://code.google.com/p/arduino-tvout
you can find the following file : "font4x6.cpp"
Is a 4x6 font so in this case you have to set PoliceX to 4
But in this case, you have to change some other parameters....

I will try to post an update of this skectch in the next day in order to use all the TV out library font...

If you have a special font, please send me the font file, and I will make the code with this font too.

Regards
ma7moodz2 years ago
will it work if I put it on a motor that rotates in high speed?
tempteta (author)  ma7moodz2 years ago
No, because the sensor if a tilt sensor...
If you put a motor, you have to use a REED switch (http://uk.mouser.com/ProductDetail/MEDER-electronic/KSK-1C90U-2034/?qs=Gn6sDDtUhEnntk6ouTT%252bgA%3d%3d), a hall effect sensor (http://www.sparkfun.com/products/9312) and magnet. You can also use a led + photo transistor .

A last point, if you use a motor with really high speed, the code can fail because it doesn’t use interruptions...

Please post a link with the result of your experimentation

Regards
Do I have to use a switch?
I'm thinking of not using a switch at all.. you just plug the power to the arduino and it works
And sorry I don't know what do you mean with interruptions ( I'm new to arduino)
tempteta (author)  ma7moodz2 years ago
Yes you have!!!

It's for synchro. It you don't use a sensor it will work like this

==> http://youtu.be/VIaAG9hHdEM

or this http://youtu.be/9l2Vnq2NwHg



But if you use a sensor,

==> http://youtu.be/huHlfEiqA6Y

In this last case the sensor is an opto isolator.



Last point, interruptions is the french word for Interrupts (sorry for my bad english)==> http://arduino.cc/playground/Code/Interrupts
tempteta (author) 2 years ago
And there is an update of this code, with automatic timer calculation... see pov04.pde code...