Author Topic: Electronic Dice - How can I improve this circuit / build?  (Read 1357 times)

0 Members and 1 Guest are viewing this topic.

Offline jewelieTopic starter

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
  • Everyone's gotta start somewhere
    • Personal website, of sorts, sometimes with a Pi-driven bird-feeder webcam (currently down but will be putting it up again in the near future with IR capability.)
Electronic Dice - How can I improve this circuit / build?
« on: January 14, 2018, 02:37:16 am »
Hiya

TL;DR Jump to the question at the end in bold.

Decided to make up a stupidly cheap Chinese electronic dice circuit up (the one that decodes into a normal die face) and put it in a box as an excuse to get some practise in, especially the hacking up a box part.

As is always the way, it almost worked right!  ;)   But debugging and fixing is all part of the fun and the learning experience. 

Firstly, there's an error on the PCB layout. one of the LEDs has been put in the wrong place.  (So a 3 looks like .-.  instead of .-', a 2 looks like . . instead of . ', etc.)  Fortunately I managed to work around that.

The bigger problem: the circuit had a huge bias for selecting the number 1!


Given that 1 has the least number of LEDs lit, and given that I am running the circuit on a pair of CR2032s (the most I can fit in the box) I figured this was probably an artefact of circuit current draw and voltage drop across the batteries?  Measuring the voltage with a DMM and confirmed the unstable supply voltage depending on what was displaying.  Oops.

So.... I played about with the current limiting resistor values: changed the 500ohm current limiting resistor for the single LED to 4.7Kohms and the 100ohm ones for the dual parallel LEDs to 2.2Kohms.   Very little affect on brightness but hopefully a big change in current.   Sadly, that didn't fix it.

Next.... I tried speeding up 555's pulses by reducing the 10uF capacitor to 1uF.  Was still biased too much to 1.  Left the 1uF in.

Tried a 220uF capacitor across the power.  Still liked 1 too much.  Left the 220uF there.

Finally, I gave up on the 47uF capacitor on the transistor base's RC input.  This means no delayed switch off now and makes the transistor kinda redundant but...

... BINGO... that works.  :)

And that's where I am.

QUESTION:  How can I add 47uF capacitor back in to give the roll button a delayed switch off again without biasing the circuit towards showing 1 or otherwise being not as random?  Assuming it's due to slightly unstable power, I can't really power it by anything juicier than the two CR2032s.  :( Would adding something like a LM2940CT-5.0 voltage regulator work, as there's an extra 1V to play with and it's low drop out (0.5V @ 1A but much much less when the current is much less, which this is.)  I've got a dodgy cheap chinese pack of 5 of LM2940CT-5.0 on order as, if they work, they might be handy.

Warm Regards
Julie (Derby, UK)

Anxious newbie to EEVblog.  Resuming an interest in basic electronics after a close shave with a joint EE/Computing degree decades ago
 

Offline Cyberdragon

  • Super Contributor
  • ***
  • Posts: 2676
  • Country: us
Re: Electronic Dice - How can I improve this circuit / build?
« Reply #1 on: January 15, 2018, 11:40:42 am »
No, you don't have an extra volt. There's a protection diode in there, so there goes half a volt. The 555 minimum voltage is about 4.5V so at 5V - 0.5V it wouldn't be happy. If it will fit, this circuit should just run straight from a 9V, the LED current would have to be checked though. You could add a 6V regulator if that would be a problem.

(Yes, I know chips can sometimes work outside their operating range, but it's not guarunteed.)

Note: You could also rip out that nasty silicon rectifier diode and replace it with a schottky diode for less loss. ;)

EDIT: of course, you could just remove the diode entirely, just be careful. Also, the 4017 minimum voltage should be 3V, so it shouldn't be cutting out (of course, it could be fake and dodgey).

Wait...are D1, D7, and D9 supposed to be backwards? Doh, it's inverted. But it's also the pin that triggers the one. That should't affect it though, but I'm not sure how much current the 4017 will sink on it's grounded pins.
« Last Edit: January 15, 2018, 12:15:25 pm by Cyberdragon »
*BZZZZZZAAAAAP*
Voltamort strikes again!
Explodingus - someone who frequently causes accidental explosions
 
The following users thanked this post: jewelie

Offline jewelieTopic starter

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
  • Everyone's gotta start somewhere
    • Personal website, of sorts, sometimes with a Pi-driven bird-feeder webcam (currently down but will be putting it up again in the near future with IR capability.)
Re: Electronic Dice - How can I improve this circuit / build?
« Reply #2 on: January 23, 2018, 05:07:58 am »
Thank you!   Yes, the plan was always to rip out the rectifier diode if I was going to try that regulator.  Can't fit a 9V in there, no.

For £1 delivered I fully assume the CD4017 is entirely fake.  ;)  I did dramatically reduce the current draw on it.  If it goes it goes, I've got another one from another kit or I could get a proper one with a future CPC order.

Ta again.  :)
Anxious newbie to EEVblog.  Resuming an interest in basic electronics after a close shave with a joint EE/Computing degree decades ago
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf