Home     Company     Products     Services     Community     Download     Store
    [Home arrow Community arrow Forum ]
Community
Community
Login Form





Lost Password?
No account yet? Register
Evidence Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Flex+Scicos+Erika !!! (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Flex+Scicos+Erika !!!
#90
desmomito (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Re:Flex+Scicos+Erika !!! 6 Months ago Karma: 0  
What about this scheme to connect the LED of the optocoupler ?
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/05/21 00:10 By desmomito.
  The administrator has disabled public write access.
#91
francesco (User)
Moderator
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Pisa Birthdate: 1976-11-24
Re:Flex+Scicos+Erika !!! 6 Months ago Karma: 0  
You can not drive directly the diode of the optocoupler. You will need to add a transistor, BJT or MOS. The current on the led has to be 10mA but with the dsPIC you can drain maximum 4mA.

Try to match the resistance values on the _base_ and the collector (maybe on a bread board). On the BJT transistor do not use less than 1KOhm.

Another important point is the PWM frequency. Depending on the frequency, you have to use fast optocouplers and fast transistors.

Ciao,

Francesco.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#93
desmomito (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Re:Flex+Scicos+Erika !!! 6 Months ago Karma: 0  
OK,
thank you very much but if you see the figure I've posted the current drains from the 3.3V. If the PWM is High = 3.3V the diode if OFF instead if the PWM is Low = 0V the diode is ON and the current drains from the 3.3V power supply into the dsPIC. The current is maximum 16mA in order to not destroy the dsPIC port. Is it wrong what I'm trying to explain ? Do you thinj is dangerous ?
It's just a solution to avoid devices from the dsPIC to the optocoupler because I'll have a fast PWM (I've choosen a fast optocoupler).

Thank you,
Pasquale.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#95
francesco (User)
Moderator
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Pisa Birthdate: 1976-11-24
Re:Flex+Scicos+Erika !!! 6 Months ago Karma: 0  
So you want an active low PWM? I mean, when the PWM is high you want that the diode is in off state and when the PWM is low you want that the diode is emitting.

Unfortunately you can not drive directly the diode from the dsPIC. This is dangerous because the maximum current that you can source or drain from a dsPIC pin is 4mA.

Check the fet transistor at
http://it.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=6362821

This fast enough (I think).J175 p channel. In this case when the Vgs is high (3.3V) the transistor is off.

Francesco.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#96
desmomito (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Re:Flex+Scicos+Erika !!! 6 Months ago Karma: 0  


So you want an active low PWM? I mean, when the PWM is high you want that the diode is in off state and when the PWM is low you want that the diode is emitting.

Correct. But if you see tha figure now you'll understand why. Let me explain : PWM = 3.3V = ON, the left led if OFF so the right led is OFF and the Vout (after the optocoupler) is ON = 5V; PWM = 0V = OFF, the left led if ON so the right led is ON and the Vout (after the optocoupler) is OFF = 0V. This configuration let me have the same PWM generated with the dsPIC after the optocoupler but with different voltage. Using your configuration I'll have a different PWM after the optocoupler (negate one). What do you think about that ? How did you manage when you solved this problems ?

Unfortunately you can not drive directly the diode from the dsPIC. This is dangerous because the maximum current that you can source or drain from a dsPIC pin is 4mA.

I thoght was 25mA, but I'm wrong than I'll change configuration.

This fast enough (I think).J175 p channel. In this case when the Vgs is high (3.3V) the transistor is off.

I'll check.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#97
francesco (User)
Moderator
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Pisa Birthdate: 1976-11-24
Re:Flex+Scicos+Erika !!! 6 Months ago Karma: 0  
Ok, with a p-channel fet you will obtain extactly what you want. In the diagram with the bjt you can substitute the bjt with the p-channel fet (with a lowest resistance). In this case when the PWM is high the fet is like an open circuit and the optocoupler led will be off, the optocoupler output will be +5V. When the gate voltage is 0V, the optocoupler diode will be on (the fet is like a short circuit) and the optocoupler output will be at 0V
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
Evidence S.r.l. - PIVA: 01638690501
Via Carducci 64/A - Ghezzano - Pisa - Italy
Privacy Policy