Node 1: Breadboard: Atmel microcontroller: ATmega162 - USB Multifunction card
1.1.1 Listening to output from the microcontroller
picocom -b 9600 /dev/ttyS0
/dev/ttyS0: DB9 port on PC.
1.1.2 Writing to the microcontroller using printf
Run printf STRING > /dev/ttyS0
from source folder (Byggern2019).
STRING: Any string.
1.1.3 Writing to the microcontroller using cat
(to write entire file)
Run catf FILENAME > /dev/ttyS0
from source folder (Byggern2019).
FILENAME: Any file.
1.2.1 Usb multifunction card to breadboard pins
mulitf[0-index] |
breadboard[1-index] |
comment |
+ |
12V |
NW |
- |
0V GND |
NW |
USB |
|
Connect to PC |
mulitf[0-index] |
breadboard[1-index] |
comment |
OLED_BUS[0] |
GAL[17] |
|
OLED_BUS[1] |
GAL[3] |
|
OLED_BUS[2] |
Atmega[16] |
¬WR (The one to the right) |
OLED_BUS[3:11] |
LATCH[9:2] |
|
mulitf[0-index] |
mulitf[0-index] |
breadboard[1-index] |
comment |
FILTER[0] |
PB[4] slider_L (0-index) |
|
|
FILTER[1] |
|
ADC[5] |
|
FILTER[3] |
|
ADC[6] |
|
FILTER[4] |
PD[1] slider_R (0-index) |
|
|
mulitf[0-index] |
breadboard[1-index] |
comment |
JOYCON[0] |
ADC[4] |
|
JOYCON[1] |
ADC[3] |
|
JOYCON[2] |
Atmega[3] PB2 |
Joy_button |
multif[index-0] |
breadboard[1-index] |
comment |
PB[5] |
Atmega[2] PB1 |
Touch_button (LEFT)¿ |
PD[0] |
Atmega[1] PB0 |
Touch_button (RIGHT)¿ |
DB9 |
breadboard[1-index] |
comment |
signal ground 5 |
GND |
|
transmit data 3 |
MAX233[5] T1_out |
|
receive data 2 |
MAX233[4] R1_in |
|
AVR JTAG[1-index] |
breadboard[1-index] |
comment |
TCK/1 |
ATmega[25] |
|
TMS/5 |
ATmega[26] |
|
TDO/3 |
ATmega[27] |
|
TDI/9 |
ATmega[28] |
|
GND/2 |
GND |
|
GND/(1)0 |
GND |
|
1.2.4 Breadboard to IO-board: Node1 to Node 2 communication
Breadboard[1-index] |
IO-board |
MCP2551[7] |
CAN high |
MCP2551[6] |
CAN low |
Node 2: Arduino: AVR ATmega 2560 - I/O Card - Motorbox - Servo - Solenoid
2.1.1 Listening to output from the microcontroller
picocom -b 9600 /dev/ttyACM0
Shield |
IO-board |
IO-bus |
JP6 |
2.3 IO to mini breadboard
IO |
comment |
JP12[3] |
PWM-signal |
JP12[2] |
VCC |
JP12[1] |
GND |
red |
yellow |
blue |
gray |
black |
2 |
4 |
6 |
8 |
10 |
1 |
3 |
5 |
7 |
9 |
brown |
orange |
green |
purple |
white |
IR-Emitter |
Servo bus |
comment |
Anode (high)(Red) |
9(White) |
5V through resistance |
Cathode (low)(Black) |
10(Black) |
GND |
IR-receiver |
Servo bus |
further |
comment |
Anode (high)(Red) |
7(Purple) |
Shield[A0] |
signal (currently yellow) |
Cathode(low)(Orange) |
8(Gray) |
GND |
|
Servo/joystick motor |
Servo bus |
IO-board |
comment |
Signal (orange) |
6 (blue) |
JP12[3] |
currently yellow |
VCC (red) |
4(yellow) |
JP12[2] |
currently red (switched from direct connection) |
GND (brown) |
2(red(ish)) |
JP12[1] |
currently green (switched from direct connection) |
Important notes:
Shooting motor |
Servo bus |
further |
comment |
Red wire |
1 (brown) |
12V/purple/relay[1] |
no diff between red wires |
Red wire |
3 (orange) |
GND/gray with diode |
no diff between red wires |
Motorbox 1-index |
Shield |
IO-board |
comment |
MJ1 |
MJ1 |
|
commands from arduino to motor |
MJ2 |
MJ2 |
|
data from motor to arduino |
MJEX[1]/Down |
|
Analog Out[1] |
V-signal |
MJEX[2]/Up |
|
Analog Out[2] |
GND |
NaN |
I2C |
JP1/I2C |
SCL and SDA |
Motorbox |
Motor |
comment |
Encoder (in) |
Encoder (out) |
white mark matching on cable |
M+ |
+ |
|
M- |
- |
|
speaker+ -> 5 on shield (arduino PWML ?)
speaker- -> 5 V