November 22, 2024, 03:00:48 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


High-Curent Add-On

Started by JonnyMac, October 29, 2008, 12:09:14 PM

Previous topic - Next topic

JonnyMac

My good friend Peter (www.socalhalloween.com) is building a ghost train this year (that is exploding from the front of his house!) and yesterday he asked if I could build a few controls for the display that don't need to be part of his big animation system.  On the front of the train will be a flickering headlight.  Peter uses an old car headlight and guess what?  That dude takes a whole lot of current -- way too much for the ULN2x03.

I popped over to the local RadioShack and picked up the parts to build this circuit:



Parts:
  * TIP-120 Darlington (RS 276-2068)
  * 470-ohm resistor (RS 271-1317)
  * terminal block (RS 276-1388)
  * perf board (RS 276-148)

The perf board has copper pads on the bottom which make point-to-point wiring very easy.  After I tested the board with the actual headlight I protected the solder connections with a layer of hot glue (gotta love hot glue!).

The only part not available at RadioShack is the female crimp-pin connector; I get these from Mouser.com (538-16-02-0103) and always keep them on hand.  If you're not building a lot of custom cables then the easiest thing for you to do is hack one of our 14" extender cables -- just use the white wire.

Here are a couple pics of the device:





Jon McPhalen
EFX-TEK Hollywood Office

livinlowe

Jon-
I assume the headlight doesn't require more than 1 amp of current right?
Shawn
Scaring someone with a prop you built -- priceless!

JonnyMac

October 29, 2008, 12:19:45 PM #2 Last Edit: October 29, 2008, 12:26:01 PM by JonnyMac
And -- in case you're interested -- this is the program we're using to flicker the lamp; this keeps things on the dim end as Peter wants it to look like power is bad.

' =========================================================================
'
'   File...... Flickering_Headlight.BS1
'   Purpose... for Peter Montgomery's Halloween Train
'   Author.... Jon Williams, EFX-TEK
'              Copyright (c) 2008 EFX-TEK
'              Some Rights Reserved
'              -- see http://creativecommons.org/licenses/by/3.0/
'   E-mail.... jwilliams@efx-tek.com
'   Started...
'   Updated... 29 OCT 2008
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Lamp            = 0


' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high in/out
SYMBOL  IsOff           = 0

SYMBOL  Yes             = 1
SYMBOL  No              = 0


' -----[ Variables ]-------------------------------------------------------

SYMBOL  level           = B2
SYMBOL  cycles          = B3

SYMBOL  lottery         = W5


' -----[ Initialization ]--------------------------------------------------

Reset:
 PINS = %00000000                              ' clear all
 DIRS = %00000001                              ' set outputs


' -----[ Program Code ]----------------------------------------------------

Main:
 RANDOM lottery
 level = lottery // 77 + 13                    ' 13 (5%) to 89 (35%)
 RANDOM lottery
 cycles = lottery // 16 + 10                   ' 50 to 125 ms
 PWM Lamp, level, cycles
 GOTO Main


' -----[ Subroutines ]-----------------------------------------------------


' -------------------------------------------------------------------------


' -----[ User Data ]-------------------------------------------------------
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

The TIP120 can handle 5 amps so we can give the lamp as much as we want.  That said, you can see by the program above that we're PWMing on the dim end of things which means we're able to run from one of our wal-warts without any problems.

Quote from: livinlowe on October 29, 2008, 12:18:48 PM
Jon-
I assume the headlight doesn't require more than 1 amp of current right?
Jon McPhalen
EFX-TEK Hollywood Office

livinlowe

Oh, well, I was just thinking about the regulator on the Prop-1. But, ya thinking about it, you probably aren't higher than 1 amp with the PWM.
Shawn
Scaring someone with a prop you built -- priceless!

JonnyMac

I don't know why I didn't respond to this last year...

The Prop-1 regulator does not really come into play with this circuit because it's switching 12v (which could be external); the only current from the regulator is about 6m to switch the TIP-120 from the Px output.
Jon McPhalen
EFX-TEK Hollywood Office