Cheap microcontrollers

cp

This post is by Koen Vervaeke.

Cheap microcontrollers like Arduino or Raspberries are great devices to orchestrate behavior experiments. They don’t 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 these very cheap relays.

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.

Instead of Arduinos and such, I actually use a NI USB-6008. That’s 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 (for example). However, I found today some guys in Bangalore who ship relays with an integrated ULN2003a that only need 1.3 mA: (PDF link)

It’s super simple to hook these up to your device and you can control anything you want with TTLs.