Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

PCF8574 - CNY70 -

3 posters

Go down  Message [Page 1 of 1]

1PCF8574 - CNY70 -  Empty PCF8574 - CNY70 - Sun May 28, 2023 7:21 am

seen024

seen024

Hello,

is it possible to have in SimulIDE:

the PCF8574 Remote 8-Bit I/O Expander for I2C Bus?
https://www.ti.com/general/docs/suppproductinfo.tsp?distId=26&gotoUrl=https://www.ti.com/lit/gpn/pcf8574

the photocoupler CNY70?  
https://www.tme.eu/Document/5c845fc67f29d9b4e8f31810ed773b0f/cny70.pdf

the GP2Y0A41SK0F Distance Measuring Sensor Unit? https://www.tme.eu/Document/f9713867366250fc6fa43f81eb3043a2/GP2Y0A41SK0F.PDF

Regards,

Enzo

2PCF8574 - CNY70 -  Empty Re: PCF8574 - CNY70 - Sun May 28, 2023 11:49 am

arcachofo

arcachofo

There is no plan to add more specific components like these, only generic ones.
Users can create new components with subcircuits or in the development version with scripts.

the PCF8574 Remote 8-Bit I/O Expander for I2C Bus?
There is an I2C to Parallel component in Logic/Conventers.
I think it is more or less the same thing.

the photocoupler CNY70?
I think this one can be done in a subcircuit with a diode to simulate the input load and a transistor to simulate the output.
And maybe a switch to activate/deactivate the output.

the GP2Y0A41SK0F Distance Measuring Sensor Unit?
This one is just a variable voltage.
To be able to provide a distance and get the distance to voltage curve would be more complicated, but probably could be done with a Function Component in 1.0.0 or better with an script in development version.

seen024 likes this post

3PCF8574 - CNY70 -  Empty Re: PCF8574 - CNY70 - Sun May 28, 2023 3:54 pm

Defran

Defran



The raison to be of the optocoupler is the isolation between the LED and the transistor and as you say I don't see how the LED can activate the transistor while maintaining the isolation. You need to create this component.

4PCF8574 - CNY70 -  Empty Re: PCF8574 - CNY70 - Sun May 28, 2023 4:53 pm

arcachofo

arcachofo

The raison to be of the optocoupler is the isolation between the LED and the transistor and as you say I don't see how the LED can activate the transistor while maintaining the isolation. You need to create this component.
CNY70 is a reflective sensor to detect the presence of objects in front of the sensor.
Electric isolation is irrelevant in this case.

5PCF8574 - CNY70 -  Empty Re: PCF8574 - CNY70 - Mon May 29, 2023 1:11 am

Defran

Defran

Yes, You are right, it was a mistake; but it's a good opportunity to claim the optocoupler, which is so useful and I don't think its development is very complicated.

Thanks in advance.

6PCF8574 - CNY70 -  Empty Re: PCF8574 - CNY70 - Mon May 29, 2023 1:45 pm

seen024

seen024

the GP2Y0A41SK0F Distance Measuring Sensor Unit?

This one is just a variable voltage.
To be able to provide a distance and get the distance to voltage curve would be more complicated, but probably could be done with a Function Component in 1.0.0 or better with an script in development version.

Where can I find information (tutorial) about the development version and script writing?

7PCF8574 - CNY70 -  Empty Re: PCF8574 - CNY70 - Mon May 29, 2023 5:14 pm

arcachofo

arcachofo

There are no tutorials yet for Scripted Components.

There are a few things to learn, but you can start playing with the example attached:
It is a simple scripted component that can be used as a base for PCF8574.
The idea is to get an input voltage that represents a distance and generate an output voltage.

To install this component:
- Put the folder "my_components" anywhere you want.
- Open Simulide and select that folder as "User data folder" is Settings/App.
- Close Simulide, open it again and you will see the new component in section "Scripted".
- Now you can open the script PCF8547.as in the Editor, modify it and test the changes.

Here is a short video showing all the proccess:



The procedure to create these components is similar to subcircuits, but instead of a circuit you use an script.
Here is a tutorial for Subcircuits:
https://www.simulide.com/p/new-subcircuits.html

The script language is based on the syntax of C++ :
https://www.angelcode.com/angelscript/sdk/docs/manual/doc_overview.html
Attachments
PCF8574 - CNY70 -  Attachmentmy_components.zip
You don't have permission to download attachments.
(3 Kb) Downloaded 6 times

seen024 likes this post

8PCF8574 - CNY70 -  Empty Re: PCF8574 - CNY70 - Tue May 30, 2023 2:13 pm

arcachofo

arcachofo

Sorry I used the name PCF8574, but it should be GP2Y0A41SK0F.

seen024 likes this post

9PCF8574 - CNY70 -  Empty Re: PCF8574 - CNY70 - Tue May 30, 2023 3:27 pm

seen024

seen024

Thank you for all this very useful information!
Enzo

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum