Minecraft Cube

Hardware incubation. See also our in development projects wiki.

Minecraft Cube

Postby nowait » Wed Feb 20, 2013 6:19 pm

Im sure it has already been done over and over again. But a friend of mine played it an awful lot and its his birthday in a couple of months so I thought it might be interesting to build + a cool present.

Its been a long time since I've done much hardware design, most of the time someone gives me the hardware and I write simple embedded code for a function so I have alot of questions and as I read DP alot here seemed a perfect place to ask :) My aim is to do hardware design -> schematic -> pcb (made by somewhere in china prob.) -> firmware -> present. Im not really looking for any ready made solutions, its just more about learning the basics than making something.

I saw a post on HAD of a Diamond Ore Wall Lamp http://imgur.com/a/Z2Uvu and had a thought. In minecraft several blocks use the same pattern but different colours. Ive attached the different types. I wanted to build a small cube (lamp of such) using RGB LEDs and a uC to control the colours. Im thinking either a button that toggles the colours or depending on the cost, maybe using an android phone (bluetooth??)

So here are a few questions:
1. The cube would prob use around 20 LEDs (4 on each side). From what I understand, the colour is set using PWM on the RGB pins. Could I use say a transistor to set all 20 at once? And could this be done using a PIC or would I need an LED controller?
2. I was thinking about maybe getting some cheap vinyl stickers for the sides. By fashioning an unfolded cube with small tabs for overlap. But here comes my problem, I want the LED to light the entire section and not be one bright bit that dims towards the edge. I was thinking maybe using some clear perspex then spraying with glass frosting spray. Im hoping someone has a better idea than that!! :)
3. How much to build in a bluetooth module, roughly?
4. I was thinking around 100x100mm. Too small? Too big?

Thanks
Ryan
Attachments
minecraft block.jpg
Side of block
minecraft block.jpg (3.91 KiB) Viewed 6397 times
Screen Shot 2013-02-20 at 23.01.43.png
Types of ore blocks.
Screen Shot 2013-02-20 at 23.01.43.png (23.63 KiB) Viewed 6397 times
nowait
Newbie
Newbie
 
Posts: 17
Joined: Thu Oct 28, 2010 4:59 am

Re: Minecraft Cube

Postby arakis » Thu Feb 21, 2013 3:51 am

nowait wrote:So here are a few questions:
1. The cube would prob use around 20 LEDs (4 on each side). From what I understand, the colour is set using PWM on the RGB pins. Could I use say a transistor to set all 20 at once? And could this be done using a PIC or would I need an LED controller?
2. I was thinking about maybe getting some cheap vinyl stickers for the sides. By fashioning an unfolded cube with small tabs for overlap. But here comes my problem, I want the LED to light the entire section and not be one bright bit that dims towards the edge. I was thinking maybe using some clear perspex then spraying with glass frosting spray. Im hoping someone has a better idea than that!! :)
3. How much to build in a bluetooth module, roughly?
4. I was thinking around 100x100mm. Too small? Too big?

Thanks
Ryan


Hi,
1) I'd use the RGB LED strips.. ON them you get 4 wires, one for each color and one fro GND, all you need to do is apply voltage to each channel and all of them light up in that color. You will most defiantly have to use transistors to switch them on off. And yes a PIC can control them without a problem . Any PIC with at least 3 GPIO pins can do it, (which is all of them since 4 is the minimum)..I recommend one of the pic12F series(whichever one you can get cheaply next to you).

2) hmm, a diffused plexiglass, with milar foil (mirror) on one side (back), you align the RGB strips along the 4 edge sides.. this should keep the brightness more even along the whole plate..

3) all you need is a cheap bluetooth to serial module from ebay, and connect it to the UART pis of the microcontroller... So now you need number of pins the blutooth needs, + 3 RGB.. so move to a PIC16F, almost all will have a hardware UART, and enough pins..
Hope this helps..

be advised to program microcontrollers you''ll need a programer (cost around 30$), so an Arduino might be a better option..

Here is a project by Sjaak that controls RGB strips without Bluetooth... *you can steal the transistor PIC controll :) http://dangerousprototypes.com/2013/02/ ... ver-board/
best regards FIlip.
arakis
Crew
Crew
 
Posts: 1044
Joined: Wed May 25, 2011 11:15 am
Location: Belgrade, Serbia

Re: Minecraft Cube

Postby Sjaak » Thu Feb 21, 2013 4:17 am

The pic12f could be programmed in theory by the buspirate and thr hvp adapter (use a zener on mclr).

Minor detail those rgbstrip dont have a common ground. But a common v+ (12v)
User avatar
Sjaak
Fellow
Fellow
 
Posts: 3297
Joined: Sun Jan 03, 2010 2:45 pm
Location: Hiero

Re: Minecraft Cube

Postby nowait » Thu Feb 21, 2013 2:03 pm

Cheers guys.

I was thinking about using the PIC16F818 or 9 as I have them and have used them before. (+internal oscillator so dont need external xtal!)
Also I already have a PicKit3 that I was given but thanks for the advice Sjaak. :)

In regards to bluetooth modules, I didnt realise how cheap they were. I was expecting 20+quid.
I was looking at http://dx.com/p/jy-mcu-arduino-bluetooth-wireless-serial-port-module-104299, seems like would do the job. And its only about £5.50! :)

I also ordered some frosted perspex off ebay for £1.50 to get a feel if it would work as I want. For the actual outside of the cube I was thinking about either painting it or or using some vinyl stickers. I ordered a waterproof A3 vinyl sticker (£2.50 off ebay) of the cube template I made to do 4 sides (all sides except the base). Will post pics once I get it. Im gonna try t make a 100x100mm cube.
nowait
Newbie
Newbie
 
Posts: 17
Joined: Thu Oct 28, 2010 4:59 am

Re: Minecraft Cube

Postby nowait » Tue Feb 26, 2013 3:18 pm

Managed to have a go at one side of the cube today. My original plan was to use frosted perspex for all the sides then vinyl each side. But perspex isnt really the cheapest material so looking for alternatives and going to insert perspex windows. I had some red LEDs and fashioned up a cube using my perspex side with vinyl sticker and an amazon box. The problem I have is that the LEDs are so bright on a focused spot. (Well the red ones I have are, still waiting for the RGB to be delivered) and as you can see it doesnt give a nice light distribution. Anyone any ideas on how I can disperse the light?

Build so far https://www.dropbox.com/sh/13xwj8cm603epvx/-9qsb9LXJk

Image
nowait
Newbie
Newbie
 
Posts: 17
Joined: Thu Oct 28, 2010 4:59 am

Re: Minecraft Cube

Postby nowait » Tue Mar 26, 2013 4:36 pm

For anyone thats interested I finished my cube :)
http://www.ryandiver.com/wordpress/2013 ... e/#more-36
dp_finished.jpg
nowait
Newbie
Newbie
 
Posts: 17
Joined: Thu Oct 28, 2010 4:59 am


Return to Project development, ideas, and suggestions