Jump to content

Altering Ultimaker 2 to open/close solenoid valve for bioprinting


Recommended Posts

Posted (edited) · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

Hello,

First of all, I'd like to thank you all, in advance, for all the help I've received just from reading through topics in this community--it has been incredibly helpful.

I manage a bioprinting lab--we work with commercial bioprinters that use pneumatics to extrude viscous biomaterial gels.

We'd like to alter our Ultimaker 2+ Extended in a very specific way--we'd like to add a 10 ml syringe-holding attachment that can extrude our gels in coordination with the Ultimaker's hot end extrusion. I would like to be able to control a solenoid valve with the Ultimaker's electronics--this valve would control the air pressure that drives the gel out of the syringe.

Is the Ultimaker 2's motherboard amenable to this? If so, can you please point me in the right direction to start that alteration? Also, how would I go about changing the firmware/gcode to accommodate this new extruder?

Thank you in advance for any responses!

Edited by Guest
  • Link to post
    Share on other sites

    Posted (edited) · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Maybe a simple option is to use the signal of the fans? Pwm control  in gcode out of the box.  

    The breakout PCB syntax terror is working on will give even separate fan control in dual extrusion setup. (the PCB is part of the magnetic toolchanger beta)

    Another option is to use the signal of the printers led's. Also control able from gcode.

    Edited by SandervG
    • Like 2
    Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Ooh. I feel tagged.

    The short answer is yes, the Ultimaker 2 has plenty of leftover outputs from the microcontroller that can be used to control add-on circuitry.

    The long answer of course is a bit more complex. Do you have a datasheet for the valve you'd like to use? The outputs from the microcontroller on the UM2 main board can't really be expected to actually power anything and I have to assume you're not in the mood to fry anything. So odds are you'll need a driver of some sort to power the solenoid.. unless your part is something with some sort of built in driver. I'm not a valve expert, but solenoids draw power and the microcontroller can't deliver it directly. I'd think it'd need a higher voltage than just 5V too. A driver is almost certainly needed.

    Then there's the firmware. We can hook up all the external circuitry in the world, but without firmware changes it's not going to do a whole lot for us. The UM2 firmware is somewhat foreign territory for me at this point, I simply haven't had the time to get familiar with it. I blame @tinkergnome for always having provided firmware that did all the things on my wish list, plus some things I didn't even know I wanted before. :p

    As @foehnsturm mentioned, we happen to - almost - have a driver PCB add-on ready from his tool changer project. If it wasn't for the Chinese new year throwing a wrench in the production schedule, I'd be happy to send you one. It grabs a couple of leftover microcontroller outputs from a connector on the Ulticontroller PCB, which are then used to switch power via a couple of transistors. One output is 5V, and won't carry a lot of current. The other, however, is 24V and with a FET could realistically be expected to deliver 1A if needed. So quite a bit of oomph there. I see no reason it shouldn't be usable for you, assuming the firmware can be tweaked to suit your purpose.

    • Like 3
    Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Thanks to all three of you for the quick replies!

    ultiarjan, I love the idea of using the LED wire--seems like it would be the simplest option. Unfortunately, as SyntaxTerror mentioned, I think I'm going to need more voltage. I was considering this solenoid. The lower voltage solenoids weren't rated for high enough pressures for what we need (5-40 psi).

    Is there a way to use the signal from the LED wire to send a signal to activate a different 12V power source to open the solenoid? Does that make sense, or am I just getting into nonsenseland? I just really like the idea of using the LED wire so I don't need to mess with electronics or firmware.

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Well the syringe extruder has been done on UMO and UM2 by several companies including this free version from Joris (who is a damn hack genius although he claims he's just an artist):

    http://www.thingiverse.com/thing:12430

    There is a company that sells a very well priced add on to the UM2 - more professional than Joris version. I've seen them at shows but I forget their name.

    These allow you to use the E command (extrude) and so work great with slicers as is. No electronics changing. Joris version uses 3mm filament as a mechanical plunger-pusher. If you are extruding much less material you can use a lever to reduce the "throw range" and increase the precision of extrusion.

    I know this is kind of a hack but it sounds like you don't have electronics experts on your team already and it is a great way to test out the concept without changing any firmware or electronics. You just need to have the mind of a mechanical engineer and print the parts you need (or steal Joris design as is).

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Oh I found it:

    http://www.structur3d.io/

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Thanks to all three of you for the quick replies!

    ultiarjan, I love the idea of using the LED wire--seems like it would be the simplest option.  Unfortunately, as SyntaxTerror mentioned, I think I'm going to need more voltage.  I was considering this solenoid.  The lower voltage solenoids weren't rated for high enough pressures for what we need (5-40 psi).

    Is there a way to use the signal from the LED wire to send a signal to activate a different 12V power source to open the solenoid?  Does that make sense, or am I just getting into nonsenseland?  I just really like the idea of using the LED wire so I don't need to mess with electronics or firmware.

     

    Not an electronics expert, but a SSR (solid state relay like this one ) should do it. At least for on/off switching with limited frequency.

    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    So it's just a manual toggle you're looking for? Not something that integrates with the whole printing environment?

     

    I definitely do want it to integrate with the whole printing environment.  I assumed the LED idea was still fulfilling this requirement.  If I reroute the LED wire to a solid-state relay (thank you foehnsturm!), and then the solid state relay controls the 12v solenoid, then shouldn't opening the gel extruder be as easy as inserting the gcode for "LED ON"?  We work with very small print sizes and layers, so manually inserting this code for now wouldn't be that big of a deal.  I attached a low res workflow image of what I'm thinking.

    5a33272a97616_UltistruderWorkflow.jpg.c02f13c36203b58e4056292ac5283835.jpg

    5a33272a97616_UltistruderWorkflow.jpg.c02f13c36203b58e4056292ac5283835.jpg

    Edited by Guest
    • Like 1
    Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Oh I found it:

    http://www.structur3d.io/

     

    Thanks for this info, gr5!  I've actually come across this already, and while it's definitely the best solution, we are trying to keep this project relatively low-cost (I'd like to keep the first version/attempt under $100 so I can at least show it working first...then it's easier for us to talk the higher-ups into funding it further).

  • Link to post
    Share on other sites

    Posted (edited) · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    I definitely do want it to integrate with the whole printing environment.  I assumed the LED idea was still fulfilling this requirement.  If I reroute the LED wire to a solid-state relay (thank you foehnsturm!), and then the solid state relay controls the 12v solenoid, then shouldn't opening the gel extruder be as easy as inserting the gcode for "LED ON"?  

     

    I thought so. Was just scratching my head a bit when you said you'd rather avoid messing with electronics and firmware :)

    Yes, you can manually edit the gcode to turn the LED's on and off. M42 S0 is off, M42 S255 is on. Anyway, it's certainly doable. You will need a 12VDC source for the relay though, there's no such supply in the Ultimaker.

    Edited by Guest
    • Like 2
    Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting
    5a33272ab9137_UltistruderWorkflow2.jpg.f343de263c662bb3418301b8eff570e4.jpg

    5a33272ab9137_UltistruderWorkflow2.jpg.f343de263c662bb3418301b8eff570e4.jpg

    • Like 2
    Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    5a33272ab9137_UltistruderWorkflow2.jpg.f343de263c662bb3418301b8eff570e4.jpg

     

    Beautiful! Thank you both, SyntaxTerror and foehnsturm! I'm going to go ahead and order the solenoid and solid-state relay now (we have some options for 12v sources in the lab already). I'll let you know how it turns out!

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Heh, I hadn't even seen that, @foehnsturm - well done. It's the details that kill you :)

    Just in case I'd like to point out that the relay in question has to be a solid state one, like Foehnsturm suggested. If you were to use a mechanical one without additional protection, you'd be risking your LED driver transistor on the main board due to inductive kickback.

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

     I'm going to go ahead and order the solenoid and solid-state relay now (we have some options for 12v sources in the lab already).  I'll let you know how it turns out!

     

    Cool! We demand pictures, by the way. :p

    • Like 1
    Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

     

     I'm going to go ahead and order the solenoid and solid-state relay now (we have some options for 12v sources in the lab already).  I'll let you know how it turns out!

     

    Cool! We demand pictures, by the way. :p

     

    Done! Least I could do in return!

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    I'm just worried that with your simple "on/off" method it will extrude too much when turned on. There is less control. Whereas with the Joris method you don't need to buy any hardware and you get fine control of extrusion amounts. Plus you are less likely to damage your circuit board.

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Plus you are less likely to damage your circuit board.

     

    With a solid state relay you get galvanic isolation so there's not much chance of that.

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    I'm just worried that with your simple "on/off" method it will extrude too much when turned on.  There is less control.  Whereas with the Joris method you don't need to buy any hardware and you get fine control of extrusion amounts.  Plus you are less likely to damage your circuit board.

     

    I understand your concern with the gel extrusion, but that isn't usually where the problem occurs with our other printers. Controlling the extrusion with a simple valve open/close method (with upstream regulation of the pressure to get the ideal extrusion velocity) is how all our other bioprinters operate, and it seems to work well enough for the resolution we need.

    Also, please correct me if I'm looking at his design wrong, but from what I can tell, the Joris method uses the filament to actually push the syringe? If this is the case, it isn't useful to us, since we want to print PCL from the hot end with a syringe extrusion in the same print.

    Anyone else have any input on the whole "damaging the circuit board" possibility? After seeing that come up twice now...I'm getting a bit worried about it.

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Anyone else have any input on the whole "damaging the circuit board" possibility?  After seeing that come up twice now...I'm getting a bit worried about it.

     

    No need to worry. First off, a solid state relay is basically an optocoupler driven power transistor. Short of someone melting the part and somehow fusing the internals together, there is nothing the secondary side can do to affect the primary side of the relay. Second, the LED's are switched by a pin on the microcontroller driving a transistor. Even if we were to do something evil like short the output to ground, we'll only kill the transistor. We have the schematics, we have the parts list. You can have a handful of replacements for 1 euro, all you need is a soldering iron and someone to wield it.

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    Anyone else have any input on the whole "damaging the circuit board" possibility?  After seeing that come up twice now...I'm getting a bit worried about it.

    No need to worry. First off, a solid state relay is basically an optocoupler driven power transistor. Short of someone melting the part and somehow fusing the internals together, there is nothing the secondary side can do to affect the primary side of the relay. Second, the LED's are switched by a pin on the microcontroller driving a transistor. Even if we were to do something evil like short the output to ground, we'll only kill the transistor. We have the schematics, we have the parts list. You can have a handful of replacements for 1 euro, all you need is a soldering iron and someone to wield it.

    You've put me at ease :) I'm ordering the solenoid and SS Relay today! Thanks again, SyntaxTerror!

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    You've put me at ease :) I'm ordering the solenoid and SS Relay today!  Thanks again, SyntaxTerror!

    You're welcome :)

    I can definitely say that Ultimakers have survived far worse than what you're planning to do. Of course the proverbial poo sometimes gets sucked into a turbofan intake, but I see no reason this little mod should hurt anything at all. Using an onboard driver to power another offboard driver sounds about as safe as it gets to me. It needs to go really, really, really wrong before it costs a new main board, that's for damn sure.

  • Link to post
    Share on other sites

    Posted · Altering Ultimaker 2 to open/close solenoid valve for bioprinting

    I saw this thread and thought it was interesting. I've also been wanting to test a pressure actuated printing system. I've tested it out now and it works pretty well! One suggestions though is if you're using the standard firmware (Ulitmaker2Marlin 15.04.6) then there are some issues if you use the LED On/Off commands (M42, M43) for triggering the solenoid. I think this is due to conflicts with the LED "always on, always off, on while printing" settings in the firmware. I ended up switching to the fan PWM pin instead (using M106, M107) and it worked flawlessly. If you want to keep this pin for PWM, I think there are also other pins available that aren't PWM.

    After using it for a while, I noticed that there isn't that much support for slicing g-code compatible with solenoid control. At first, I wrote the g-code manually (good for learning) but is very tedious. You can also write custom post-processing scripts for Cura or Slic3r but it isn't as user friendly. Joseph Lenox helped me implement customization On/Off commands into Slic3r (https://github.com/alexrj/Slic3r/pull/3734). I found it pretty helpful so wanted to pass it along.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 16 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...