This is an old revision of the document!
Each laboratory node is equipped with an ATmega2561 chip. Several peripherals, sensors and motors and network services are available for the user. The UI is necessary to observe results in the camera when programming remotely. Thus, a proper understanding of UI programming is essential to successfully using the devices.
The main module is a controller development board (controller board) equipped with the AVR ATmega2561 microcontroller. In addition to the microcontroller, the board consists of several peripherals, voltage stabilizer, connectors, JTAG programmer, Ethernet, SD memory card slot. The controller board has the following features:
All ATmega2561 signals are available on three connectors on the edge of the board.
| Nr | Pin | Alternative function / Description | |
|---|---|---|---|
| 1 | VCC | - | +5 V |
| 2 | GND | - | GND |
| 3 | REF | AREF | Analog Reference Voltage For ADC |
| 4 | GND | - | GND |
| 5 | PF0 | ADC0 | ADC Input Channel 0 |
| 6 | GND | - | GND |
| 7 | PF1 | ADC1 | ADC Input Channel 1 |
| 8 | GND | - | GND |
| 9 | PF2 | ADC2 | ADC Input Channel 2 |
| 10 | GND | - | GND |
| 11 | PF3 | ADC3 | ADC Input Channel 3 |
| 12 | GND | - | GND |
| Nr | Pin | Alternative function / Description | |
|---|---|---|---|
| 1 | PD7 | T2 | Timer/Counter2 Clock Input |
| 2 | PD6 | T1 | Timer/Counter1 Clock Input |
| 3 | PD5 | XCK1 | USART1 External Clock Input/Output |
| 4 | PD4 | IC1 | Timer/Counter1 Input Capture Trigger |
| 5 | PD3 | INT3/TXD1 | External Interrupt3 Input or UART1 Transmit Pin |
| 6 | PD2 | INT2/RXD1 | External Interrupt2 Input or UART1 Receive Pin |
| 7 | PD1 | INT1/SDA | External Interrupt1 Input or TWI Serial Data |
| 8 | PD0 | INT0/SCL | External Interrupt0 Input or TWI Serial Clock |
| 9 | VCC | - | +5V |
| 10 | GND | - | GND |
| 11 | PB7 | OC0A/OC1C/PCINT7 | Output Compare and PWM Output A for Timer/Counter0, Output Compare and PWM Output C for Timer/Counter1 or Pin Change Interrupt 7 |
| 12 | PB6 | OC1B/PCINT6 | Output Compare and PWM Output B for Timer/Counter1 or Pin Change Interrupt 6 |
| 13 | PB5 | OC1A/PCINT5 | Output Compare and PWM Output A for Timer/Counter1 or Pin Change Interrupt 5 |
| 14 | PB4 | OC2A/PCINT4 | Output Compare and PWM Output A for Timer/Counter2 or Pin Change Interrupt 4 |
| 15 | PB3 | MISO/PCINT3 | SPI Bus Master Input/Slave Output or Pin Change Interrupt 3 |
| 16 | PB2 | MOSI/PCINT2 | SPI Bus Master Output/Slave Input or Pin Change Interrupt 2 |
| 17 | PB1 | SCK/PCINT1 | SPI Bus Serial Clock or Pin Change Interrupt 1 |
| 18 | PB0 | SS/PCINT0 | SPI Slave Select input or Pin Change Interrupt 0 |
| 19 | PE7 | INT7/IC3/CLK0 | External Interrupt 7 Input, Timer/Counter3 Input Capture Trigger or Divided System Clock |
| 20 | PE6 | INT6/T3 | External Interrupt 6 Input or Timer/Counter3 Clock Input |
| 21 | PE5 | INT5/OC3C | External Interrupt 5 Input or Output Compare and PWM Output C for Timer/Counter3 |
| 22 | PE4 | INT4/OC3B | External Interrupt4 Input or Output Compare and PWM Output B for Timer/Counter3 |
| 23 | PE3 | AIN1/OC3A | Analog Comparator Negative Input or Output Compare and PWM Output A for Timer/Counter3 |
| 24 | PE2 | AIN0/XCK0 | Analog Comparator Positive Input or USART0 external clock input/output |
| 25 | PE1 | PDO/TXD0 | ISP Programming Interface Data Output or USART0 Transmit Pin |
| 26 | PE0 | PDI/RXD0/INT8 | ISP Programming Interface Data Input, USART0 Receive Pin or Pin Change Interrupt 8 |
| Nr | Pin | Alternative function / Description | |
|---|---|---|---|
| 1 | GND | - | Gnd |
| 2 | VCC | - | +5 V |
| 3 | PA0 | AD0 | External memory interface address and data bit 0 |
| 4 | PA1 | AD1 | External memory interface address and data bit 1 |
| 5 | PA2 | AD2 | External memory interface address and data bit 2 |
| 6 | PA3 | AD3 | External memory interface address and data bit 3 |
| 7 | PA4 | AD4 | External memory interface address and data bit 4 |
| 8 | PA5 | AD5 | External memory interface address and data bit 5 |
| 9 | PA6 | AD6 | External memory interface address and data bit 6 |
| 10 | PA7 | AD7 | External memory interface address and data bit 7 |
| 11 | PG4 | TOSC1 | RTC Oscillator Timer/Counter2 |
| 12 | PG5 | OC0B | Output Compare and PWM Output B for Timer/Counter0 |
| 13 | PG2 | ALE | Address Latch Enable to external memory |
| 14 | PG3 | TOSC2 | RTC Oscillator Timer/Counter2 |
| 15 | PC6 | A14 | External Memory interface address bit 14 |
| 16 | PC7 | A15 | External Memory interface address bit 15 |
| 17 | PC4 | A12 | External Memory interface address bit 12 |
| 18 | PC5 | A13 | External Memory interface address bit 13 |
| 19 | PC2 | A10 | External Memory interface address bit 10 |
| 20 | PC3 | A11 | External Memory interface address bit 11 |
| 21 | PC0 | A8 | External Memory interface address bit 8 |
| 22 | PC1 | A9 | External Memory interface address bit 9 |
| 23 | PG0 | WR | Write strobe to external memory |
| 24 | PG1 | RD | Read strobe to external memory |
| 25 | GND | - | GND |
| 26 | 3V3 | - | +3,3 V |
The User Interface module is designed for simple tasks and basic process control. Module has three push-buttons and three LEDs, which can be used as digital inputs and outputs of microcontroller. Additionally to simple LEDs the module is equipped with 7-segment indicator, graphical LCD display and a buzzer. User Interface module is handy to use along with other modules enabling to control the output device behavior, like motors and display the sensor readings.
Module features:
User Interface module is connected to Controller module to ports PA/PC/PG, which includes the 8-pin ports PA and PC and 6-pin port PG.
User Interface module is equipped with three buttons S1, S2, S3 which are connected to ports PC0, PC1, PC2 accordingly. The other end of buttons are connected through the resistors to ground (logical 0). LED1, LED2 and LED3 on the module are connected to the ports PC3, PC4, PC5 accordingly. The anodes of LEDs are connected to the supply (logical 1).
User Interface module is equipped with 7-segment indicator, which is connected to the microcontroller ports through the driver A6275. Driver data bus (S-IN) is connected to pin PC6, clock signal (CLK) to the pin PC7 and latch signal (LATCH) to pin PG2.
The graphical LCD display on the module is connected to port PA. LCD's background lighting can be logically controlled by the software.
The buzzer is connected with controller board's pin PG5 and with Vcc.
Combo module is used in this remote Laboratory to power the motors and connect external sensors.
Combo module is able to drive following motors:
Connect following sensors:
Use the following communication interfaces:
Combo board is connected with controller using PA-PB-PC-PD-PE-PF ports. DC and stepper motor feeds come from external power cord, servo motors feed comes trough 5V voltage regulator also from external power cord. Motors power circuit is separated from controller's power circuit.
DC motors is connected to the DC group of pins. Every pair of pins can control 1 dc motor, thus it's possible to manipulate 4 dc motors. Combo board uses bd6226fp H-bridge to control dc motors. It's possible to manipulate some other device, what can be controlled digitally and it's current is smaller than 1 A and voltage does not exceed 18 V, beside dc motor with DC pins (Piezoelectric generator, relay etc).
| AVR pin | Signal | AVR pin | Signal |
|---|---|---|---|
| PB4 | Motor 1 A | PD6 | Motor 3 A |
| PB7 | Motor 1 B | PD7 | Motor 3 B |
| PD0 | Motor 2 A | PD4 | Motor 4 A |
| PD1 | Motor 2 B | PD5 | Motor 4 B |
Servo is connected to Servo group of pins. Ground wire is connected to the GND pin which is the pin nearest to the board edge. It's possible to use 2 servomotors at once. Signal pins on the Combo module is directly connected to the controller's timer's output pins.
| AVR pin | Signal | Socket |
|---|---|---|
| PB5(OC1A) | PWM1 | Top |
| PB6(OC1B) | PWM2 | Bottom |