Digirule 1 & 1A

Update 15 January 2020 – The Digirule 1A kit soldering video and PDF are available for download. You will find them at the bottom of this page (the kit instructions are included in the main download with all other files including schematic, PCB design, source code etc.)

The Digirule 1 and Digirule 1A are interactive binary PCB rulers that feature seven logic gates, four flip flops and a 4-bit binary counter. You can purchase a Digirule 1A from my Tindie store (when they are in stock):

The Digirule 1 and 1A are completely open source. You can download all files including PCB layout, source code and BOM in the link at the bottom of this page. The Digirule 1 and 1A essentially do exactly the same thing however the Digirule 1A features improved buttons and improved firmware which has the old Swordfish Basic code ported over to C (by Brent Hauser) – Huge thanks Brent!

UPDATE: 30 December 2015 – Jaap has made a really cool DigiRule Java Simulator which you can check out in the link below. You can check it out HERE.

The DigiRule 1 and 1A are 15cm (6″) rulers with which are marked in binary digits rather than decimal. The built-in functions are as follows:

Logic Gates

  • NOT Gate (Inverter)
  • OR Gate
  • AND Gate
  • XOR Gate
  • NOR Gate
  • NAND Gate
  • XNOR Gate

Flip Flops

  • SR Flip Flop
  • JK Flip Flop
  • Toggle Flip Flop
  • Data Flip Flop

Four bit binary up/down counter

It is powered by a single 3V CR2032 button battery and the brains of the unit is a PIC 18F45K20 microcontroller (which is a greatly over-powered device for such a simple task – but they are cheap!)  The functions listed above are controlled by nine surface mount push buttons and has twenty three surface mount LED’s to show the status of the inputs and outputs. The rear of the ruler contains logic gate and flip flop truth tables, a binary conversion chart, a few select SMD component footprints and some drill hole sizes.

The figure below shows the front and rear of the original Digirule 1:

The figure below shows the front and rear of the Digirule 1A (notice the improved buttons):

 

 

Check out the youtube video for a demonstration:

 

Soldering Kit Instructional Video:

Click below to download the DigiRule 1A archive (This includes bill of materials, DIPTRACE PCB design and schematic files, PDF schematic, firmware, source code and User Manual and soldering kit instructions.

Digirule 1A Files (1652 downloads)

 

 

 

 

0 0 votes
Article Rating
Subscribe
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

188 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

I am waiting on the original ruler

I have soldered the Digirule Kit and it works fine. One critical point, you should turn the power switch upside.

Does anyone know where I can buy a DigiRule? Looks like they are sold out.

asking myself the same

[…] Deskripsi video :   The DigiRule – A Binary PCB Ruler Check out https://www.bradsprojects.com/the-digirule/ for details on how you can build your own DigiRule.   Selain nonton video The DigiRule – A […]

[…] original ruler introduction, Hackaday featured a very crafty digital logic ruler, by Brad, called DigiRule. This PCB ruler also contained a microcontroller and LEDs which simulate digital logic including […]

[…] original ruler introduction, Hackaday featured a very crafty digital logic ruler, by Brad, called DigiRule. This PCB ruler also contained a microcontroller and LEDs which simulate digital logic including […]

The PICKIT 2 clone link, have you had any experience with the seller? He has a low order count so just doubtful…

Hi Brad,
Just looking at the PCB file, it seems to be missing a file that provides all the tables on the bottom silkscreen (it comes up with just a white square)? Will you be making your update open source? Thanks!

Hi Jacoburge, I have just uploaded the updated version however even in the old version I had no problem with viewing the bottom silkscreen in my Gerber viewer. In any case, give the new version a download. It is dated 02 July 2017.

Hi Brad,
Thanks for uploading those files. I am viewing it in diptrace and still cant see most of the bottom silk as well as the logo on the top silk. Is it an image that’s stored away from this directory?
Thanks.
comment image

Hi Brad I have tried the updated file and can also confirm the bottom silk logo is missing.. This must have been an imported image of some kind which doesn’t get transferred from computer to computer, even by coping the project, this is a bug with Diptrace.. A fix would be to supply the image and the end user re-apply the image in Diptrace. Thanks Bitfogav

Thanks Gav, I’ll have to remember this little bug for next time!

Update – Originally I thought this was a bug in Diptrace, because this is what I’ve experienced before but what it now looks like is that the image files created by Diptrace ending .dipb1 .dipb2 are missing from the upload. I’m sure Brad will update the upload file soon 🙂

Alrighty it’s all fixed 🙂 Thanks for the help with this one Gav, I should pay more attention next time to the files that Diptrace generates!

Hmm, I see!

I’ve updated the zip file again and have included the top and bottom silkscreen images. It seems strange that Diptrace wouldn’t save the file in a format which includes the images automatically. I hope this helps now though 🙂

Hi Brad,
Will there be another batch of digirules? I’d gladly buy a few as the one I have from the kickstarter is great and there are plenty of people who would like one.

Great project and my hat is off to you for it.

Hi Sean, I have had a number of people ask for some more Digirules so I am getting a batch of 100 made up and will post them up for sale on Tindie once they are all ready to go. Here is my Tindie store:

https://www.tindie.com/stores/bradsprojects/

Do you have an estimate of how much time will it take?

Hi Alfredo, i have just had word from the factory and they will be ready to go this week. I will be posting them up for sale on Tindie in the next day or two.

How much are there available on tindie?

Hi Hannes, there are 59 left in stock on Tindie.

Thanks. I found it out myself yesterday and ordered one almost instantly. This ruler is amazing 😀 Greetings from Germany 🙂

Hi!

Did you have this produced?

If yes, please contact me.

Thank you.

Do you plan to sell the DigiRule again? It is super cool.

Much thanks! It is definitely an great online site!.

Hello Brad,

for one year now I try to get a nice DigiRule 🙂 . But I am always too late 🙁 (pr-orderbutton gone, shop closed .. ).
Is it possible to contact me, for the price including tax an shipping to germany.

Please 🙂

Hi Brad,

How’s the new store coming along?

I’m busting to get my hands on a couple of these!

Cheers

I’m up for two also.

Hi Brad,

You go you generate the POV Message? In particular the “Const POVMessage”.

I got my two DigiRule 2’s yesterday. I still have to get batteries, but they do look good. Thanks!

Hi,

very cool project.

One idea: wouldn´t it be better for the “led shake display” to rotate the leds in 90°? Then you can just swing the ruler like a pendulum with just two fingers. This would be more easy and fast to handle instead of moving the hole ruler including your hand and arm from left/right.

Best Daniel

Hi Brad,

I pre-ordered on February 5th (lucky me) but did not receive a confirmation or so.

Well you send out confirmations?

Best regards!

I was showing your Digiruel to some friends to order together
and wanted to place our (pre-)oder,
but the button is gone, does that mean they are out again?

Or did you pull the preoder-page to be replaced with the yet-to-come shop?

Is there any chance to pay via PayPal?
I do not want leave my credit card details (inkl. security number)

kindly regards
Wolfgang

Five more for me please.

And, a BIG thank you to Sascha for rewriting the code in C.

I would also like another 2 of them.

would love to have also 10 of these!
Please add me to the list

Two for me, please, and i didn’t get any from the first batch,
so do I get first pick? 😉

GreaT!
Count me in for another 10!

Peter

How would we be able to purchase the 2nd batch? Through this site or another avenue. You can count me in for 2

I bought two from the first round. Count me in for 4 if possible… Thanks!

Robert

Hi Brad,

again thanks a lot for this great gadget. Most of the 10 i bought are gone as presents for christmas.
It would be great to have a possibility to get some more. Do you intend to offer a 2. batch? I’m quite shure another 1000 pieces would be sold out very quickly.

What do you think?
Kind regards

Peter

I’ve built a C version of your firmware with some enhancements. Maybe you’ll like it:

https://github.com/sittner/digirule-c

Thank you for that cool project.

Although the code is adamant about turning the brown-out reset enable off (“Config boren = off ‘ this is a must if using coin cell batteries! the micro controller always resets itself …”), I’m not finding this to be true. I’ve set the BORV to 1.8 volts (using the Configuration Word editor in the standalone PICKIT2 application rather than a config statement) So far, so good, no resets observed in any mode (battery measuring 2.5 volts with 4 LEDs on). With a short LED flashing sequence on power up, then presumably the ruler would start doing this flashing sequence when… Read more »

your time. You simply can’t exepct to be productive if you can’t manage your time effectively.Success in both business and personal undertakings will often be traced back to how really good your quire some assistance in how to manage your time more efficiently? What do you do? ManicTime is a

I have written my own update of the software. The main additions are that in mode 7 you can change the 6-sided changed die into a die with any number of sides from 2 to 31, and there is an additional mode 10 which is a tricky puzzle game. You can download it from my site here:
http://www.jaapsch.net/digirule/
Feel free to use it however you like.

Wiring questions

a. Are there 10k pulldown resistors on all the pins connected to buttons? So when the button is pressed, it connects Vcc to the input pin?

b. PORTB.0 is not assigned to either buttons or LEDs and yet it is configured as an output. Is this to minimize current consumption?

What would help the most for re-programming are – A pinout of the JTAG port in a common image format so that I don’t have to figure it out from Gerbers when I don’t have a Gerber viewer or the right PCB CAD on my computer. The zip files with new code in a zip that works on windows so that I don’t have to install a complex unzip package to get to the files OR even the code – unzipped – it can’t be that big! If I can download videos then I can download anything that can fit… Read more »

Thank you for all the hard work you put into this project! I just finished reprogramming my son’s DigiRule with my PICkit 3. I used your latest build but replaced the smiley face POV message with my son’s name. I can’t wait to see his face when he waves it in the air and sees his floating name! Thanks again…

I get a message “this file has an unspecified security flaw” when I try to open DigiRule-Files-03-December-2015.zip

@Victor – That’s great, glad my tip worked. I’m not sure there is a Schematic for the Digirule, that would be up to Brad and whether he has one or not?.

If there is any questions with the Digirule then you can always ask or leave a topic post on the Digirule forum here: https://www.bradsprojects.com/forum/viewforum.php?f=36

Until I received the DigiRule, I thought I has every size of button cell. lol.

Hey Gav,

Thanks for the tip, I put the battery and was able to update, no more bounce after.

regards,

Victor

Hello Gav,

I was afraid the battery will short to the ICD3 or something….
Do you have sch of the digirule?

Hello Gav,

I have followed this connections.
http://mech.utah.edu/adv_mechatronics/uploads/Main/RJ-11_programming_Pinouts-sml.jpg
and have followed the same color connection as this so it wont confuse me.
http://www.auelectronics.com/forum/index.php?topic=42.15

Everything is already connected, Digirule to ICD3 before I plugged the USB to the pc.

@Victor I’ve not got a ICD3 but you’re ICD is saying quote”Target device was not found (could not detect target voltage VDD). You must connect to a target device to use ICD3.”
It sounds to me like the device needs to be powered before the ICD will upload the code. Have you tried powering up the Digirule with the onboard battery and switch in the ON position? and programming with ICD?

Gav.

2015-12-10T12:36:14+0800- Completed loading IPE. 2015-12-10T12:36:22+0800- Loading hex file. Please wait… Loading code from G:\Hobby\DigiRule\DigiRule-18F43K20-Modified-06-Dec-2015\PIC18F43K20.HEX… 2015-12-10T12:36:23+0800- Hex file loaded successfully. ***************************************************** Connecting to MPLAB ICD 3… Currently loaded firmware on ICD 3 Firmware Suite Version…..01.40.05 Firmware type…………..PIC18F Target device was not found (could not detect target voltage VDD). You must connect to a target device to use ICD3. 2015-12-10T12:36:46+0800- Programming… ***************************************************** Connecting to MPLAB ICD 3… Currently loaded firmware on ICD 3 Firmware Suite Version…..01.40.05 Firmware type…………..PIC18F Target device was not found (could not detect target voltage VDD). You must connect to a target device to use ICD3. 2015-12-10T12:36:52+0800- Programming failed… Read more »

Hello, I was trying to update the firmware. I was using ICD3 and IPE, but here’s my output… I try to use IPE here’s the output: 2015-12-10T00:20:54+0800- Completed loading IPE. 2015-12-10T00:21:20+0800- Loading hex file. Please wait… Loading code from F:\Hobby\DigiRule\DigiRule-18F43K20-Modified-06-Dec-2015\DigiRule 18F43K20 Modified 06 Dec 2015.HEX… Warning: F:\Hobby\DigiRule\DigiRule-18F43K20-Modified-06-Dec-2015\DigiRule 18F43K20 Modified 06 Dec 2015.HEX contains code that is located at addresses that do not exist on the 11AA010. Code incompletely loaded. Warning: F:\Hobby\DigiRule\DigiRule-18F43K20-Modified-06-Dec-2015\DigiRule 18F43K20 Modified 06 Dec 2015.HEX contains code that is located at addresses that do not exist on the 11AA010. Code incompletely loaded. 2015-12-10T00:21:20+0800- Hex file loaded successfully. ***************************************************** Connecting… Read more »

Okay, so I guess there is no way to purchase one of these anymore?
A shame that.

Hi Brad,

forget everything about the “manual”. I didn’t think about the manual on the back of the ruler – this is more than enough! It’s a geek tool, for a real geek the buttons should be enough 😉

Thank’s a lot for the delivery before christmas!
Peter

16
0
Would love your thoughts, please comment.x
()
x