Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help Deriving a Circuit

Status
Not open for further replies.

driftlogic

New Member
Hi all.

Could anyone help me with a schematic from the following DIY video series:

(Part 1) https://www.youtube.com/watch?v=2M0l6tdvFBE

In part 1 he covers populating the board, and the later parts he describes some wiring.

Essentially this project is a police light bar, that uses eight 3W LEDS to flash and is controlled by a PIC unit.

Before anyone brings it up, I have a valid permit in my state (I'm in the USA) that allows me to use emergency lights (of the colors Red/White) for certain situations.

While the quality of the part 1 video is tolerable, parts 2 and on I have difficulty following.
I have sent the user a message but have not heard back. My background is not in CS or ECE so any help would be appreciated. The user does not share the code either for the PIC so that is something I may later have to figure out.

I think a schematic coupled with the videos would be useful to other individuals looking for a similar project. I also am aware that LED flashers and its variations are also discussed on this forum, but the end result this user achieved is really what I'm after. Again any help would be appreciated.

Thank you.
 
Thank you for the suggestions. I think Arduino while powerful is a little too much for the project, while a PIC much cheaper to use. As far as using a counter chip, I'm not too familiar with how to modify that project shown in the video series but I'll keep it in mind. Most discussions I've read say that you can get a better strobe effect when using a microcontroller rather than other alternatives.
 
Last edited:
The video was made years ago. Without the code it is wothless. Find something newer.
 
Last edited:
I'm not sure if it is entirely worthless. While I've tried to find something newer, this is the best I've currently found. Will keep my eyes open though.
 
As a quick aside (and motivated by carbonzit's post), could anyone tell me what modifications would be made to the circuit below to change the LEDs to four 3W White LEDs for one side and four 3W Red LEDS for the other? (like these LEDs **broken link removed**). My understanding is that the circuit below would flash those LEDs three times then alternate.

**broken link removed**
 
Well, for starters you'll need much bigger switch transistors. Those BC547s won't be able to handle 12 watts of LEDs.
 
My understanding is that the circuit below would flash those LEDs three times then alternate.

Don't think so. I think one will 'flicker' while the other is off for about 1.5S. Then switch. The flicker will be about 20 times a second.
 
Last edited:
I basically agree with the author, but I think you get more than 3 flashes. I think the author is a member here, so maybe he'll comment.
 
Some circuits I've come up with over the years.

https://forum.allaboutcircuits.com/showthread.php?t=18182

https://forum.allaboutcircuits.com/showthread.php?t=37409

https://forum.allaboutcircuits.com/showthread.php?t=17499

https://forum.allaboutcircuits.com/showthread.php?t=16484

The 3rd link ought to be interesting, since it is a situation similar to yours.

Side note, I've been made a moderator at All About Circuits. Automotive applications are not allowed over there, so while I might link to some past threads over there I can only discuss this circuit over here (unless the local moderators object).

Flash pattern is the thing, it is the most complex aspect of what you want to do.

The other issue is heat sinking. High power LEDs definitely require somewhere to dump their heat.
 
Last edited:
Very informative posts QuietMan. I appreciate you digging up those threads. From what I'm seeing you have designed numerous circuits that produce flash patterns between LED groups such as this: **broken link removed**

As you know, in my case I have been interested in using just a few 3W LEDs because I figured it would be easier to arrange, having a total of 8 LEDs for example, (4 per side), rather than the 30 in that circuit above. I am certainly open to changing my LED use if it leads to a better design.

In doing my research/searching I've seen so many different circuits that I don't know what's the best approach in terms of simplicity, efficiency, and meeting the design criteria.

If I may I'd also like to get your thoughts also about this circuit:
**broken link removed**
The programmed PIC produces this effect: Link

This is one of the few circuits I've found with a schematic and available source (in this case its compiled, but i think it can be decompiled) that yields a good strobe effect. The example from my original post (pg 1) has a good strobe effect too, but the source is not available.

(Someone from AAC stated the following about that circuit: "Firstly it is not clear why the original designer choose to use emitter followers to drive the LEDs. Secondly there is also doubt why he uses two 10K resistors on a single node at Pin#17 & #18. I think you can use just one 10K instead." )

With the compiled source of the PIC available, do you think this would be suitable to drive the 3W LED pairs, powered from say a cigarette lighter of a car? In my opinion the flash pattern of this example is superior to an alternating flash of (2x, or 3x) one can achieve using 555/4017 chips, but would it be worth it to go this route? Could the PIC even be used to power that many 3W LEDs?

In the end I would be satisfied with the 2x or 3x alternating flasher such as you have designed, but think the more complex strobe pattern would leave something to be desired. Ultimately, I hope to house it in a similar fashion to this:
**broken link removed**

In the meantime I will continue to review the links you have posted. I guess what it really comes down to is either seeing if the microcontroller version from above is possible and modifying it, or choosing a flasher circuit you've designed and modifying that. Either way, I think we are making some progress, and again I thank you for your assistance.
 
Last edited:
... and available source (in this case its compiled, but i think it can be decompiled) ...

In case you don't already know, keep in mind that decompiled code ≠ source code (unless you're some kind of genius who can make sense out of a bunch of machine instructions).
 
Valid point. This was what resulted from decompiling the hex. (means nothing to me)
Code:
goto lbl_1	; lbl_1 = 0x28
lbl_13	clrf 0x23
	movwf 0x22
lbl_4	movlw FF	; d'255' b'11111111' a''
	addwf 0x22,f
	btfss status,c
	addwf 0x23,f
	btfss status,c
	goto lbl_2	; lbl_2 = 0x23
	movlw 3	; d'3' b'11' a'¶'
	movwf 0x21
	movlw DF	; d'223' b'11011111' a''
	call lbl_3	; lbl_3 = 0xF
	goto lbl_4	; lbl_4 = 0x3
	clrf 0x21
lbl_3	addlw E8	; d'232' b'11101000' a''
	movwf 0x20
	comf 0x21,f
	movlw FC	; d'252' b'11111100' a''
	btfss status,c
	goto lbl_5	; lbl_5 = 0x18
lbl_6	addwf 0x20,f
	btfsc status,c
	goto lbl_6	; lbl_6 = 0x15
lbl_5	addwf 0x20,f
	nop
	incfsz 0x21,f
	goto lbl_6
	btfsc 0x20,0
	goto lbl_7	; lbl_7 = 0x1E
lbl_7	btfss 0x20,1
	goto lbl_8	; lbl_8 = 0x22
	nop
	goto lbl_8
lbl_8	return
lbl_2	bcf status,irp
	bcf status,rp0	; switch to bank 0
	bcf status,rp1
	nop
	return
lbl_1	movlw 7	; d'7' b'111' a'¶'
	movwf 0x1F
lbl_10	bcf portb,0
	bcf portb,1
	btfsc porta,0
	goto lbl_9	; lbl_9 = 0x31
	btfsc porta,1
	goto lbl_9
	goto lbl_10	; lbl_10 = 0x2A
lbl_9	bsf porta,0
	clrf 0x27
lbl_17	movlw 4	; d'4' b'100' a'¶'
	subwf 0x27,w
	btfsc status,c
	goto lbl_11	; lbl_11 = 0x5B
	clrf 0x26
lbl_14	movlw 7	; d'7' b'111' a'¶'
	subwf 0x26,w
	btfsc status,c
	goto lbl_12	; lbl_12 = 0x47
	movlw 1	; d'1' b'1' a'¶'
	xorwf portb,f
	bsf status,rp0	; switch to bank 1
	bcf trisb,0
	movlw 32	; d'50' b'110010' a'2'
	bcf status,rp0	; switch to bank 0
	call lbl_13	; lbl_13 = 0x1
	btfss porta,0
	goto lbl_10
	incfsz 0x26,f
	goto lbl_14	; lbl_14 = 0x38
lbl_12	bcf portb,0
	clrf 0x26
lbl_16	movlw 7	; d'7' b'111' a'¶'
	subwf 0x26,w
	btfsc status,c
	goto lbl_15	; lbl_15 = 0x58
	movlw 2	; d'2' b'10' a'¶'
	xorwf portb,f
	bsf status,rp0	; switch to bank 1
	bcf trisb,1
	movlw 32	; d'50' b'110010' a'2'
	bcf status,rp0	; switch to bank 0
	call lbl_13
	btfss porta,0
	goto lbl_10
	incfsz 0x26,f
	goto lbl_16	; lbl_16 = 0x49
lbl_15	bcf portb,1
	incfsz 0x27,f
	goto lbl_17	; lbl_17 = 0x33
lbl_11	clrf 0x28
lbl_23	movlw 7	; d'7' b'111' a'¶'
	subwf 0x28,w
	btfsc status,c
	goto lbl_18	; lbl_18 = 0x84
	clrf 0x26
lbl_20	movlw 2	; d'2' b'10' a'¶'
	subwf 0x26,w
	btfsc status,c
	goto lbl_19	; lbl_19 = 0x70
	movlw 1	; d'1' b'1' a'¶'
	xorwf portb,f
	bsf status,rp0	; switch to bank 1
	bcf trisb,0
	movlw 32	; d'50' b'110010' a'2'
	bcf status,rp0	; switch to bank 0
	call lbl_13
	btfss porta,0
	goto lbl_10
	incfsz 0x26,f
	goto lbl_20	; lbl_20 = 0x61
lbl_19	bcf portb,0
	clrf 0x26
lbl_22	movlw 2	; d'2' b'10' a'¶'
	subwf 0x26,w
	btfsc status,c
	goto lbl_21	; lbl_21 = 0x81
	movlw 2	; d'2' b'10' a'¶'
	xorwf portb,f
	bsf status,rp0	; switch to bank 1
	bcf trisb,1
	movlw 32	; d'50' b'110010' a'2'
	bcf status,rp0	; switch to bank 0
	call lbl_13
	btfss porta,0
	goto lbl_10
	incfsz 0x26,f
	goto lbl_22	; lbl_22 = 0x72
lbl_21	bcf portb,1
	incfsz 0x28,f
	goto lbl_23	; lbl_23 = 0x5C
lbl_18	goto lbl_9
	goto lbl_10
lbl_24	sleep
	goto lbl_24	; lbl_24 = 0x86
ORG 0x2007
	addlw 22	; d'34' b'100010' a'"'
 
The only reason you would want to go with a µC is if you have patterns, and even then you have other options. I don't disagree with using a µC, but I wouldn't be much help with it.

If all you want is simple alternating lights then a variation of the circuit on post #16 would work, but it could be built much simpler and be as reliable. If you want a pattern then you need to decide on that early in the process.

The main thing is the mounts, you must include some way to mount the power LEDs to a heat sink of some kind. This is pretty critical.

One last word on the pattern, I remember reading that drunks tend to try to drive between two alternating lights, causing some spectacular rear end collisions. I strongly suggest some research on your part for this, a couple of extra hours reading could save your car later.
 
The circuit in #7 flashes each LED 3 times. Simply adjust the components until you get the flash-rate you want.
 
I have decided to put the microcontroller path on the backburner.

I would like to learn what modifications would be needed to the circuit from post#16 to produce either a 2x or 3x alternating flash of four 3W LED pairings. Is it possible to have the rate variable- Is that what R2 is doing in the circuit? Also, would it be necessary at this point to pick out the 3W LEDs go get the specifics of the circuit? I'll also look into the issue of heat, and any resources for heat sinks with high power LEDs.

As for your last point, it seems this phenomenon associated with the moth effect and target fixation. It seemed there is some debate if it is a real occurance. Either way, it is certainly something to be aware of.
 
I don't think the circuit in post #16 will work for you. Look at post #18. I think colon is the author of that circuit from post #7. It could work with some modifications. Try making the 2U2 cap about 50U. Those timers aren't synchronized, so it wont' be an exact 3:1. Also may need to beef up the transistor drivers. I've lost track of how much power you want to switch.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top