Domino Clock

Yeahhh!! First topic.

First of all I guess this will fit in here. And part 1 is now here: http://arduino.cc/forum/index.php/topic,6671.0.html

Well to continue:
Slapped the first layer of paint on the stones and lightly sanded it:


And to put it into perspective, I added a beer can oh and the circuit boards are done (will post the circuit and code when it's working nicely):

Onto something more electrical than wood and paint :slight_smile:
So I mounted the LEDs in short pieces of drain pipe:


And to close the back I used some aluminium foil (for our American buddies that is tin foil or aluminum foil :wink: ):

Looks like smooth sailing... well not really. The boards with the shift registers, in my finite wisdom I randomly wired the first one... doesn't sounds like a problem but with the whole dataArray stuff the all have to be wired exactly the same. Then there are the LEDs, the slight Dutchness inside me said: buy the cheapest, is best bro!! Now turns out is not best bro... They hardly give of any light, so had to order new bright ones. Either way progress is good, more updational goodness to come later today or tomorrow or whenever there is more to post.

Oh btw, I'm still not sure whether to make the stones clean black or roughen it up a bit for the aged look?? Any ideas??

Clean black i guess :wink:

Great work !! .. i was looking to those domino clocks too, and i wanted to make then for my school project ( quite a noob in electronics )
i wanted to make a couple of dominos for the seconds too, what do you think ?

It is possible to share your shematics for the circuit boards, so i can learn something :slight_smile: ? ( evt in a PM )

please is this the correct why to connect the shift registers ?

What shift registers are those? Picture is too small to read.
If 74HC595, then you want to send Q7/ to the next Din.
You'll Shiftout out will send out 8 bits, even if you're not using it.

So how do electromagnets & H-bridges come into play? Will you use the LED Hi/Lo level to drive a transistor to let current flow for those?

yes that's exactly what i am using 74HC595, i am just sending Q7 to ser_data_in ( 14 ) to the next 74H.

well i am trying to make the clock work, and make a working schematic before, taking the next step changing the LED's with the magnets.

well the electromagnets, i was just thinking to remove the LED and put the electromagnet in sted, so when the swith is high the electromagnet is activated, the dot turns, and when the switch is low it gets disactivated and the dot turns to the original position.

The problem is that since it is a DIY electromagnet, i have to figure out to spol it and calculate the amout og V it is going to use ( i dont want to drain the battery.

stregoi:
yes that's exactly what i am using 74HC595, i am just sending Q7 to ser_data_in ( 14 ) to the next 74H.

Hi,
I think you are supposed to wire the Q7* (also labeled as Q7'), pin 9, to the serial input of the next '595. The Q7* pin is specifically designated for cascading the chips.

Check out the data sheet here: http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf

-- Steven

I'm thinking that electromagnet and "don't drain the battery" are not going to be compatible as described.
These guys
http://www.flipdots.com/EN/electromagnetic_displays/products/page-10/electromagnetic_status_indicators.html
talk about magnetic memory - So I'm thinking pulse of current flow one direction to flip the display, pulse of current flow the other direction to flip it back.
How does your DIY flip dot work?

http://www.flipdots.com/EN/electromagnetic_displays/principle_of_operations/index.html
More info on how the commercial units work.

@ Chrisv : i see now i should hook up the Q7' pin to DS and not the Q7 as i did.

@CrossRoard : i see what do you mean, i drawed my idea, so can you see if it works !

so when the magnet is activated, the to pols of the magnets go away from each other, when the magnet is inactivated, it is then atracted to the metal screw head, and stays there. so i dont know if the H-brigde is necessery, since i am not going to reverse the current.

i am stille strugling with the schematics since i am not that good to electronics.

Can i just switch the LED with the magnet or is there any consideretion i have to take ( outside current and resistans ) ?

LEDs are limited to 20mA, I don't know if that would be enough current for you or not.
You could leave the LED in place, and in parallel add a higher current driver part like a ULN2803 with its own current limit resistor for the magnet.
The number of windings & wire guage & the core you use will all impact the impedance of the resulting coil & hence its current draw.
For example, measure the resistance of the contacts for a speaker, it will be around 8 ohm for many typical speakers. Your coil winding will have some resistance like that also. So take that into account, take your supply voltage into account, take the voltaga drop across your drive transistor into account, work out your current limit resistor from there.
Or you can do it experimentally - find a higher wattage variable resistor, put it in series with the supply, the coil, and the transistor, with the NPN transistor like the ULN2803 being the bottom of the string going to ground.
Add a resistor to ground to an input pin, and a switch to +5 so you can make it momentarily high to turn it on.
Dial the resistor to highest resistance, and slowly bring it down until you get your response, or until something smokes :slight_smile:

That was a great help thank you .. i didnt see the schematic you made, so i did one my self. You think i could work ?


Not like that.
You can't see the .jpg attachment in reply #9?

If you want the LED/Resistor there, connect it to the collector of the transistor.

i See .. but please just bear with my, i am trying to understand. The ULN2083 has 18 pins, but i can only see 2 in your schematics.

what about hookinit the the shift register is it from the SW side ?

Okay, here's a more complete picture. The transistor was meant to represent one driver of the ULN2803, and to provide a means to test if your electromagnet worked.

I stuck in the 7-driver ULN2003 as an example here, replace with the 8-driver ULN2803 if that's what you have.
Or go with the indivual transistors driven by the shift register out (with a series resistor, likethe input to the ULN part has)

For the shift register, you are using shiftout command?
So, datapin goes to SerDataIn
shiftclock goes to SerInClk
your latch control, an output that you will make go from Low to High after the Shiftout, goes to OutClk.

For example, here I shift out 2 bytes, then clock the output register

 digitalWrite(outclock, LOW);  // set up output clock
 // shift out highbyte
 shiftOut(shiftdataout, serialclock, MSBFIRST, highbyte);  // clocks out 8 bits
 // shift out lowbyte
 shiftOut(shiftdataout, serialclock, MSBFIRST, lowbyte); // clocks out 8 bits
digitalWrite(outclock, HIGH);  // this transition makes the data show up on the outputs

OutH/ goes to SerDataIn on the next device.
OE/ goes to ground
SerCLR goes to +5V.

Ahhh i Understand now, that made a lot of sans ! thanks a lot !

last question ( quite banal indeed ! ) .. for the push buttons to set the hours and minuts, i am plannning to hook them to the analog pin 0 ( PC0 ) and 5 ( PC5 ) of the arduino, where the one leg is connected to the 5v through a resistor and the other leg is grounded.

i am also planning to use a RTC to get an accurate time, instead of the internal clock, using the schematic in the picture

is it the right way to do it ?

Don't know, never used the DS1307, can you send a linkt to a datasheet? The drawing looks very nice.
I believe you have the right arduino pins (or at worst they are swapped).

For push buttons, why not use the internal pullups and switch to ground instead? Save on a few parts.
Which pins are PC0 & PC5? Aren't those the analog pins?
You already have A5 committed to SCL above, so that wouldn't be a good choice for an input pin.

Great Then ! yes the PC0 and the PC5 are analog pins, so i guess i will just use PC0 and PC3 wich is analog too.

i just did a little research about using internal pull-ups, but i cant see the logic in saving parts, because as far as i understood i will still using 2 push buttons and to resistors.

and the datascheet for the RTC is : http://www.datasheetdir.com/DS1307+download

With the internal pullups, you only need the switch.
With the switch open, the pin is pulled high internally and reads as 1.
To get 0 you close the switch to ground. No external resistors needed.

You can use digital pins for switch closures like this as well, doesn't have to go into an analog pin.

Sounds Very good, i guess i will stick with the 2 push up buttons to set the hours and the minutes, it is much easier for me to understand, the newbee as i am :slight_smile:
I guess my hardware part is done .. thanks for a big help, i learned a lot.

now i have to move to the coding part, and i guess i will read the earlier post you answered earlier, i should learned something from there, since i guess it will fit with what i am doing.

i will surely ask for more help :slight_smile: ... and i will publish my steps so others can learn something too :slight_smile:

i Guess you should take a look at the the FP2880A is kind of smart and can be used to control the flip-dots, here is the dokumentation :

http://www.datasheetcatalog.org/datasheets/320/500899_DS.pdf

but there is no much information / projects with it in google.

Now for the code :slight_smile: .... i've been studying the code from the original thread, from the biginning i can't understand this part of code :

//Data Lines to the hour stone
int hlatchPin = 3;
int hclockPin = 4;
int hdataPin = 5;

//Data Lines to the decimal minute stone
int dlatchPin = 6;
int dclockPin = 7;
int ddataPin = 8;

//Data Lines to the single minute stone
int mlatchPin = 9;
int mclockPin = 10;
int mdataPin = 11;

as far as i understood we are hooking ALL the 75HC595's to only 3 output pins ( latch / clock / data ) witch are ( 8 / 11 / 12 ),
In the code why are we defining 6 output pins from the adruino ? is it because every to 74HC595 are going to be hooked to three pin's in the adruino ( 2 shift registers at 3 / 4 / 5 ) ( 2 shift registers at 6 / 7 / 8 )( 2 shift registers at 9 / 10 / 11 )?