{"id":2216,"date":"2016-10-04T12:16:22","date_gmt":"2016-10-04T11:16:22","guid":{"rendered":"http:\/\/www.lookingatnothing.com\/?p=2216"},"modified":"2016-10-04T12:34:24","modified_gmt":"2016-10-04T11:34:24","slug":"usaxs-electronics","status":"publish","type":"post","link":"https:\/\/lookingatnothing.com\/index.php\/archives\/2216","title":{"rendered":"USAXS electronics"},"content":{"rendered":"<p>While I was under the assumption that we&#8217;d test the Bonse Hart USAXS instrument at the synchrotron first, scheduling issues there have dictated that we should test it in our lab instead. This means that I need to build the control electronics. Here&#8217;s the plan&#8230;<!--more-->In total, we have to control 12 stepper motors, 3 pistons, and read out two encoders, two pressure sensors, and one detector. For the motors we use two six-axis Trinamic controllers, which need to be addressed using RS485, while most of the remaining components use RS232 or return analog signals. Figure 1 shows the connection diagram.<\/p>\n<figure id=\"attachment_2217\" aria-describedby=\"caption-attachment-2217\" style=\"width: 300px\" class=\"wp-caption alignright\"><a href=\"http:\/\/www.lookingatnothing.com\/wp-content\/uploads\/2016\/10\/USAXS-electronics-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2217\" src=\"http:\/\/www.lookingatnothing.com\/wp-content\/uploads\/2016\/10\/USAXS-electronics-3-300x171.png\" alt=\"Connection diagram of the various USAXS control components. \" width=\"300\" height=\"171\" srcset=\"https:\/\/lookingatnothing.com\/wp-content\/uploads\/2016\/10\/USAXS-electronics-3-300x171.png 300w, https:\/\/lookingatnothing.com\/wp-content\/uploads\/2016\/10\/USAXS-electronics-3-768x438.png 768w, https:\/\/lookingatnothing.com\/wp-content\/uploads\/2016\/10\/USAXS-electronics-3-1024x584.png 1024w, https:\/\/lookingatnothing.com\/wp-content\/uploads\/2016\/10\/USAXS-electronics-3.png 2041w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-2217\" class=\"wp-caption-text\">Figure 1: Connection diagram of the various USAXS control components.<\/figcaption><\/figure>\n<p>To deal with the pneumatics and pressure sensors, we use an autonomous Arduino Mini, with a single input signal to set the desired state of the pistons. The control of the motor stages, and the read-out of the detector will be done by a Raspberry Pi 3, communicating over TCP with a four-port Ethernet-to-RS232\/485 converter. I&#8217;m still trying to decide what&#8217;s best for controlling the instrument: using my previously self-written control software, or switching to (perhaps) <a href=\"http:\/\/www.tango-controls.org\/\">Tango<\/a>. Though perhaps that won&#8217;t run on the Pi..<\/p>\n<figure id=\"attachment_2218\" aria-describedby=\"caption-attachment-2218\" style=\"width: 300px\" class=\"wp-caption alignright\"><a href=\"http:\/\/www.lookingatnothing.com\/wp-content\/uploads\/2016\/10\/DSC_0728.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2218\" src=\"http:\/\/www.lookingatnothing.com\/wp-content\/uploads\/2016\/10\/DSC_0728-300x199.png\" alt=\"Partially filled USAXS control DIN rails, without the messy wiring...\" width=\"300\" height=\"199\" srcset=\"https:\/\/lookingatnothing.com\/wp-content\/uploads\/2016\/10\/DSC_0728-300x199.png 300w, https:\/\/lookingatnothing.com\/wp-content\/uploads\/2016\/10\/DSC_0728-768x511.png 768w, https:\/\/lookingatnothing.com\/wp-content\/uploads\/2016\/10\/DSC_0728-1024x681.png 1024w, https:\/\/lookingatnothing.com\/wp-content\/uploads\/2016\/10\/DSC_0728.png 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-2218\" class=\"wp-caption-text\">Figure 2: Partially filled USAXS control DIN rails, without the messy wiring. The PCB in the front is the new 6-axis Trinamic controller.<\/figcaption><\/figure>\n<p>The remaining trouble is just making sure that everything gets the power they need, and that I don&#8217;t mess the wiring up too much. Like before, I&#8217;m sticking as much as I can onto DIN-rails (Figure 2). This is not compact, but offers a very good pseudo-breadboarding platform for development systems. This time, I also found bridging bars for the terminal blocks, which can connect up to ten blocks at a time. Ideal for those power- and ground lines!<\/p>\n<p>Now, we also connected our Red Pitaya to a second Raspberry Pi, just visible in the back of Figure 2, and is our debug-oscilloscope (and spectrum analyser). Hopefully, we won&#8217;t be needing this too much, but it&#8217;s a nice addition to have.<\/p>\n<p>As for the detector, we have two: one PIN-diode for synchrotron work, and one Ketek SDD for lab-work. To avoid the interoperability issues we encountered last time, we went for a complete SDD system this time (with stable power supply and pulse processor), and should be working out of the box. Once that arrives, we&#8217;ll play around a bit and see what&#8217;s happening.<\/p>\n<p>See you then!<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>While I was under the assumption that we&#8217;d test the Bonse Hart USAXS instrument at the synchrotron first, scheduling issues there have dictated that we <a class=\"mh-excerpt-more\" href=\"https:\/\/lookingatnothing.com\/index.php\/archives\/2216\" title=\"USAXS electronics\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":2,"featured_media":2217,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-2216","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/lookingatnothing.com\/wp-content\/uploads\/2016\/10\/USAXS-electronics-3.png","jetpack_shortlink":"https:\/\/wp.me\/p1gZ2v-zK","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts\/2216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/comments?post=2216"}],"version-history":[{"count":2,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts\/2216\/revisions"}],"predecessor-version":[{"id":2220,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/posts\/2216\/revisions\/2220"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/media\/2217"}],"wp:attachment":[{"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/media?parent=2216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/categories?post=2216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lookingatnothing.com\/index.php\/wp-json\/wp\/v2\/tags?post=2216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}