VM1AT-R1 INDUSTRIAL MICROCONTROLLER WARNING T avid permanent damage t integrated circuits yu may take precautins t discharge any static electricity frm yur bdy befre handling them. ASSEMBLY INSTRUCTIONS Befre starting identify the cmpnents using the BOM and the pictures checking that yu have all f them. The picture is als useful t slve any dubt abut the rientatin f cmpnents. Use a 20W sldering irn with small tip (1 t 1.5 mm) fr all cmpnents with the exceptin f the big terminal blcks that will require 30-40W. D nt verheat the cmpnents. In general the cmpnents are installed beginning with the lwer nes and cntinuing with the tallest. This helps the assembly by allwing the bard t rest flat n the table. This is the recmmended rder: Resistrs R1 t R43 Dides D5, D6, D7, D8 and D9 16 pin sckets SK2, SK4, SK5 and SK6. Check crrect rientatin. 28 pin sckets SK1. Check crrect rientatin. Capacitrs C1 t C26 Headers J1 t J4 Jumpers JP1 and JP2 Cnnectrs P1 and P2 1
Reset push buttn SW1 16 MHz cristal X1. Electrlitic capacitrs C10 and C27. Pwer cnverter U3. First slder cpper leads (apprx. 1cm lng) t the 4 hles f the cnverter leaving the lng end in the bttm side. Then insert the leads int the main bard, checking the rientatin f the cnverter with the input terminals clser t dide D9, and slder them. Nte that there are hles fr tw diferent sizes f cnverter but sme mdels are slightly smaller requiring a little bending f the leads. Terminal blcks TB1 t TB6 (plug-in type) r TBA1 t TB6 (standard type). Plug-in type terminals must be installed in the inner rw f munting hles while standar terminals are intended t be installed in the uter rw (althugh they can use either ne). Use the 30-40W sldering irn. Led dides D1 t D4. The recmmended clrs are nly a suggestin. Yu may prefer ther cmbinatin. DO NOT INSTALL THE INTEGRATED CIRCUITS YET. Cnnect the pwer supply (24Vdc) t TB6 (r TBA6). Negative pin is the ne clser t the edge f the bard. If the plarity is reversed the bard will nt wrk but n damage will happed (dide D9 prtects the bard against reverse plarity). Cnnect a vltmeter between 0V and +5V (i.e. pins 1 and 4 f TB3 (r TBA3). Adjust the trimpt in the pwer cnverter until the vltage reads +5V +/-5% (4.75 t 5.25V). It is recmmended t seal the trimpt in the adjusted psitin applying a tiny drp f glue int the adjusting screw. Discnnect the pwer. Plug integrated circuits U1 (ATMEGA 328P), U2 (74HC595), U4 (ULN2003), U5 and U6 (CD4021). Nte that U4 and U2 are pinting in ppsite directins. Apply pwer again. If everything is OK the PWR indiatr (RED) will turn n steady and the STAT indicatr (GREEN) will blink nce per secnd, indicating that the prcessr is running. Remember that this test des nt verify the peratin f the input/utput pins. T test the full peratin f the bard yu may use the pre-laded prgram and a MODBUS MASTER applicatin in rder t read inputs and write utputs frm an external device. Check the supprt dcumentatin fr help. 2
INSTALLATION AND USAGE The VM1AT-R1 cntrller can be cnnected in several ways depending n the specific applcatin, but the basic ideas are as fllws: Digital Inputs (TB1, TB2) will be ACTIVE when +24V are applied t them and INACTIVE when 0V are applied r the input left pen. Digital Outputs (TB5) will SINK up t 500 ma frm a lad cnnected t +24V when ACTIVE and pen when INACTIVE. Typically this lad will be the cil f a relay r cntactr, but lamps, resistrs and ther devices can als be driven. Analg Inputs (TB4) can be used individually t measure analg vltages up t 5V r as a pair t use a TWO-WIRE (I2C) bus t cnnect several input/utput devices (i.e. sensrs,a ctuatrs, etc.). Serial cnnectin (TB3) is intended t be used as a MODBUS RTU SLAVE cmmunicatin link but can be used as a general purpse serial channel t. The terminal blck can supply +5V t pwer external devices with up t 2A (i.e. a tuch sreen mnitr). The user must develp the sftware fr the intended use f the cntrller. Basic supprt libraries and examples are suppplied t assist. Applicatins can be develped using varius free f charge IDE platfrms (AVR, Eclipse, Netbeans, Cdeblcks, Arduin, etc.). There is an extensive cmmunity f users f bards based n the ATMEL ATMEGA328P micrcntrller, specially the Arduin cmmunity, where all class f supprt, including frums, libraries and example applicatins can be fund. TEST PROGRAM The prcessr cmes with a small test prgram installed (VMbasic) that uses the debug serial channel (cnnectr P1) t mnitr the state f all digital and analgue inputs and cntrl the state f the digital utputs. The prgram is part f the sftware supprt package that can be dwnladed at: http:///wp-cntent/uplads/2015/05/vm1atr1.zip T use the prgram yu will need: A cmputer with a serial terminal prgram (i.e. the Arduin IDE serial cnsle) One standard USB-Serial adapter (FTDI). This adapter will be required t dwnlad prgrams t the bard t. Operatin: Cnnect the pwer t the bard and the FTDI adapter t cnnectr P1 (Check that the DTR pin in the adapter is clse t the RESET push buttn). Start the serial cnsle at 9600 baud. Every secnd the bard will send a line cntaining all the input and utput values. Enter a single number frm 0 t 7 and press SEND t tggle the crrespnding utput. The new value will be displayed in the cnsle. 3
4
5
6
7