Difference between revisions of "Component: Solenoid DC (Mechatronics)"

From Flowcode Help
Jump to navigationJump to search
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Solenoid_DC.fcfx FC_Comp_Source_Solenoid_DC.fcfx]
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/Solenoid_DC.fcfx FC_Comp_Source_temp/Solenoid_DC.fcfx]
  
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Solenoid_DC.fcfx FC_Comp_Source_Solenoid_DC.fcfx]
+
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/Solenoid_DC.fcfx FC_Comp_Source_temp/Solenoid_DC.fcfx]
  
 
==Detailed description==
 
==Detailed description==
Line 66: Line 66:
  
 
If the solenoid requires a large DC voltage, say 12V then you can connect the 12V directly to the top of the solenoid as shown above rather than using VCC or VDD. The transistor / FET will protect the micro from the large Voltage.
 
If the solenoid requires a large DC voltage, say 12V then you can connect the 12V directly to the top of the solenoid as shown above rather than using VCC or VDD. The transistor / FET will protect the micro from the large Voltage.
 +
 +
  
  
Line 73: Line 75:
 
==Macro reference==
 
==Macro reference==
  
===SetTarget===
+
===SetState===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTarget'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetState'''
 
|-
 
|-
| colspan="2" | Choose an extermal object to move along with the solenoid's actuator 
+
| colspan="2" | Trun the solenoid on or off using a boolean value. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Object
+
| width="90%" | State
 
|-
 
|-
| colspan="2" | An object to be moved by the solenoid 
+
| colspan="2" | The new state for the solenoid to take. 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 92: Line 94:
  
  
===TurnOn===
+
===SetTarget===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TurnOn'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTarget'''
 +
|-
 +
| colspan="2" | Choose an extermal object to move along with the solenoid's actuator 
 +
|-
 
|-
 
|-
| colspan="2" | Activate the solenoid 
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Object
 
|-
 
|-
 +
| colspan="2" | An object to be moved by the solenoid 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 106: Line 113:
  
  
===SetState===
+
===TurnOff===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetState'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TurnOff'''
 
|-
 
|-
| colspan="2" | Trun the solenoid on or off using a boolean value. 
+
| colspan="2" | De-activate the solenoid 
 
|-
 
|-
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="90%" | State
 
|-
 
| colspan="2" | The new state for the solenoid to take. 
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 125: Line 127:
  
  
===TurnOff===
+
===TurnOn===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TurnOff'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TurnOn'''
 
|-
 
|-
| colspan="2" | De-activate the solenoid 
+
| colspan="2" | Activate the solenoid 
 
|-
 
|-
 
|-
 
|-

Revision as of 12:03, 3 February 2023

Author Matrix Ltd
Version 1.2
Category Mechatronics


Solenoid DC component

Simple open frame solenoid based on the Benson BDC.4 series.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_temp/Solenoid_DC.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_temp/Solenoid_DC.fcfx

Detailed description

No detailed description exists yet for this component

Examples

A solenoid will likely require more current than a microcontroller device can supply to activate the mechanical mechanism.

To amplify the current from the microcontroller simply use a NPN transistor or N channel FET.

The diode is required as with any inductive loads to help protect the microcontroller from back EMF generated by the inductor as the control signal switches the current through the inductor on and off

Solenoid.jpg


If the solenoid requires a large DC voltage, say 12V then you can connect the 12V directly to the top of the solenoid as shown above rather than using VCC or VDD. The transistor / FET will protect the micro from the large Voltage.




Macro reference

SetState

Fc9-comp-macro.png SetState
Trun the solenoid on or off using a boolean value. 
Fc9-bool-icon.png - BOOL State
The new state for the solenoid to take. 
Fc9-void-icon.png - VOID Return


SetTarget

Fc9-comp-macro.png SetTarget
Choose an extermal object to move along with the solenoid's actuator 
Fc9-h32-icon.png - HANDLE Object
An object to be moved by the solenoid 
Fc9-void-icon.png - VOID Return


TurnOff

Fc9-comp-macro.png TurnOff
De-activate the solenoid 
Fc9-void-icon.png - VOID Return


TurnOn

Fc9-comp-macro.png TurnOn
Activate the solenoid 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connection
Fc9-type-5-icon.png Pin
Chip pin to connect the solenoid circuit to. NB) Solenoid cannot be moved unless there is a valid connection.