Bar graph LED electronics help needed

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Mr. Nagata

Sr Member
RPF PREMIUM MEMBER
I'm trying to make a simple circuit for a phaser rifle. All I want to do is wire some kind of controller circuit for a 10 segment LED bar graph with two push buttons. One button would light the segments sequentially, the other would turn them off. So some kind of basic up/down counter. But after hours of searching the internet, I can't seem to find a schematic for something like this. Can anyone point me in the right direction?
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Mr. Nagata

Sr Member
RPF PREMIUM MEMBER
Thanks Robiwon. I've seen that circuit before. It's not quite the same as what I'm looking for. With that circuit if you watch the demo video, you hold down the button and the lights sequence up very quickly, then flash a few times. Then you reset it with the other button. It looked promising, but it's in actuality more complicated than I would need.

I'm hoping to find a schematic of a circuit where you push button A and one segment lights up. You push it again and the next segment lights up. And so on and so forth until the entire barograph is lit. If you push button B, the last LED segment will go off. Press it again and the next one goes off. Until the whole barograph is de-illuminated. Does that make sense? Is that actually way more complicated than I think it is? It seems like a simple concept, but I'm an electronics novice who pretty much only knows how to solder. So maybe I'm way wrong.
 

Mr. Nagata

Sr Member
RPF PREMIUM MEMBER
P.S. I'd also be okay if button B just reset the who bargraph, rather than step it down. That would be acceptable as well.
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Mr.Engineer

Well-Known Member
I have done this years ago for one of the Phaser rifles but the deal botched because I could not live with working on a recast. This was my few very first prop projects and I did not realise the cost of setting things up when I wanted an optical trigger and a working (changing LED colours) scope. This video did not show the 'screensaver' feature although it was done because I have reused the prototype board for other things and realised too late.

http://chowfookcheong.com/Phaser Rifle IIIa/Phaser rifle.htm


Finally, I gave that up but when a friend wanted me to modify his Playmates Boomerang Phaser, I salvaged some of the circuits into them here. Notice that this time, the video is much better now because I stopped talking :lol:

Exploring the Playmates First Contact Phaser
 

Mr. Nagata

Sr Member
RPF PREMIUM MEMBER
Thanks for sharing. I found your video and web page as well in my endless search for how to make this circuit. It's excellent stuff, but beyond the realm of my understanding and capability. I'm just looking for the basic circuit that will light up the bargraph.
 

Mr.Engineer

Well-Known Member
Unfortunately, the Star Trek Phaser Rifle needs two buttons to adjust the rifle's 'power' setting, just like the hand phasers in Star Trek:The Next Generation, Deep Space Nine and Voyager.
 

epilepticsquirl

Sr Member
I was afraid of that, would have made things so much easier.

It lOoks like the circuit on here does the incrementing, im not entirely sure. For the second button you could have it so it just turns it off. Would be fun to breadboard it.

Up/Down LED Sequencer - Page 2

It actually looks like he made a better circuit tested in real life here,
http://www.electro-tech-online.com/general-electronics-chat/89852-up-down-led-sequencer-4.html


Otherwise I think that you'd have to enter the realm of micro controllers and programming. Eeek!

Blah, scratch that. I just realized that I don't think these work with each button press; once you flip the switch they increment by themselves. Oh well.
 
Last edited:

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Mr.Engineer

Well-Known Member
Yep, went that route many many years ago. Took me a lot of IC Chips, funky wiring and lots of hair falling. Eventually, I got a very big circuit board which sucks a lot of power and still can only does 40% what I wanted it to do.:facepalm

So, I saved up and bought a microprocessor package and all it took was just one chip which does everything. But man, I am still learning those stuff as I can blink LEDs but I just can't dim them... yet.:unsure
 

Nicksdad

Sr Member
RPF PREMIUM MEMBER
Hey Ryan, I have an old upgrade circuit made for the playmates phaser years ago that if I recall does about what you want. You push the left button and the bar graph climbs up, you push the right button and it resets. It might work for you. Ir you are putting your circuit into a first contact rifle then I have a chaser circuit that the guys used in those originals.
 

Hfuy

Active Member
If you are willing to tolerate the B button just resetting it, you can do it with one chip, the 4017 decade counter. I haven't read every link in every post above and it's almost certain to have been mentioned.

It has a clock input to which you connect your "up" button, a reset input to which you connect your "Reset" button, and ten outputs, to which you connect your LEDs (always via a suitable series resistor).

There are subtleties. To turn it into a bargraph, you will need to dance the funky chicken with some transistors (or gates) and diodes to ensure that everything less than the active output turns on, because by default it just has one output active. You will need to debounce at least the "up" switch, or you'll find that switch bounce will make it count up in units of more than one. This is easily googled.

Option B involves something like a LM3914 bargraph meter driver. It's a bit more complicated to set up, but it's basically a bargraph volt meter. You'd want to make it read the voltage across a capacitor, and have your A and B buttons charge the capacitor via a resistor. The graph would increase while you held one button down, and decrease while you held the other one down. It would be nonlinear, possibly very nonlinear, so the speed with which the segments illuminated would change as it got near the ends.

Neither of these really replicates the behavior of the screen prop, which I suspect used a microcontroller (which is how I'd do it). That said, if you're not into microcontrollers, I think it can be done in discrete logic, probably two chips.

Chip one is a 4510 BCD counter. This operates broadly like the 4017, except it has a count-up input, and critically, a count-down input. The other difference, though, is that it doesn't have a completely decoded output. It outputs BCD, binary coded decimal, which is basically four-bit binary data. That's no disaster, though, because you could then use a 74HC42, which takes the four BCD outputs from the 4510 and decodes them to individual outputs.

You would still need to debounce the switches and do something to ensure that all the segments below the one you selected were lit, which could actually get quite sticky - I'd do it with transistors and diodes, probably. At that point you would have exactly replicated the behavior of the screen prop, with the possible exception that if you went all the way up to the top and kept pressing "up" it would probably wrap round to the bottom again.

You could I suppose have a 4017 connected to a high-speed oscillator, and connect a series of AND gates between its outputs and the outputs of a 74HC42, with their outputs connected to the reset on the 4017. That would keep all the segments below the selected segment lit. More could be used to gate off the "up" and "down" buttons to prevent overflowing. But that's ten AND gates, and now the thing is becoming a five or six chip monster.

Which is why people do it in microcontrollers.

HF
 
Last edited:

epilepticsquirl

Sr Member
Interesting read Hfuy. I found this schematic for an LED sequencer but i'm not entirely sure if it operates the way OP wants. It uses 3 74LS194 chips and two ULN2803A chips to drive the LED's. I'm tempted to bread board it but would certainly like your opinion on it's functionality.

Check it out.
View attachment 85390

I know OP has already gotten offers of the same chip but it'd be nice to know what kind of options there are to play with.

I'd love to get something to work using wired logic instead of a MC if possible.
 
Last edited:

Hfuy

Active Member
Hrm, that's quite crafty. I haven't analysed it in depth but I think it does broadly what you're after, although it has one button and an up/down switch as opposed to an up button and a down butto, but that looks like it's fixable.

It's probably a cleaner solution than any of my harebrained plans, certainly.
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

SJason

New Member
Way too much work and bulk, with old style electronics, heh - an MCU, a chocolate bar, and an hour to program...
 

Hfuy

Active Member
an MCU, a chocolate bar, and an hour to program...
Assuming you're already au fait with MCUs, yes.

Arduino makes this sort of thing rather a lot easier, but most Arduino boards are too big for a phaser. I think there are some very small ones designed for wearable stuff that might suit. To the OP, do investigate that, at least. It's suprisingly easy, and probably not significantly more expensive than all these discrete chips.

HF
 

epilepticsquirl

Sr Member
If the code isn't big, and doesn't use many pins it can be ported over to an 8-pin ATtiny Chip or something similar via an Arduino board. I just don't have the where with all in me to learn coding for projects like that. I can make an LED blink but that's just about it. :lol

Here's some simplified instruction to "shrinkify" Arduino projects.
http://www.youtube.com/watch?v=30rPt802n1k

If anyone wants to post the Arduino code up by all means post away. I think it would be fantastic to archive something like that in this thread for the sake of future searches. Just use spoiler tags to hide all that code! hehe


Hrm, that's quite crafty. I haven't analysed it in depth but I think it does broadly what you're after, although it has one button and an up/down switch as opposed to an up button and a down butto, but that looks like it's fixable.

It's probably a cleaner solution than any of my harebrained plans, certainly.
That's great to know! Now if i can ask one more favor and inquire as to what the clock is? Is it a 555 timer wired for a single pulse or something? That's the only thing holding me back from ordering the parts.

I love circuit logic like this because of the abundance of parts that are used. Kind of the opposite of most people's thinking I know, but having a compartment that shows electronic guts like this in a phaser just makes the prop look all the better IMHO. :)

Cheers! :cheers
 

Mr. Nagata

Sr Member
RPF PREMIUM MEMBER
Wow, there's a lot of information here. I appreciate all the help, though this is beyond my abilities, especially for this project which is only a quick build. I'll probably just have non functioning buttons and just light the bar graph LED solid when the rifle is turned on.
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Top