{"id":3983,"date":"2014-10-08T01:03:10","date_gmt":"2014-10-08T05:03:10","guid":{"rendered":"http:\/\/labrigger.com\/blog\/?p=3983"},"modified":"2014-10-07T01:03:27","modified_gmt":"2014-10-07T05:03:27","slug":"cheap-microcontrollers","status":"publish","type":"post","link":"http:\/\/labrigger.com\/blog\/2014\/10\/08\/cheap-microcontrollers\/","title":{"rendered":"Cheap microcontrollers"},"content":{"rendered":"<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2014\/10\/cp.png\" alt=\"cp\" width=\"489\" height=\"372\" class=\"alignnone size-full wp-image-3985\" srcset=\"http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2014\/10\/cp.png 489w, http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2014\/10\/cp-300x228.png 300w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/p>\n<p><em>This post is by <a href=\"http:\/\/www.hhmi.org\/scientists\/koen-vervaeke\">Koen Vervaeke<\/a>.<\/em><\/p>\n<p>Cheap microcontrollers like <a href=\"http:\/\/labrigger.com\/blog\/?s=arduino\">Arduino<\/a> or <a href=\"http:\/\/labrigger.com\/blog\/2012\/09\/06\/raspberry-pi-arduinolike-form-and-price-but-with-way-more-power\/\">Raspberries<\/a> are great devices to orchestrate behavior experiments. They don\u2019t have however high voltage outputs to directly drive valves, servomotors, etc which typically require 12 or 24V. Instead of buying breadboards, components, and making a wire spaghetti, you can buy instead <a href=\"http:\/\/www.sainsmart.com\/arduino\/arduino-components\/relays\/4-channel-5v-relay-module-for-pic-arm-avr-dsp-arduino-msp430-ttl-logic-1.html\">these very cheap relays<\/a>.<\/p>\n<p>They take TTLs as an input and drive whatever you hook up on them. You have classic mechanical ones and solid state versions (faster, silent and no sparks), and you find a ton of them on ebay.<\/p>\n<p>Instead of Arduinos and such, I actually use a NI USB-6008. That\u2019s like the cheapest DAQ you can get. It has a whole bunch of digital and analog output channels, but unlike Arduinos each channel is barely able to produce 2-3 mA, which is not sufficient to drive these relays for which you often need 10-25 mA. Typically, you will solve this with an IC driver circuit (<a href=\"http:\/\/en.wikipedia.org\/wiki\/ULN2003A\">for example<\/a>). However, I found today some guys in Bangalore who ship relays with an integrated ULN2003a that only need 1.3 mA: (<a href=\"http:\/\/numato.com\/productdoc\/4ChannelRelayController\/4ChannelRelayControllerUserManual.pdf\">PDF link<\/a>)<\/p>\n<p>It\u2019s super simple to hook these up to your device and you can control anything you want with TTLs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p align=\"center\">\n<p><em>This post is by <a href=\"http:\/\/www.hhmi.org\/scientists\/koen-vervaeke\">Koen Vervaeke<\/a>.<\/em><\/p>\n<p>Cheap microcontrollers like <a href=\"http:\/\/labrigger.com\/blog\/?s=arduino\">Arduino<\/a> or <a href=\"http:\/\/labrigger.com\/blog\/2012\/09\/06\/raspberry-pi-arduinolike-form-and-price-but-with-way-more-power\/\">Raspberries<\/a> are great devices to orchestrate behavior experiments. They don\u2019t have however high voltage outputs to directly drive valves, servomotors, etc which&#8230;<\/p>\n<div class=\"read-more\"><a href=\"http:\/\/labrigger.com\/blog\/2014\/10\/08\/cheap-microcontrollers\/\">Read More<\/a><\/div><\/p>\n","protected":false},"author":1,"featured_media":3985,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[18,22],"class_list":["post-3983","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hardware","tag-behavior","tag-electronics"],"_links":{"self":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts\/3983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/comments?post=3983"}],"version-history":[{"count":2,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts\/3983\/revisions"}],"predecessor-version":[{"id":3986,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts\/3983\/revisions\/3986"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/media\/3985"}],"wp:attachment":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/media?parent=3983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/categories?post=3983"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/tags?post=3983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}