request - solution/schematic/hex

bertus

Joined Apr 5, 2008
22,277
Hello,

The gate resistors have a to high value.
This will cause a slow rise of the gate voltage, that will cause the heat buildup.
A value between 22 and 100 Ohms might be better.

Bertus
 

Thread Starter

arassel

Joined Nov 1, 2019
15
@bertus thanks for the imput, but as i was telling the guys earlyer, i'm such an electro-savvy i dont understand what you mean .. witch resstor shold i change on the schematic ?

will be using this for a break light setup (progresive leds when breaking) and i really would like to avoid any heat build ups .. i could attach some small aluminum radiators, beside the recommendation you made with the resistor change.
 
Last edited:

jpanhalt

Joined Jan 18, 2008
11,087
Here is modified code with 0.3 second delays. The three register values in order are 0x02,0x86, and 0x98 for LRAM_0x5B, 0x5C, and 0x5D, respectively.
Code:
    processor 12F629
    #include <P12F629.INC>
    __config 0x3194
;   _CPD_OFF & _CP_OFF & _BODEN_OFF & _MCLRE_OFF & _PWRTE_OFF & _WDT_OFF
;   & _INTRC_OSC_NOCLKOUT

; RAM-Variable
LRAM_0x5B equ 0x5B
LRAM_0x5C equ 0x5C
LRAM_0x5D equ 0x5D

; Program

    Org 0x0000

;   Reset-Vector
    GOTO LADR_0x000F

    Org 0x0003

LADR_0x0003
    MOVLW 0x80           ;
;   Interrupt-Vector
    BSF STATUS,RP0       ;|B1
    MOVWF OPTION_REG     ;
    CLRF INTCON          ;
    MOVLW 0x07           ;
    BCF STATUS,RP0       ;|B0
    MOVWF CMCON          ;turn off comparators
    CLRF GPIO            ;
    MOVLW 0x38           ; b'00111000'
    BSF STATUS,RP0       ;|B1
    MOVWF TRISIO         ;
    RETURN
LADR_0x000F
    CALL LADR_0x0003
    BCF STATUS,RP0       ;|B0
    BSF GPIO,0           ;
    MOVLW 0x02
    MOVWF LRAM_0x5B
    MOVLW 0x86
    MOVWF LRAM_0x5C
    MOVLW 0x98
    MOVWF LRAM_0x5D
LADR_0x0018
    DECFSZ LRAM_0x5D,F
    GOTO LADR_0x0018
    DECFSZ LRAM_0x5C,F
    GOTO LADR_0x0018
    DECFSZ LRAM_0x5B,F
    GOTO LADR_0x0018
    NOP
    NOP
    BSF GPIO,1           ;
    MOVLW 0x02
    MOVWF LRAM_0x5B
    MOVLW 0x86
    MOVWF LRAM_0x5C
    MOVLW 0x98
    MOVWF LRAM_0x5D
LADR_0x0027
    DECFSZ LRAM_0x5D,F
    GOTO LADR_0x0027
    DECFSZ LRAM_0x5C,F
    GOTO LADR_0x0027
    DECFSZ LRAM_0x5B,F
    GOTO LADR_0x0027
    NOP
    NOP
    BSF GPIO,2           ;
LADR_0x0030
    GOTO LADR_0x0030

    End
I have attached a hex file; however, I have never really exported a hex file and this looks more different from the original than I expected. Maybe someone can redo it from the Assembly listing.

EDIT: Came back to it after a little rest and compared the LED_BLINK_300.hex file posted with the hex file in the project. The difference is that the posted hex was exported to contain user ID and calibration. Calibration is at the very end of program memory. Re-did the export without user ID and calibration data and got a hex file identical to the one MPLAB produces for the project. Since a new chip will have its own calibration data, if that has not been deleted, you do not need to change it. So, I have uploaded a "new" LED_BLINK_300 and have upload it. I think that may be the one you should use (i.e., LED_BLINK_300new.nex).
 

Attachments

Last edited:

Thread Starter

arassel

Joined Nov 1, 2019
15
Will this be a legal modification in your jurisdiction? Lights on vehicles are generally well regulated by law.
Any lighting modification from manufacturer is illegal, as long as its not tested and certified by an authority witch i plan to do with all the mods i'm trying to do.

First off i'm not removing visibility, actually making my breaks more visible, second the delay is so short its more like aesthetic (mustangs have something similar afaik), i've done a few modifications so far, added sequential turn signals to headlights and mirrors (easy fix witch is already on the market, harder to make it look good also, not just butchered in there) for much more visibility but not too much to bother other traffic participants. tried to make subtle, decent modifications to my taste and design to an old car.

i'd be more than happy to share it with you guys as long as i can achieve and finish what i set in motion so far.

would have never thought i have to go this deep into things i dont know much about as to build a circuit just for my ambition, but here i am, not flinching, going all the way with my customization.
 

MisterBill2

Joined Jan 23, 2018
18,519
Driving the 3 LED assemblies in that sort of sequence is far simpler than looking at a picture of a processor board or connecting a cable to load hex code. It takes one direct connection for the first strip, a FET power transistor and RC time constant to turn on the second strip, and another power FET and RC time constant to switch on the third strip. All of the parts together will cost less than the shipping on that micro board. And no code to go wrong, plus nothing to be bothered by electrical noise. If you have any interest in the simpler approach I will try to find the circuit on one of the circuits sites that I also visit.
 

Thread Starter

arassel

Joined Nov 1, 2019
15
@MisterBill2 yes please, i'd like to try as simple as possible .. the simpler, less thing to fail, burn, wear out faster ..


sooooo .. had a go at the schematic again ... funny story is that with the hex i had ... something very wierd happens .. when i power up the circuit, 1st led strip gets just ~5% power, 2nd and 3rd strip gets ~70% intensity .. after 1 second 2nd led strip turns off, after 1 more second 3rd led strip goes to ~20% intensity ...
 

MisterBill2

Joined Jan 23, 2018
18,519
OK, I looked it up and the link into the website is: Schematics for free.com/archive/files/automotive/circuits/ sequential turn signals-like old mercury cougers had.gif
You do not need to enter in that whole string, just follow it by the choices offered at each point. It is a very interesting site, but it is not a discussion and answers site at all.
I hope it is the circuit you are seeking. And the IC is an CD4528, which is a dual one-shot, aka a multivibrator.
 

jpanhalt

Joined Jan 18, 2008
11,087
@arassel
See edit to post #25. I added a newer hex file, which may be the one you should use. See reason there.

I have no explanation for what you report seeing in post #28. If you have some single LED's, I suggest connecting them directly to the appropriate port pins with a small (100 to 200 Ω resistor in series to test the PIC without any other attachments. In other words, just power supply, PIC (appropriately connected), and LED's.

You did not ask for comments about the circuit and program per se, so I have just focused on 1) Should it work; and 2) Changing the delay. If I were writing the program fresh, there are other changes I might make. Notice that GPIO 3,4,5 (pins 4,3,2) are left as inputs. Of course pin 4 must be an input and is tied to VCC, but pins 2 and 3 are left floating. Since OPTION_REG, bit 7 is set in code, that disables weak pull-ups on those pins and they are floating. That can cause problems. They can be tied to ground.
 

Thread Starter

arassel

Joined Nov 1, 2019
15
@jpanhalt not having proper knowledge for this doesnt alow me to understand how things actually work, i can understand a schematic at a very basic level and following it is the way i thought i might get this done.. the only parts i have are the ones bought for this little project .. i need to buy more resistors. loved the ideea that i can change variables with the pic, but cant seem to get my head around getting that schematic physically work.
 

MisterBill2

Joined Jan 23, 2018
18,519
@MisterBill2 i might need to badger you with some questions ..

what modifications do i have to make to the schematic if i only need the control for those 3 stop lamps ?

can i use irfi9630 instead on irfi9630g ? (the 2nd one is not in stock at the store i'm getting all my parts from)
The good news about the switching FET devices in this application is that they are not at all critical. They must be able to handle the current of the light that you are switching, which with most LED lamps will be less than one amp, and they must be rated for more than the system voltage, which is probably 12 volts. In addition they must be able to turn on fully with that supply voltage. What this tells is that you have a whole lot of choices as to what devices you use. Somebody else may have a suggestion as to what is most suitable.

Now I am wondering about the second part of the question, are you only using a total of three stop lamps? Or are you using three on each side? Would you please clarify that for me.
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
A tongue in cheek comment.
Flash back to another era of my youth!
"Trafficators are semaphore signals which, when operated, protrude from the bodywork of a motor vehicle
to indicate its intention to turn in the direction indicated by the pointing signal.
Trafficators are often located at the door pillar"
Max.

1572726798764.png
 

MisterBill2

Joined Jan 23, 2018
18,519
A tongue in cheek comment.
Flash back to another era of my youth!
"Trafficators are semaphore signals which, when operated, protrude from the bodywork of a motor vehicle
to indicate its intention to turn in the direction indicated by the pointing signal.
Trafficators are often located at the door pillar"
Max.

View attachment 190479
OK, and thanks for the answer. I recall seeing some of those on an abandoned VW probably 50 years or more ago. We were exploring abandoned farmland someplace in rural Virginia. Those were the days, we thought they'd never end. OH yes. those were the days.
 

jpanhalt

Joined Jan 18, 2008
11,087
A tongue in cheek comment.
Flash back to another era of my youth!
"Trafficators are semaphore signals which, when operated, protrude from the bodywork of a motor vehicle
to indicate its intention to turn in the direction indicated by the pointing signal.
Trafficators are often located at the door pillar"
Max.
Thank you. I didn't know either. Sounds like an "automated" duplication of a human process. Historically, they are destined to failure. As does that one seem to have been.
 
Top