Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Getting 12 MHz with ulno2803

Status
Not open for further replies.

tictac

Full Member level 5
Joined
Oct 22, 2006
Messages
297
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
Polland
Activity points
3,572
Can I get frequency about 12 Mhz with uln2803?
ledX8 is connected to the output of uln2803. and there is one mega32 with 16mhz crystal. I want to work with these led with 12 Mhz.can I get this frequency with uln2803?

regards
 

Re: uln2803 frequency

The ULN2803 has a datasheet. Although it doesn't contain much AC data, it clearly answers the question by listing a typical turn
on/turn off delay of 0.25 us. The device can't work at 12 MHz. I wonder what's the purpose of switching a LED at 12 MHz?
Only fast IR LEDs can fully transmit this frequency (with a suitable driver).
 

    tictac

    Points: 2
    Helpful Answer Positive Rating
uln2803 frequency

hi FvM
I want to make one propeller clock with 32 high bright LED(3.2v , 10 mA) . and the speed of the motor is about 4000 rpm. at first I want to show picture with it and then show animation.
I have one uln2803 and four 74hc573 that connect to 32 leds. does it has enough speed for showing picture with 4000 rpm? can I use eight of npn transistor(bd139) instead of uln2803 ? can I turn on 8 led(10 mA*8=80 mA)with 74hc573 ?

regards
 

Re: uln2803 frequency

Than 12 MHz specification is completely wrong. The required frequency is in the 100 kHz range at maximum.

Please calculate the required time resolution according to the intended angular resolution, that hasn't been mentioned yet.
4000 RPM means 66.7 Hz rotation frequency. So if you intend to display 1000 points on a full circle, the bit rate per LED
would be 66.7 kHz.
 

    tictac

    Points: 2
    Helpful Answer Positive Rating
Re: uln2803 frequency

I don't think you will need to use frequencies anywhere near 12MHz, in fact one cycle at 12MHz is probably equivalent to less than the diameter of the LED. The clock frequency of the processor isn't the important factor, it's how fast you send signals out on the port pins that matters and that's largely dependent on your software.

Don't forget 4000 RPM is only 66.67 rotations per second which is relatively slow in electronics terms.

You should be able to use a ULN2803 but transistors would work equally well. The 2803 is only an array of small power transistors in a convenient package. If anything causes problems it is likely to be the 74HC573 which isn't really intended to be a power driver.

Brian.
 

    tictac

    Points: 2
    Helpful Answer Positive Rating
Re: uln2803 frequency

ULN2803
Pin2=Low then Pin17=Low .
but
Pin1=High and Pin18=low why?

I want one led turns on and another turns off. but it doesnt work

regards
 

Re: uln2803 frequency

Oops - that's completely wrong !

The ULN2803 is a power driver, the LS573 can only supply a few mA. You have them wired so the 'big' driver feds the 'small' driver which feeds the 'big' load.

I suspect you want to multiplex the LEDs so you connect it so eight LEDs have their anodes connected to the 8 outputs on one LS573 and all their cathodes are joined and connected to one output of the ULN2803. You repeat this for the next 8 LEDs but use a different output on the 2803.

For 32 LEDs your processor should have four outputs to the 2803 and 8 outputs to the 573. You load the data into the 573, latch it then turn the appropriate outout of the 2803 on to light that group of 8 LEDs. I'm not sure this is actually going to work as you intend, you might have to use more than one 573 and possibly more than one 2803 as well. If you multiplex in groups in a propeller clock you might get a checkerboard display because not all LED groups can be on at a time.

I suggest you try using four 573's, one for each group of 8 LEDs and connect their outputs to four 2803's that way you can run all the LEDs simultaneously. Connect the LED anodes together and to the positive supply, you will have to fit a resistor in series with each LED to limit their current.

Brian.

Incidentally, you missed the ground off the ULN2803. for this application you can leave the COM pin unconnected - it is only needed for inductive loads.
 

    tictac

    Points: 2
    Helpful Answer Positive Rating
Re: uln2803 frequency

I connect one pull up resistor to the input of 74hc573 and it works.

I calculate the speed of switching. is it true?
4000 turn per 60 seconds. so 1 turn in 15 ms.
32 led * 3 mm(the width of each led)=10 cm
2*3.14*10 cm=62.8 cm
62.8/3mm =210
15 ms/210=71 uS = the minimum time is needed for led's turn on or off at 1/210 each rotate .

so I think unl2803 is good for this speed? is it true? can you improve my calculation?
 

Re: uln2803 frequency

Hi betwixt
I change the circuit . I attach it. I think it works. if we consider all 32 leds turn on, so 32*10 mA=320 mA and uln2803 can provide this. is it true? do you have better idea?

and thanks you FvM. you help me a lot.
regards
 

Re: uln2803 frequency

I test it with proteus. but leds have low light. when I remove uln2803 and connect resistors to GND ,the light get brighter. what can I do?

Added after 6 minutes:

its my new test. topper leds are brighter and another have low light.
 

Re: uln2803 frequency

In the last design the ULN2803 is permanently turned on anyway so you should just connect the LEDs to ground as you suggested.

I have meetings to attend today but I will return with more information later.

Brian.
 

    tictac

    Points: 2
    Helpful Answer Positive Rating
uln2803 frequency

You should use one ULN2803 with each 573 and connect the LEDS on the ULN outputs, each with a series resistor.
HC573 can't provide sufficient current for the intended application.
 

    tictac

    Points: 2
    Helpful Answer Positive Rating
Re: uln2803 frequency

I attach new schematic. is it true?
 

uln2803 frequency

with one 16 Mhz crystal with mega32 I write this code to get one square wave.

while (1)
{
PORTD.3=1;
PORTD.3=0;

};
but I can get only 2.2 Mhz. why?

regards
 

Re: uln2803 frequency

Your last schematic is correct but check the ground pin on the 2803 really is grounded. As this device does not have a supply pin, check your CAD package is not ignoring the ground connection as well.

As for the clock speed, I'm no expert on the AVR range but if they use more than one clock cycle per instruction that would account for some of the delay but also note that the code for the while() loop has to be executed on each pass as well. Generally speaking, C compilers do not produce code that runs as fast as assembly language so you might have to program in assembly instead.

Brian.
 

    tictac

    Points: 2
    Helpful Answer Positive Rating
Re: uln2803 frequency

I write this code for mega32 with assembly code. but the frequency = 4 Mhz .

ON time=0.1 us
OFF time=0.15 us ( it consist rjmp instruction)
so T=0.25 us ------> Frequency=4 Mhz
why?

I use two capacitor=33pf for 16Mhz crystal


.include "m32def.inc"

.ORG 0X00
JMP RESET
.ORG 0X2A
RESET:
LDI R16,HIGH(0X45F)
OUT SPH,R16
LDI R16,LOW(0X45F)
OUT SPL,R16

LDI R16,0XFF
OUT DDRC,R16
ldi r16,0xff
ldi r17, 0x0
LOOP:
out PORTC,r16
out PORTC,r17

RJMP LOOP
 

Re: uln2803 frequency

I can get only 2.2 Mhz. why?
AVR uses one cycle per instruction, but setting a port are two instructions, plus 3 cycles for the while loop are 7 cycles = 2.28 MHz.
Or something like this ..., check the compiler listing to learn the details.
 

    tictac

    Points: 2
    Helpful Answer Positive Rating
uln2803 frequency

how can I improve it? can I use timers to do it better?
 

uln2803 frequency

You didn't tell, what you exactly want to achieve. But you should be able to generate a 4 MHz square wave on an OC pin.
 

    tictac

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top