Go Down

Topic: Klingon Proton Collector (Read 19422 times) previous topic - next topic

dave-in-nj

I hope the OP can get the blink without delay to work with the two LED's   it should be pretty easy.

as for the dual use of a pin..... just thinking out loud.....
if one has an LED and POV, it might be possible to check the voltage on that pin.    if a switch were also connected, it might be possible to read that value.   not sure how that POV output would work with the time it would take to read the switch.

I think the switch is used to lock the displays in place after the unit has filled.

I was thinking a hall sensor.  it would start to capture when the unit was over metal, like a stud finder.  that way you could move it around on a wall unit it was able to start capturing.

jameskirk

#16
Aug 15, 2014, 09:00 pm Last Edit: Aug 15, 2014, 09:08 pm by jameskirk Reason: 1
OK fellas
This is what I have...
http://i1078.photobucket.com/albums/w495/jamestkirk1864/6137e1c4-005a-4dfd-9160-de7a5e24d5ef_zpse7c035ec.jpg

I have resistors just tell me what I need...
The Arduino is a Nano V 3.0 ATmega 328 5v-12v
The LED's Forward Voltage 2v Forward Current is 20mA...
I'm not new to this but I don't know a whole lot...
Ask me to wire a house or build a computer i'm on it...
So please tell me what you would like me to do...
Thanks
Michael

PaulRB

OK Michael, here's how I suggest you wire the "X"  of 4 leds. Use any digital Arduino pin for now.

The resistors shown were calculated like this:

We will have 5V across 2 leds in series, plus a resistor. Each led drops 2V, leaving 1V to be dropped by the resistor.

We want 20mA to flow through the pair of leds and the resistor, so by Ohm's law R = V / I = 1 / 0.02 = 50 Ohms.

Nearest common resistor value (above, for safety) would be 56R.

C-F-K


Hello all
I have recently acquired a Klingon Proton Collector or Power Leech...
I would like to add electronics to make it just like it was in the movie...

Any help would be greatly appreciate it...
Thanks
Michael


First of all: Awesome!

Second: You want the LED's and the sound, but how do you want to controll the "proton mode"?
Just a hidden switch on the back (Easy) or the already mentioned thermistor (Little harder for a starter)? Even wireless is an option but first try to make it work the easy way and then work your way up!

We can suggest it all, but what do YOU want/think/need/desire?

We can help you with advice or suggestions, but don't forget that you will have to do some work on your own (But us already-addicts think thats most of the fun!)
Evil Base of Operations: Holland

PaulRB

Michael, I'm having second thoughts about my suggested circuit. The problem is, if running on batteries, e.g. 3 x AAA, the voltage will be lower than 5V and will drop further still as the batteries drain. With the 2 leds in series, when the voltage drops below 4V, the leds may refuse to light up at all.

So I think connecting the leds in parallel would be wiser after all. See updated diagram. I have re-calculated the series resistors. As the leds are now in parallel, we can only afford to allow 10mA through each, to avoid overloading the Arduino pins. This should still be plenty bright enough. As only one led, plus its series resistor, will be dropping 5V, the resistor must now drop 3V.

R = V / I = 3 / 0.01 = 300 Ohms. Nearest common value is 330R.

jameskirk

Is it possible to use a 9v battery???
Would that be easier or harder???
Also the thought of the hall sensor would be cool...
Thanks
Michael

PaulRB

A 9V battery would be easy enough while using the Nano. It has a built-in regulator. You would connect the battery to the Vin/RAW. Battery life will not be very good. 9V batteries do not have a large capacity, and the regulator will waste four ninths of that energy. With AA/AAA cells, you would bypass the regulator by connecting them to the Vcc/5V pin. Its important not to exceed 5.5V when bypassing the regulator, or the Arduino could be damaged. For example 4 non-rechargeable AA/AAA would be 6V, too much, whereas 4 rechargeable would be less than 5.5V even when freshly charged.

Using the tiny85 would be more difficult with a 9V battery. You would have to add a regulator to your circuit. This could be as simple as a 78L05 regulator (3 pins) and a couple of caps. But, as mentioned, four ninths of the battery's energy gets wasted.

jameskirk

I just want you to check this out before I hook it up...

Thanks
Michael

PaulRB

#23
Aug 21, 2014, 08:36 am Last Edit: Aug 21, 2014, 09:03 am by PaulRB Reason: 1
Sorry Michael, from that angle and with all those flying leads, I can't really tell what's connected to what. If you use short straight leads flat to the breadboard and take the picture from directly above, I might have a chance.

Having said that, looking at the 2 leds nearest the camera, I think it looks right as far as I can tell. If the other 2 are the same, you should be reasonably safe to connect up.

Here's an example of how I like to work on breadboard. Its a much more complicated circuit but I hope you get what I mean.

http://forum.arduino.cc/index.php?topic=188135.msg1392372#msg1392372

Have you got the Arduino software installed yet and uploaded a sketch? You shold be able to use the "blink" sketch from the examples menu to test your 4 leds. Just change the pin number in the sketch to match the one you have connected on the breadboard.

jameskirk

#24
Aug 22, 2014, 12:08 am Last Edit: Aug 22, 2014, 12:26 am by jameskirk Reason: 1
Here is some more pic's...
Hope these help...







Thanks
Michael

PaulRB

That was more than enough pics!

Ok, the leds look ok. The power connections from the Nano need fixing. Use the 5V pin, not Vin. Use the GND pin on that same side of the Nano, or if you prefer, both GND pins. Have another look at my pic on that link.

The common practice is to use black wire for GND, red for +V, and other colours for other signals.

jameskirk

Can you help me out with the sketch???
I don't know how to even start one...
Thanks
Michael

PaulRB

Like I said before:

You shold be able to use the "blink" sketch from the examples menu to test your 4 leds. Just change the pin number in the sketch to match the one you have connected on the breadboard.

jameskirk

#28
Aug 24, 2014, 03:36 am Last Edit: Aug 24, 2014, 03:38 am by jameskirk Reason: 1
OK I got it up and running...
I have 1 problem tho...
I hooked everything up to your diagram but I couldn't get it to run only the first LED would only light up so
I had to use 2 Pins D3 and D4...
I have 2 sketch's that will run now Slow and Fast...
Here is the links...
Slow
http://vid1078.photobucket.com/albums/w495/jamestkirk1864/20140823_210609_zpslghn2fbj.mp4
Fast
http://vid1078.photobucket.com/albums/w495/jamestkirk1864/20140823_210712_zpsdqv6g8m0.mp4

Here is a pic of the new layout...

Thanks
Michael

PaulRB

Good work Michael!

But it should have worked fine with just one digital pin. If I get time later I will set it up on my breadboard to show you. You do know leds only work if plugged in the right way around?

What next? Do you have a pot (potentiometer/trimmer/variable resistor)? You could wire that up to an analog input as a temporary replacement for the hall sensor/thermistor and use it to vary the flashing speed.

Go Up