Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Constant Current Source

I am trying to drive a proportional solenoid valve: PVQ-33-5G-23-01N which responds to currents between 100mA and 165mA. I am using a circuit similar to the one in the attachment below except that I am using the myRIO's DAC in place of the AD5446, the LM324 in place of the OP1177 and the MOSFET 

So the challenge I am having is how to configure the circuit in labview. I am trying to use the default FPGA person ality of myRIO. I am supposed to generate a 1.2V Vref signal into the pin 3 of the LM324. By varying the word that is sent to the LM324, I am supposed to effectively vary the current on the Drain terminal of the mosfet. I have wired the Vref terminal to Connector C/AO0 on the myRIO and I have the VI below but I have no experience sending bits and bytes. I would love to drive the solenoid with about 10 -15 steps of current. Any help would be appreciated.

Thank you!lm324 design.png

 

0 Kudos
Message 1 of 6
(5,511 Views)

Lexicondi,

 

Thanks for the diagram. Based on the myRIO user guide for the mRIO 1900, the AO0 bit resolution is 12 bits, so each bit represents 5 V (the max output of the myRIO) / 2^12 (bit resolution) volts, or 1.2 mV per bit. Based on this, you should be able to write either the decimal or binary equivalent of 1000 (which will equal approximately 1.2V) to the AO0. Here's the link for the myRIO 1900 user guide where I grabbed these specs:

 

http://www.ni.com/pdf/manuals/376047a.pdf

 

Essentially, if you are trying to write 1.2 V to the DAC then you need to write either the decimal or binary equivalent to the FPGA. I hope this helps.

 

You also mentioned you have a VI below but I did not see one attached if you wanted to reply with the example.

 

Regards,

 

BluJae

0 Kudos
Message 2 of 6
(5,486 Views)

Hi BluJae,

 

Thanks for your reply.

 

Please find what I have so far.

 

I am new to using the FPGA personality so I am wondering if this VI is all I need or if I need to write another one for the RT Target.

 

If this is true,can you do me an example in a reply please? Or at least send a PNG file as attachment.

 

Thank you!

0 Kudos
Message 3 of 6
(5,481 Views)

And I was going through the Dpot example in the myRIO userguide and I was thinking the VI might be adaptable to my circuit.

So I made a modification in the number of bits I am writing and here's what I have: (attachment).

 

But I discover I can't guarantee constant current on the output.

I'd appreciate your help.

Thanks!

0 Kudos
Message 4 of 6
(5,474 Views)

Lexicondi, 

 

The code deployed to your RT target is dependent on what type of control you'd like to implement. Pulse width modulation is a common way to control motors. Here's a good example if that's of interest to you.

0 Kudos
Message 5 of 6
(5,426 Views)

Thank you, Haley. I fixed the problem though. Please see this post.

 

~Olalekan O.

0 Kudos
Message 6 of 6
(5,417 Views)