Low cost open source hardware and software in behavioral and electrophysiological experiments: Arduino & Raspberry Pi Benjamin H Paffhausen,
[email protected], Department of Neurobiology, Freie Universität Berlin, Germany
Abstract Behavioral science can be accelerated greatly by the use of digitally controlled devices capable of measuring relevant parameters and, if necessary, interact with the experiment. Those machines can be bought and they can do things in an implemented way. They are however neither cheap nor as adaptive as they should be. The focus of this poster is to demonstrate how to overcome the rather small barriers in order to develop their own machines. Recently, open hardware projects like the Arduino or the
input:
Raspberry Pi draw enormous community coding and building elements that can be fused together to fit the experimenters needs. We as scientists can benefit from large numbers of projects that are documented well in the internet, mostly by tutorial videos including component lists and code. Here we present a number of simple suggestions how to build yourself helpful devices for your behavioral and neurophysiological experiments.
learning programming the easy way:
for further information see QR code Honey bee feeding device build with open source hardware and software. This artificial flower suspends sucrose solution together with a light stimulus to train the bees to. The training rhythm of reward and no reward time can be programmed as desired. To do so the central microcontroller, an Arduino nano, controls a stepper motor. That motor is moving the sucrose solution inside a silicone tube via a peristaltic pumping mechanism. Two operational amplifiers sense the presence of sucrose in the tube at the very end and further down the tube. This feedback loop regulates the sucrose solution meniscus. The Arduino mainly waits of the inbuilt timer to run out to change between
rewarding conditions and not rewarding conditions. When the state changes the position of the sucrose meniscus will change accordingly and the reward associated light will turn on synchronously. A second light source with a different color can be used as well for differential learning paradigm. The state of the light source and the sucrose accessibility together with the attendance of bees are recorded by an other Arduino (mini pro) over time. It can measure the attendance of bees with the help of an capacitance sensor (FDC1004). A copper sheet under the feeding tube opening can sense water (bees) proximate to the sheet. Those values, sucrose, light and
bees are saved to a SD card. Every 10 milliseconds those values are written into a table for several days. The artificial flower can be used in electrophysiological experiments since it is using battery power supply and is housed in a metal can. The hardware assembly and its code are fairly complex. Nevertheless all elements by them self are easy to handle. They are tested one by one and in the end combined. The same is true for code. ################################## ################################## ##############################
brightness The easiest way (IMHO) to learn color programing is to start with a hardware temperature based project. Analysis of PhD data is ultrasonic often the first programming encounter. sound Analysis is hard enough if you can magnetic field code, let alone learning while doing. capacities With hardware projects you can start moisture easy with parts that you are interested humidity in. You can use the language your lab is contact using, Arduino can be fed with C, C++, liquids MatLab, Simulink, Python and most camera likely others. With increased meniscus. The Arduino mainly waits of the inbuilt timer to run out to change between rewarding conditions and not rewarding conditions. When the state changes the position of the sucrose meniscus will change accordingly and the reward associated light will turn on synchronously. and many github.com youtube.com experience you can add The layers ofthe light sourcearduino.cc A second light source with a different color can be used as well for differential learning paradigm. state of and the sucrose accessibility together with the attendance of bees are recorded by an other Arduino (mini pro) over time. It can measure the attendance of more... Arduinos areto the sheet. Those values, sucrose, light Here Therethose are avalues lot ofare written into a table for several bees with the help of an capacitance sensor (FDC1004). A copper complexity. sheet under the feeding tube opening can sense water (bees) proximate andyou bees are saved to a SD card. Every 10 milliseconds youTubers who uploadThey are tested one by one days. The artificial flower can be used in electrophysiological experiments since it is using battery power supply and is housedmicrocontrollers in a metal can. The hardware assembly and its codewill are download fairly complex. Nevertheless all elements by them self are easy to handle. andcomputing: in the end combined. The same is true for the code. that can run most of the code from projects you will educational videos that are quite fun to how to start: anything. Only find. Here you will upload your code so watch. Some examples: - buy an original Arduino limitations are speed and data others can reproduce your device or Arduino (microcontroller) - download Arduino IDE Two Minute Papers - Summaries about bandwidth, they can’t handle video analysis. You can decide what license models: Uno, nano, mega ... - connect Arduino via USB artificial intelligence papers in just two stream. This site supplies the you want to use, MIT or CC-BY-4 for - USB interface - open sketch blink minutes. hardware and pretty much everything example, so those people will cite you. - 6 – 16 ADCs - load it up to the Arduino Cody’sLab - Experiments about refining around, software, examples and a Github is perfect to keep track of your - easy to use - see the onboard LED blink metals, mining, chemistry, geology and huge community that will help you code and to get a code review. - explore the code also bee keeping. getting started. Arduinos come in Raspberry Pi (computer) Applied Science - Electron microscopes many flavors, to begin with try an models: 1, 2, 3, zero what you will learn: and a lot of really nerdy experiments in UNO, they do everything most people - +/- 1 GB RAM / 4x 1,2 GHz applied science. - organize projects (develop from the want and they are hard to break. - OS (Linux) / GUI EEVblog - Channel of Dave Jones, glimmer of an idea to a device) hackaday.io / instructables.com - LAN / WiFi / BT - on board explaining in great detail any aspect of - technical understanding of the Get inspirations and reproducible - display output electronic engineering. possibilities and limits of devices instructions on highly creative projects. that can support behavioral raspberrypi.org Instructables shows mostly very solid research. Be at the cutting edge! Raspberry Pis are credit card sized output: entry level projects with small amounts reddit.com - using the swarm intelligence of the computers much like a smartphone. of components. Hackaday hosts more reddit is a message board with topics for Internet The founders supply the operating motors advances projects and has a more anything. Most notably: power system (Linux) and everything you will light involved community that will greatly libraries: need to start. Have a look at the AskScience – get answers from scientists sound influence ongoing projects with their supply: They are easy to use functions that are Raspberry Pi Zero, it is impressive how related to your question. Google twice display professional opinion and suggestions. mainly written by the community that little room, money and power this before asking, they hate boring questions. LAN battery do all the hard work for you. While device needs. AskEngineers – like askScience but with WiFi (5 – 24 V DC) changing even one pixel on a screen engineers. Bluetooth powersocket involves difficult timing and pulsing of AskAcademia – ask people employed in RF (220 V AC) digital pins and needs a lot of adafruit.com academia career-related questions, about serial/USB (PC) PC – USB experience, thanks to a library you can mouser.com / digikey.com They build shields and boards for publications, the funding process, work Memory (SD) (5 V DV) do: display.write(‚Hello World‘). They supply all the small parts you may nearly any sensor so you don’t have stuff in general. and a lot solar need; sensors, chips, adapters, if it to. They sell those little boards and AMA – (Ask Me Anything) People of more... exists they will have it. they come with all the documentation microcontroller vs. interest, for example the NASA team right you would ever need. A general after a successful mission, answering any processor: introduction of how and what is type of questions. Often when a scientist data analysis / storage: - no operating system or GUI, only measured, the hardware connections publishes something important they do an stackoverflow.com files, tables, matricies for: one program is running between Arduino and the sensor, up AMA. Here you can ask for help MS Excel, R, Statistica,... < speed (10 – 100 x) to the code to run the device. You FindaReddit – reddit is overwhelming and with your code. Ask your search engine MatLab, SimuLink < power (100 – 1,000 x) don’t need to know anything about confusing at the beginning - here you can first, chances are your problem was Python < memory (1,000,000 x) programming or hardware to build ask were you can find a fitting subreddit discussed and answered already. and many more... < price (10 x) something useful. for your interest. < size (10 x)