element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Controlling 12V Solenoid using Piface
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 30 replies
  • Subscribers 678 subscribers
  • Views 3486 views
  • Users 0 members are here
  • pi
  • circuit
  • raspberry_pi
  • piface
  • solenoid
Related

Controlling 12V Solenoid using Piface

Former Member
Former Member over 11 years ago

I have 12V Solenoid(Makeblock DC Frame Type Solenoid HCNE1-0530) and I want to control it using Piface, can this be done entirely using Piface ? or additional component will be require ?. circuit arrangement will be helpful

  • Sign in to reply
  • Cancel
Parents
  • D_Hersey
    0 D_Hersey over 11 years ago

    NVM, still can't dl images.

     

    I would use a TLP351 logic optocoupler for my first stage.  Output is CMOS push-pull totem pole.  This is how I would get from logic voltage to solenoid voltage.

     

    I would follow with a complementary-symmetry bipolar stage.  NPN pull up, PNP pull down, bases bussed and connected to the output of the optocoupler.  Emmiters bussed and connected to the load, far side of load to (solenoid)V-.  Collectors go to respective sides of the solenoid supply.  NPN energizes coil, PNP catches spikes.

     

    I would simulate the stuffing out of this using SPICE before I attempted to assemble this, for you have little reason to trust me, or authority (not that I represent authority) generally.  Try and measure the inductance of your coil so you can input it to SPICE.

     

    Use Qs rated for at least a coupla amperes, we like to employ design-margin, esp. in one-offs.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to D_Hersey

    what is SPICE ?

    also I bought MOSFET Power Control Kit(https://www.sparkfun.com/products/10256) and successfully able to operate solenoid using piface digital output pin. but it is overheating now :-(

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rew
    0 rew over 11 years ago in reply to Former Member

    The solenoid is specified to have  a resistance of 27 ohms. That results in 0.45A of current. That should come to about 5.4W.

     

    It should get noticably warm with that. I'm not sure if the solenoid is specified to be "continuously on", or if it is meant to be on for only short periods. Does it really overheat (and break?) , or is it just that you find that it is getting too hot to touch?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to rew

    I did not run it until it breaks, but it is getting too hot to touch. also I notice that piface Pin LED slightly remain lit up even after supplying signal zero.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 11 years ago in reply to Former Member

    if your leaving the solenoid energized then it will be drawing 500mA at 12V meaning 6W of heat dissipation

     

    if it is excessively hot then I would suspect it is not 12V 500mA or requiring a lower holding voltage as described above

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 11 years ago in reply to Former Member

    Any chance you can post a link or similar to the solenoid.

    Many require the plunger to be in to reduce the energy loss, some are AC, some are DC and they aren't the same.

     

    The other thing to try is   .... connect it across 12v and does it get hot after 10-30 secs.

     

    If it does then it isn't designed for continuous operation and you need to be able to reduce the current.

     

     

    mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rew
    0 rew over 11 years ago in reply to mcb1

    The link to the solenoid is in the opening post. Makeblock DC Frame Type Solenoid HCNE1-0530

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 11 years ago in reply to rew

    sorry I missed that.

    However the link provides a lot of poor translation and the temperature rise is less English and more gibberish.

     

    The reference to ED 25% leads me to believe its not highly rated,

    That is the power can only be applied for 25% of the time but it doesn't give a maximum time.

    so 30 secs ON and 90 secs OFF is 25% duty cycle.

     

    I suspect this is why there is a heating effect noted by the OP..

     

     

    Mark


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rew
    0 rew over 11 years ago in reply to mcb1

    Ah, yes, the ED is probably the max allowable on-time-percentage.

     

    Your "thirty seconds" sounds about right (and on the safe side). So after having it on for (max) 30 seconds, it needs to be off for 90 seconds (or 3 times the time it was on).

     

    Hmm. Doing a power-calculation means that it can dissipate about 25% of the power it produces at 12V. Thus if your application allows it, you might be able to pulse it at 12V to get it to move, and then hold it at 6V....

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 11 years ago in reply to rew

    And at 50g I doubt it will be much use to the OP.

    It may work but there will be some experimenting required ....

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rew
    0 rew over 11 years ago in reply to mcb1

    As the magnetic force drops quadratically, I think it is quite possible that if it provides appropriate force "extended" at 12V, it will also provide enough holding-force at 6V once it is retracted. Chances that the magnetic distance has halved between those situations is probable....

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to rew

    Hi, as promised, please find following circuit diagram.

     

    https://flic.kr/p/oam281

     

    also I have created a small video demonstrating circuit arrangement at http://youtu.be/hWrfdqmy83Y

     

    python code I use to drive solenoid is as follow:

     

    import pifacedigitalio as p
    from time import sleep
    p.init()

    for i in range(0,10):
    p.digital_write(4,0)
    sleep(2)
    p.digital_write(4,1)
    sleep(2)
    print("step")

    p.digital_write(4,0)

     

    as I mention there are two issues:

    1) Solenoid overheating

    2) piface led remain slight lid on completing circuit, you can see in vide at around 00:10

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Former Member
    0 Former Member over 11 years ago in reply to rew

    Hi, as promised, please find following circuit diagram.

     

    https://flic.kr/p/oam281

     

    also I have created a small video demonstrating circuit arrangement at http://youtu.be/hWrfdqmy83Y

     

    python code I use to drive solenoid is as follow:

     

    import pifacedigitalio as p
    from time import sleep
    p.init()

    for i in range(0,10):
    p.digital_write(4,0)
    sleep(2)
    p.digital_write(4,1)
    sleep(2)
    print("step")

    p.digital_write(4,0)

     

    as I mention there are two issues:

    1) Solenoid overheating

    2) piface led remain slight lid on completing circuit, you can see in vide at around 00:10

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube