BD Counter with 7 Segment Display

A place to talk to other users about the mod.
Post Reply
User avatar
ExpHP
Posts: 302
Joined: Sun Jun 03, 2012 1:45 pm

BD Counter with 7 Segment Display

Post by ExpHP »

I can see that just about everyone here is capable of making things much more impressive than I, but searching the forums, it doesn't look like anyone has beaten me to the punch with my latest creation, so I might as well share. (of course, it appears that most of the discussion about segmented displays and BDs was before BDs were given 16 slots, which would've rendered my design impossible... but I digress!)
Spoiler
Show
Image
This is a counter with a seven-segment display. But it's not just any counter with a seven-segment display. It's a very lazy counter with a seven-segment display. It doesn't even really count. It just scrolls through a limited number of hardcoded glyphs (up to 16 if you want; 15 if you need carrying) stored in ROM. Each 7 segment display has 7 BDs behind it that store the state (lit or unlit) of each segment for each numeral 0-9. Toggling all of the BDs at once will cause it to change to the next number. (Toggling only a few of them will just give you grief.)

Perhaps the only innovative bit is how I've implemented the carry: An additional 11th slot is used in each BD for carrying. When it reaches this 11th block, it will automatically toggle itself again (to zero) as well as toggle the next digit (to carry). This is in part accomplished by using a repeater in a BD to propagate a signal in a different direction.
Spoiler
Show
Image
This design:
  • is compact (-ish) because there's nothing to be encoded or decoded. This is something you can sanely build in a Survival World. I know I will; I want a day counter.
  • is repeatable. Each digit can be built right alongside the last.
  • comes jam-packed with signage for those who like reading.
  • has substantially less (none) signage on the second unit for those who like copying!
  • is painfully limited! It will only count forwards by ones, tens, hundreds, etc. God help you if you ever go past the number you want; you'll have to keep going until you max it out and roll over back to 0. What fun!
The wiring behind each digit is 7 wide and 9 deep, and approximately level in height with the display (what extends above is either decorative or can at least be moved). I see several places where it could be compressed even further in each dimension, and I plan to revise it to do away with the lenses completely, but for now, I wanted to keep it as is to make it easy to tell things apart.
Spoiler
Show
Image
World Download: https://dl.dropbox.com/u/56169534/BTW%2 ... ounter.zip
Last edited by ExpHP on Sat Jul 07, 2012 4:17 pm, edited 2 times in total.
User avatar
Syruse
Posts: 338
Joined: Mon Oct 03, 2011 4:15 pm

Re: BD Counter with 7 Segment Display

Post by Syruse »

I actually did something similar to this not to long ago in my survival world. I use BDs as binary ROM, which lead into a Binary to Decimal converter.

I'm really impressed by how small yours is compared to mine. Nice job dude!

EDIT: I just got a look at the wiring. I can't believe how simple it is.
An IRC Conversation wrote: [19:24] <Ribky> on the bright side, i did my first modifications with the MCP today... :)
[19:24] <Horizon> what's it do?
[19:25] <Ribky> it eats your goddamn animals
User avatar
Ultionis
Posts: 109
Joined: Sat May 26, 2012 7:52 pm

Re: BD Counter with 7 Segment Display

Post by Ultionis »

Wow. This is quite impressive.
ExpHP wrote:This is something you can sanely build in a Survival World. I know I will; I want a day counter.
I really like the idea of a day counter, but you'd need to constantly keep this entire contraption within loaded chunks for it to be accurate. I think you'd especially have trouble if one half of it was within loading distance (and running) whilst the other half was not, as everything would be out of sync. Thoughts on this?
I dance to the sound of a Creeper's legs breaking
User avatar
ExpHP
Posts: 302
Joined: Sun Jun 03, 2012 1:45 pm

Re: BD Counter with 7 Segment Display

Post by ExpHP »

Ultionis wrote:Wow. This is quite impressive.
ExpHP wrote:This is something you can sanely build in a Survival World. I know I will; I want a day counter.
I really like the idea of a day counter, but you'd need to constantly keep this entire contraption within loaded chunks for it to be accurate. I think you'd especially have trouble if one half of it was within loading distance (and running) whilst the other half was not, as everything would be out of sync. Thoughts on this?
To clarify, I was talking about a real-life day counter. I've been taking daily snapshots of my world as it develops (slowly creating what is sort of a time-lapse slideshow), and I thought it would be neat to build one of these in view. Using it for this purpose, I'm guaranteed to be in range of it, because I'll be manually pressing a button to update it.

True, attempting to make anything like an in-game day counter would invariably require the chunk to remain loaded at all times when possible (probably through the use of a mod, or via a dummy bot character once the mod becomes SMP-compatible).

In terms of using it as a general purpose counter, because each unit is 7 blocks wide, you can fit up to two of them in a single chunk if you plan for it (with one additional row of padding between them, 2 digits = 15 wide). As long as you fit both digits as well as whatever is producing the input signal in the same chunk, it should keep an accurate count.

For 3 or more digits, a different method could be used to send the signal used for carrying from the 2nd digit to the 3rd digit - one that politely waits at chunk boundaries, unlike redstone. As long as it doesn't need to carry twice during the time the chunk is missing, it will work itself out when the third digit is loaded.

A rather silly (but possibly feasable?) idea:
Spoiler
Show
Minecarts pause at chunk boundaries and continue moving when the chunk loads. So:

Instead of using a repeater to send the CARRY signal (as I call it), send a Minecart somewhere with a powered rail. A second dispenser keeps placing a minecart on top of whatever the first dispenser places.

Image

Image

Image

Image

Of course, this is a really awkward idea, and it requires an AB-BA circuit just to make sure the bottom dispenser doesn't steal the cart. And even then, I see no way to get the cart back into the spot where it belongs once it leaves.

Still, if there is a will, there is a way.


Edit: In fact, I believe it is not just minecarts, but all entities that share this behavior; an arrow or fire charge fired from a dispenser would likely freeze at a chunk boundary and possibly be used in some clever way to transmit a signal.

Edit 2: Finally, a use for the vase? :P
User avatar
Battosay
Posts: 2043
Joined: Mon Jul 04, 2011 7:37 pm

Re: BD Counter with 7 Segment Display

Post by Battosay »

Really cool stuff, very compact :)
Much more than mine :p
If you look at the update video for the release introducing the Wool slabs, I did use them as counter for a 7 segment display already ;)

Edit : Found it :
http://youtu.be/O_PrSs2YgTA?t=1m45s
User avatar
BigShinyToys
Posts: 836
Joined: Fri Jul 08, 2011 9:53 pm

Re: BD Counter with 7 Segment Display

Post by BigShinyToys »

That is very compact my first attempt at something like this turned into a huge mess that required a train to transport you around it.
viewtopic.php?t=249
On the MCF a while ago i saw a very compact clock that uses piston ROM as storage for the data and a basic 6 X 10 counter.
Very cool system. You should try expanding it to a full clock maybe God work.
User avatar
ExpHP
Posts: 302
Joined: Sun Jun 03, 2012 1:45 pm

Re: BD Counter with 7 Segment Display

Post by ExpHP »

Oh my, I forgot to post about my update!

Rev 1.1 Download Link

I did away with the Lenses and just directly connected all the BDs with one wire. I thought it would look messy, but actually, it ended up looking a lot nicer, like two sets of alternating staircases.
Spoiler
Show
I'm referring specifically to the Brown Wool and Dung seen here.

Image
To work across chunk boundaries, an arrow fired by a dispenser is used to transmit the "carry" signal between digits in different chunks. While I'm not 100% sure, experience with similar objects in the game leads me to believe that an arrow, as a moving entity, will be preserved in terms of both position and velocity as it crosses the border of existence.
Spoiler
Show
The repeater has been moved to the BD at the bottom.
Image
If you don't need to cross chunk boundaries, you don't need a dispenser. This is enough (and it's faster, too):
Spoiler
Show
Image
BigShinyToys wrote:That is very compact my first attempt at something like this turned into a huge mess that required a train to transport you around it.
viewtopic.php?t=249
Wow. I don't know what to say other than... that thing is a beast!
Post Reply