Tuesday 13 January 2015

How to change the range of voltage?


I am doing a project to use dsPIC as controller to output PWM signal to control motors. I can use driver IC (I used L293D actually) to simply let motors to rotate, but I cannot control the voltage range to control the motor to rotate with all range of speed.


The output of dsPIC PWM pins is in the range of 0V~5V, but for motors, the input range is different.


Assume the range is -10V~10V, I want to change the 0~5V output to -10V~10V (0V->-10V, 5V->10V). Is there a good way to achieve this?




Answer



Assumptions:



  • The circuit has +10V and -10V supply rails available

  • Isolation of the dsPIC from the motor power / ground rails is desirable, to prevent back-EMF from frying the dsPIC


The following arrangement would provide arbitrary voltage switching, isolated from the controller side of the circuit:


schematic


simulate this circuit – Schematic created using CircuitLab


This will provide an inverted PWM signal to power the motor.




  • The PWM signal switches the optocoupler's internal LED on and off.

  • This turns the output phototransistor of the optocoupler on and off correspondingly.

  • When the PWM signal is high, the opto's transistor conducts, pulling the MOSFET gate low, and thus it behaves as an open switch.

  • When the PWM signal is low, the opto's transistor does not conduct, so the MOSFET's gate is pulled high, it behaves as a closed switch, allowing current through.

  • The diode across the motor prevents back-EMF from frying the MOSFET.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...