Atnel ATB 1.05A User manual

2017
ATNEL
Mirosław Kardaś
[MANUAL - ATB 1.05A]
Basic information regarding ATB sets ver. 1.05. Description of modules included in the design.
Detailed board and modules schematics. Methods of power supply and connection of the
modules. Recommended literature along with links to video guides.
PDF version 1.2

ATB 1.05a manual author: Mirosław Kardaś
1
Components of the ATB set
1
Table of contents
Components of the ATB set................................................................................................................... 3
Methods of power supply...................................................................................................................... 4
First run - testing the set........................................................................................................................ 5
AVRDUDE –installation, first steps with MkAvrCalculator.............................................................. 5
MkAvrCalculator software - license................................................................................................... 6
MkBootloader software - license ...................................................................................................... 7
Build-in ATB-USBasp programmer .................................................................................................... 8
Installing drivers for build-in USBasp programmer ..................................................................... 8
ATB set fusebit settings ....................................................................................................................10
BLS reading- first test of proper operation of the microcontroller.................................................11
Testing the set....................................................................................................................................11
Jumpers in the ATB set ......................................................................................................................... 12
General scheme of the ATB set ............................................................................................................16
Microcontrollers in the ATB set........................................................................................................... 20
Methods of microcontroller clocking................................................................................................... 21
Connector of the ISP - KANDA programmer (internal / external programmer)................................22
Methods of microcontroller RESET......................................................................................................23
LCD display 2x16cz.................................................................................................................................25
OLED display - I2C ................................................................................................................................. 26
7-segment LED display - 4 positions .................................................................................................... 26
LED diodes –8 pieces............................................................................................................................27
IR diode transmitter (infrared).............................................................................................................27
Infrared receiver (TSOP31236) and TSMP58000 (IR carrier) ............................................................. 28
Digital temperature sensor DS18B20 .................................................................................................. 28
Buzzer (loudspeaker)........................................................................................................................... 29
Buttons (key buttons) tact-switch type.............................................................................................. 29
External EEPROM memory - 24c04e ................................................................................................... 30
RS485 - SN75176 integrated circuit (MAX485) equivalent ................................................................ 30
RS485 –transmission and PC control............................................................................................... 31
USB adapter / RS232 / RS485 ................................................................................................................33
Scheme of the adapter and connections........................................................................................ 34

ATB 1.05a manual author: Mirosław Kardaś
2
2
Components of the ATB set
Installing drivers for FT232RL .......................................................................................................... 35
Optional ATNEL-AIR slots .................................................................................................................37
Motor driver L293D.............................................................................................................................. 38
Power driver ULN2803......................................................................................................................... 39
LCD - ICL7660 contrast converter (option)......................................................................................... 40
LVT optoisolators (option)....................................................................................................................41
ADC input system –voltage measurement ........................................................................................ 43
ATB-PWR3 converter............................................................................................................................ 44
DIGI-LION 2 converter.......................................................................................................................... 45
ATB-MICROPORT juncture................................................................................................................... 47
V-USB system or clear USB lines for microcontroller......................................................................... 48
Audio amplifier with PWM volume control (option).......................................................................... 49
Microphone amplifier (option)............................................................................................................ 50
USB-A angular socket (option).............................................................................................................51
Recommended literature......................................................................................................................52
CONTACT INFO ..................................................................................................................................... 53

ATB 1.05a manual author: Mirosław Kardaś
3
Components of the ATB set
3
Components of the ATB set
The set includes:
1. Hardware USBasp programmer
2. ATB-PWR3 converter - choice in range of +5 V / +3,3 V (it is possible to mount ATB-LION)
3. USB/RS232 converter based on FT232RL (full RS232 with RS485)
4. ATmega32A microcontroller
5. Replaceable quartz resonator with a stand - 11,0592 MHz
6. RESET button
7. External programmer connector (KANDA type)
8. V-USB
9. 8 green LED diodes
10. IR receiver - 36 kHz
11. IR diode transmitter
12. LCD display 2x16 (blue)
13. 7-segment LED display (red)
14. Tact-switch buttons (5 pcs.)
15. Potentiometer 20k
16. Digital temperature sensor - DS18B20
17. EEPROM memory - 24C04
18. Clock and calendar chip based on PCF8583 ( to replace with: PCF8563, DS1307+, DS1337+)
19. MAX485 (SN75176)
20. Gel capacitor 0,22 F
21. Power driver ULN2803
22. ATB-Microport juncture (new!)
23. HUB-USB - 4 ports
24. Software: MkAvrCalculator - full license
25. Software: MkBootloader - full license
OPTIONS for self-assembly, or in the additional "DELUXE" pack
1. Contrast-reducing converter to LCD - ICL7660 with capacitors
2. TDA7052A audio power amplifier with volume control - PWM
3. LM358 Microphone Amplifier
4. ATNEL-AIR Stand - 2 pcs
5. Angular USB-A (output 4 of HUB-USB port in ATB kit)
6. S1 switch with jumper under inverter
7. Encoder 24 pulses
8. Optisolators LTV355T - 2 pcs (+ARK connectors)

ATB 1.05a manual author: Mirosław Kardaś
4
4
Methods of power supply
Methods of power supply
Every ATB set in basic version with ATB-PWR3 converter installed can be powered from one of the
three following sources:
1. Type A-B USB cable (printer type) connected to PC (default power supply mode)
2. External power source of 12V with use of ATB-PWR3 converter
3. External KANDA tape –power supply from the programmer
The source is selected by using J2 PWR jumper allowing to switch between USB and EXT. By default
USB is selected as the source.
In case of use ATB-LION (providing buffered power) and lack of external power - its possible to use
Li-Ion batteries and LiPo. It is also possible to use it without any batteries by just connecting external
charger to micro USB port (i.e. from mobile device or to USB port in PC).
.
(1)
.
.
.
1. USB cable from the computer
.
(2)
.
.
.
2. External power source
.
(3)
.
.
.
3. External ISP programmer

ATB 1.05a manual author: Mirosław Kardaś
5
First run - testing the set
5
First run - testing the set
All recommended steps allowing to properly test the primary components of the ATB set are
described in this chapter.
AVRDUDE –installation, first steps with MkAvrCalculator
Before starting the work, install AVRDUDE. You can do this by going in the “settings” tab in the
MkAvrCalculator and clicking the "Install" button in the "avrdude" frame. Figure below:
When the folder window appears, either point to an existing folder with an older version of
Avrdude, or create a new folder (preferably directly on C: \).
C:\AVRDUDE

ATB 1.05a manual author: Mirosław Kardaś
6
6
First run - testing the set
MkAvrCalculator software - license
For performing operations on microcontroller i.e. reading, programming, checking proper
behavior, it is necessary to always use up-to-date MkAvrCalculator software which can be
downloaded from http://atnel.pl/mkavrcalculator.html. Once downloaded, unpack it to
destination folder of your choice. After download, the software runs in FREE/DEMO mode by
default. Everyone who bought ATB set, receive a license file via email (lic.dat) for MkAvrCalculator
software. In order to activate this license –place the file in a folder which contains the software.
Once it is done and the software is restarted it will be running in FULL version mode which allows
to interact with every AVR microcontroller including Atmega32 mounted in the ATB set.
Screenshot of software running in FREE version (without license)
Screenshot of software running in FULL version (with license)
Before further interacting with the set, software should be installed on a computer which will
allow for fully automated installation of digitally signed drivers for build-in USBasp programmer.
The installation will take place completely automatically.

ATB 1.05a manual author: Mirosław Kardaś
7
First run - testing the set
7
MkBootloader software - license
It is necessary to always use up-to-date MkBootloader software which can be downloaded from
http://atnel.pl/MkBootloader.html. Once downloaded, unpack it to destination folder of your
choice. After download, the software runs in FREE/DEMO mode by default. Everyone who bought
ATB set receive a license file via email (lic.dat) for MkBootloader software. In order to activate
this license - place the file in a folder which contains the software. Once that is done and the
software is restarted it will be running in FULL version mode.
Screenshot of software running in FREE version (without license)
Screenshot of software running in FULL version (with license)

ATB 1.05a manual author: Mirosław Kardaś
8
8
First run - testing the set
Build-in ATB-USBasp programmer
Every ATB set since version 1.05 contains build-in hardware ATB-USBasp programmer! By default, the
programmer is immediately active and does not require any extra cables. Just connect ATB to PC with
type A-B USB cable (printer type). Programmer is positioned under Atmega32 holder.
Installing drivers for build-in USBasp programmer
If you have not had previously installed USBasp drivers in your system, then thanks to
MkAvrCalculator software, you just need to connect ATB-module to PC and enjoy fully automated
installation of digitally signed drivers. If, while connecting the module to PC, MkAvrCalculator
software was not running then Windows will notify you about newly discovered USB hardware.
Drawback here is that the device will show missing appropriate drivers.
In this case you just need to start MkAvrCalculator software which will automatically detect missing

ATB 1.05a manual author: Mirosław Kardaś
9
First run - testing the set
9
USBasp drivers. User will be prompted with:
4. USBasp programmer has been detected without drivers. Do you want to install this driver now?
In response to acceptance of the operation, MkAvrCalculator will attempt to install the drivers. This
will result in installation of digitally signed drivers which can take up to 30 sec.
Once completed, the following will be shown in Windows Device Manager:
This confirms that the operation has completed successfully and allows to continue work with use of
build-in or external USBasp programmer.
These drivers work with any USBasp programmers which are fully compliant with USBasp standard.

ATB 1.05a manual author: Mirosław Kardaś
10
10
First run - testing the set
ATB set fusebit settings
Every Atmega32 microcontroller mounted by Atnel corporation in the ATB set has fuse settings
different from factory defaults. Changes include:
1. Enabled external clocking source (quartz 11,0592 MHz included in the set)
2. Disabled JTAG.

ATB 1.05a manual author: Mirosław Kardaś
11
First run - testing the set
11
BLS reading- first test of proper operation of the microcontroller
Every Atmega32 microcontroller mounted by Atnel corporation in the ATB set has changed fusebits
responsible for placing the bootloader in a Flash memory, as well as its automatic start after the
reset. A bootloader is also uploaded into the mounted microcontroller.
Testing the set
In order to test proper work of not only the microcontroller but also the of the USB/RS232 adapter
mounted in the ATB set, it is necessary to perform the following:
1. Connect the ATB set with a USB cable to a computer.
2. Set the power supply voltage of the J2 PWR jumper in USB position.
3. Check if the yellow jumpers [ JP6 ] and [ JP7 ] just above the microcontroller are closed.
4. Start MkBootloader.
5. Set the MkBootloader in RS232 work mode.
6. Select the transmission Speer (baudrate) 115200 in settings.
7. Select the correct COM port no. (show in MkAvrCAlculator).
8. Press INFO key in the MkBootloader.
Screenshot of MkAvrCAlculator, showing COM port no., presenting COM port no. which has been

ATB 1.05a manual author: Mirosław Kardaś
12
12
Jumpers in the ATB set
assigned to the connected USB/RS232 adapter from the ATB set.
In this case, select the COM port specified in the MkBootloader and press the INFO button. As a
result of this action you will see the response from the microcontroller.
A response from the microcontroller is visible in the red frame. This confirms the correct operation of
the microcontroller and the USB / RS232 adapter.
Warning! First upload of your own software to the microcontroller, even the flashing LED, erases BLS
(bootloader) in the microcontroller, so you cannot repeat the test described above . But do not worry
about this situation, because the BLS (bootloader) can be uploaded at any time. To do this, take a
look at the guide on youtube: https://www.youtube.com/watch?v=1KcyLMuvcHQ .
Jumpers in the ATB set
View from the top of the ATB set ATB and the default settings of all jumpers.

ATB 1.05a manual author: Mirosław Kardaś
13
Jumpers in the ATB set
13
SHIFT+CTRL+MINUS - rotate left SHIFT+CTRL+PLUS - rotate right

ATB 1.05a manual author: Mirosław Kardaś
14
14
Jumpers in the ATB set
Description and functions of the jumpers:
(asterisk) *- default condition of a jumper, when the ATB set is released from the factory.
GREEN jumpers –microcontroller configuration
JP1 - closed, INT2 (PB2) processor input is connected to KANDA
open *, PB2 input is not connected to KANDA
JP2 - closed, SS (PB4) SPI data bus input is connected to KANDA
open *, PB4 input is not connected to KANDA
JK1,JK2,JK3 - configuration of microcontroller clocking in accordance with the below
table:
5. External quartz - External TTL generator - External RC oscillator
BLUE jumpers –connected with power supply line +12 V
J1 - closed *, when a S1 side switch is not soldered.
open, when a S1 side switch is soldered.
J27 - closed, power supply +12 V is connected to ULN2803
open *, it is possible to connect your own power to ULN2803
J38 - closed, power supply +12 V is connected to L293D
open *, it is possible to connect your own power to L293D
RED jumpers –connected with power supply line +5 V / +3,3 V
J2_PWR - position USB *, the set is powered by USB cable (from PC)
position EXT, the set is powered by external power supply - ATB-PWR3
VCCIO - position TTL *, RS232 pins of FT232RL in TTL standard
position 3.3V, RS232 pins of FT232RL in 3,3V standard
JP16 - closed, when the ATB-PWR3 converter operates with +5 V
open *, when the ATB-PWR3 converter works with +3,3V
(stabilizier system 3,3V for ATB-Microport is omitted)

ATB 1.05a manual author: Mirosław Kardaś
15
Jumpers in the ATB set
15
[ YELLOW jumpes ] –responsible for data bus in sets: RS232 and I2C
RS232 Data Bus
JP6 - closed *, TX processor line connected with RX line of FT232R
opened, TX processor line disconnected from RX line of FT232R
JP7 - closed *, RX processor line connected with TX line of FT232R
opened, RX processor line disconnected from TX line of FT232R
WARNING! Jumpers are closed by default which means that you cannot connect additional Bluetooth
or WiFi modules at that time to PD0 and PD1 microcontroller pins. Additionally, you cannot use them for
different purposes at that time - you have to open both jumpers to be allowed to do this.
I2C Data Bus
JP3 - closed *, SDA (PC1) processor line connected to data bus on ATB
open, SDA (PC1) processor line disconnected from data bus on ATB
JP4 - closed *, SCL (PC0) processor line connected to data bus on ATB
open, SCL (PC0) processor line disconnected from data bus on ATB
[ WHITE jumpers ] –configuration of the peripheral systems in the set
[ J35 J36 J37 ]
Jumpers enable selecting and mounting in the
ATB set one of the four RTC systems.
You can choose from:
1. PCF8583 –mounted by default
2. PCF8563
3. DS1307+
4. DS1337+
[ JP8-ARST ] - close, auto RESET from DTR system is set, FT232R (like in Arduino)
open *, RESET line disconnected from DTR
[ J3 ] - closed *, it has to be CLOSED for ATB-PWR3 transformer!
open, it has to be OPEN for ATB-LION transformer !
[ IR_ICP ] - closed, connection of IR receiver output to pin PD6
open *, disconnection of IR receiver output
[ J15 ] - position RW->uC, display RW pin connected to the processor
position RW->GND *, display RW pin connected to GND

ATB 1.05a manual author: Mirosław Kardaś
16
16
General scheme of the ATB set
[ J8 ] - closed *, for ATB-microSD module close this jumper
open, for different modules for ATB-Microport, connect it in accordance with
the manual
Use the remaining white PCB jumpers in accordance with the visible description on PCB. The two
jumpers just below L293D system [ J39 ] and [ J40 ] are used to connect permanently
inputs of EN system; operation in PWM mode = 100%. The jumpers can be removed and connected
to the single pins of the microcontroller in order to control separately each bridge with use of PWM.
Additionally, with one of the white jumpers you can select the address on l2C data bus of external
EEPROM 24c04 memory.
USB (raster 2 mm) jumpers –configuration of one of USB-HUB ports.
[ J11 J12 J13 J14 ]
Jumpers enable USB configuration for the J17 jumper
next to the processor (on the right).
You can choose from:
1. Pure USB –default configuration *
2. V-USB system is ready to connect J17
(description of the J17 signals is in the back of
the PCB )
J17 * D+ D- D+
(asterisk) *- default condition of a jumper, when the ATB set is released from the factory.
General scheme of the ATB set
The scheme is divided to three sheets and presented in this manual only demonstratively. The
schemes are available in separate PDF files.
SHIFT+CTRL+MINUS –turn left SHIFT+CTRL+PLUS –turn right

ATB 1.05a manual author: Mirosław Kardaś
17
General scheme of the ATB set
17
SHIFT+CTRL+MINUS –turn left SHIFT+CTRL+PLUS –turn right

ATB 1.05a manual author: Mirosław Kardaś
18
18
General scheme of the ATB set

ATB 1.05a manual author: Mirosław Kardaś
19
General scheme of the ATB set
19
Warning! Schemes do not contain elements: USBasp and USB HUB
The scheme is divided into functional blocks. Gray circled rectangles represent elements that
normally are not mounted in the set. This includes:
1. Slide switch S1 (under the ATB converter) - switching power supply +12 V in the set .
2. Rotary encoder.
3. Buck converter ICL7660 contrast with external elements.
4. Sockets ATNEL - AIR (supports the modules ATB - BTM -222 or ATNEL - WIFI232 - T) .
5. Two optoisolators (U13 and U14) LTV335T with ARK connector.
You can purchase the optional items separately at Atnel online store and install them by yourself in
the ATB set.
www.sklep.atnel.pl
Table of contents