DAC Drive Strength

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ScEn_283436
Level 5
Level 5
5 sign-ins First solution authored 100 replies posted

Hello,

   

I'm developing the product program in parallel with the hardware designer. His programs are demo code that test basic functionality. We are using a VDAC8 to drive an LED. The voltage range is 0 - 4V. The demo program can drive a low with a load of 20K pull-up to +4.84V. With my product program, the lowest the output can go is +2V. Looking at the device configuration, they are identical. I've used PSoC Creator 2.0 and the latest 2.2, SP1, components all updated. His is 2.1.

   

My code does change states every 250mS but I have just tried setting the DAC to zero at start up to see if it made a difference.

   

That my code and his code have different device behaviors is a little unsettling in that we could be cruising along with everything working fine, then we go into production and get a batch of devices that work with his code but not mine. Other than setting our 2 computers side by side and checking every configuration and pin assignment, I'm not sure what to do.

   

Nick

0 Likes
13 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

What to watch for:

   
        
  • do you use an output buffer for the VDAC?
  •     
  • To which drive mode is it set?
  •    
0 Likes
ScEn_283436
Level 5
Level 5
5 sign-ins First solution authored 100 replies posted

Hi,

   

No buffer on the PSoC side, goes directly to a pin configured as Analog.

   

Range: 0 - 4.080

   

Speed: Slow

   

Data Source: CPU

   

Strobe mode: Register Write

   

Nick

0 Likes
Anonymous
Not applicable

Are you using the same version of components?

   

Try your software with 2.2 NOT 2.2SP1, see if there is any difference. I did notice some changes between  2.2SP1 and 2.2.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

To Hli's point -

   

 

   

Both output ranges have 255 equal steps. The VDAC8 is implemented by driving the output of
the current DAC through resistors and obtaining a voltage output. Because no buffer is used, any
DC current drawn from the DAC affects the output level. Therefore, in this mode any load
connected to the output should be capacitive. 

   

 

   

The output R of the VDAC -

   

0 Likes
Anonymous
Not applicable

 Nick,

   

Do you use the same hardware just different code from different creator?

0 Likes
Anonymous
Not applicable

 I mean SAME PIECE of hardware. Not same circuitry.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You do not need to compare your both settings to each other, just swap the projects on your boards and you can see any differences in behaveour.

   

I am a little bit confused about your circuitry: you are really driving an LED with the VDAC? I'm not sure what you like to perform with that, but the LED will start at ~1.7V to glow (depending on LED colour) and the drive current the VDAC delivers will not be enough to have any linearity in brightness.

   

Usually you use a PWM-based driver to controll an LED's brightness, like the PRISM usermodule.

   

 

   

Bob

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Look at the table Dana provided. The VDAC has an output resistance of 16K (in the 4V range). This forms a voltage divider with the load your are attaching to the output. When using a 20k load, this basically halves the output voltage - which is exactly what you are observing.

   

So the solution is to add a voltage follower as output buffer. This should reduce the output impedance.

0 Likes
Anonymous
Not applicable
        Nick, just to confirm that you are not using the same hardware as the other hardware enginner. is this correct? I GOT the small text box again!!!!!!!1   
0 Likes
ScEn_283436
Level 5
Level 5
5 sign-ins First solution authored 100 replies posted

We are using the same hardware, swapping the programs. The hardware engineer brought me the board, demonstrated his code, gave me the board, I loaded my code and I get the behavior, so there has to be a reason.

   

My code is compiled in 2.0, then the latest greatest 2.2 SP1. The hardware engineer is in Creator 2.1.

   

The HW engineer did find the statement in the data sheet about that the load should be purely capacitive.

   

It certainly makes sense that I'm making a voltage divider between the 4.84 and ground. Doing the math I see that I would get 2.15V.

   

Thanks for the help.

0 Likes
Anonymous
Not applicable
        Do you mean that the program from the other engineer did not thave the problem, but your software has the problem, And you are using the same hardware and internal hardware of the PSOC. JUST use different creator. If that is the case. Did you try to use the creator he used to build your code and see if that changes?   
0 Likes
Anonymous
Not applicable

 Adding a voltage follower helps...importance of an opamp does not come from any change in voltage, but from the input and output impedances of the op-amp. The input impedance of the op-amp is very high, meaning that the input of the op-amp does not load down the source and draws only minimal current from it.

   

also i have recently used it... the noise level difference reduced to arnd 100mv (i was getn a 1v o/p)!!!!! 

0 Likes
ScEn_283436
Level 5
Level 5
5 sign-ins First solution authored 100 replies posted

H L,

   

I passed your comment on to the hardware engineer. I think it's worth a try and should put the problem into one camp or the other. Just finding the time to fit it in is the only issue.

   

The thing is, the results from my code are as expected per the data sheet. It looks like for some reason, there is no voltage divider in his configuration.

   

Nick

0 Likes