Arduino used for a skinner-box with Elotouch touchscreen

For a diploma thesis in biology (not mine) I built a so called skinner-box. Basically a chicken gets a food reward when picking on the screen when shown a learned stimulus. Elotouch "Accutouch" touchscreens are often used because they are thicker and withstand the picks of a chicken. Since there was no library for those touchscreens I had to write the code by myself. The touchscreen I used came with a serial controller and after some research I finally found a datasheet how to interprete the data.

Usually a display (monitor) is used behind the touchscreen to show a stimulus to the subject. In our case instead of the monitor is a real thing as stimulus lighted differently. There are 2 lamps, but only one at a time is used. We used a relais and conventional lamps (230V). There are different program modes, which differ slightly. Each mode starts with a 20 s pause at the beginning of a round, then stimulus phase 10s and a food phase 5s and then starts the next round until aborted manually.

First, we logged each pick together with some other data (x,y-coordinates, number of runs, chicken number etc) directly to a connected notebook running the software "Gobetwino". Later I had to involve a SD card reader/writer to read and save some variables, but, however, kept on logging with Gobetwino.

A LCD, some resistors, pushbuttons and a LED completes it. The wooden box and the food dispenser was made in our workshop.

I made a YT video about it. If you like to see it: ChickenBox - an Arduino based skinner-box [final video] HD - YouTube

Because someone asked me:

If you have a touchscreen from a industrial PC or whatever then it may be that it is an Elotouch screen. If it is a thick screen (a few mm) then I think it is very likely that it is an Elotouch Accutoch screen. Those screens should be labeled with something like SCN-AT-FLT12.1-Z01-0H1-R. Check this list and note the number (in my example E803003): Touchscreens for Retail, Self-Order & POS | Elo® Official Website

Check if you can find anything regarding your controller, like for example this one:
http://www.elotouch.com/products/touchscreens/AccuTouch/c2218c.asp

But most important is to know the data format the touchscreen is sending! If it is a SmartSet Binary data packet or a SmartSet ASCII packet. http://www.elotouch.com/support/technicalsupport/Controllers/SmartSet/data_formats.asp

See this page on the tab "intermediate" or "advanced level" to get all the information needed to interprete the data of a screen sending smartset binary packets: http://www.elotouch.com/Support/TechnicalSupport/Library/smartset1.asp

Hope this is a help to some hackers/developers. :slight_smile:

I made an additional video which explains how to interprete the data packets coming from the serial controller: https://www.youtube.com/watch?v=imOWpYeAO8o