Commit f0aeab4f authored by Philip Hozier's avatar Philip Hozier
Browse files

week13 update 3/5

parent cac5a1db
Pipeline #228404 passed with stages
in 1 minute and 50 seconds
......@@ -212,6 +212,8 @@ I2C protocol (Inter-Integrated Circuit), only uses two wires for communication (
Multiple masters can be connected to a single slave or multiple slaves. The problem with multiple masters in the same system comes when two masters try to send or receive data at the same time over the SDA line. To solve this problem, each master needs to detect if the SDA line is low or high before transmitting a message. If the SDA line is low, this means that another master has control of the bus, and the master should wait to send the message. If the SDA line is high, then it’s safe to transmit the message. Multiple controllers with multiple peripherals systems need 4.7K Ohm pull-up resistors connecting the SDA and SCL lines to Vcc.
- **Programming**
-
Wire Library allows you to communicate with I2C / TWI devices. On the Arduino boards with the R3 layout (1.0 pinout), the SDA (data line) and SCL (clock line) are on the pin headers close to the AREF pin.
'SoftWire' is a software I2C implementation for Arduino and other Wiring-type environments. It utilises the pinMode(), digitalWrite() and digitalRead() functions. The pins to be used for the serial data (SDA) and serial clock (SCL) control lines can be defined at run-time. Alternatively it is possible to pass references to functions which read and control the SDA and SCL lines, thereby allowing direct port manipulation to be used if preferred. Multiple objects (for multiple software I2C buses) and clock-stretching by peripheral devices are supported. A timeout feature is included to prevent lockups by faulty or missing hardware. The microcontroller must function as the controller device, multiple controllers are not supported.
......@@ -297,10 +299,15 @@ I took a bit of inspiration from the [Adrianino](http://fabacademy.org/2020/labs
**Initial decisions**
I felt confident enough in the boards I've previously produced to design these boards by taking inspiration from them.
**BOM - Controller Board**
![Individual Assignment](../week13/controller-kicad1.jpg "controller kicad 1")
![Individual Assignment](../week13/controller-kicad1.jpg "controller kicad 2")
| **COMPONENT** | **DESCRIPTION** | **DATA SHEET** | **SPECIFICATIONS** |
|---|----|---|----|
| **3 UPDI Header pins** | To allow board programming/UPDI communication. Plus power 5v | | Non-polarity. |
......@@ -308,13 +315,16 @@ I took a bit of inspiration from the [Adrianino](http://fabacademy.org/2020/labs
| **Voltage regulator** | To drop the input voltage by 1.2 v for the sensor. | [LM3480_datasheet.pdf](../week10/lm3480.pdf) | Polarity |
| **Capacitor (1µ)** | To stabilize power signal. | | Non-polarity |
| **Resistor (0 Ohm) x6** | To use as a bridge for tracks to run underneath. | | Non-polarity. |
| **Resistor (4.9k Ohm) x2** | To control amount of current going to the separate LEDs | | Non-polarity. |
| **Button B3 SN** | Input source. | | Non-polarity. |
| **Resistor (4.9k Ohm) x2** | To control amount of current going to the separate LEDs | | Non-polarity. |2| **Button B3 SN** | Input source. | | Non-polarity. |
| **FTDI header pins** | To allow serial communication. | | Non-polarity. |
| **RGB LED, CLV1A-FKB** | RGB colour combinations. | [RGB-LED-datasheet.pdf](../week12/RGB-LED-datasheet.pdf "RGB-LED datasheet")| Polarity |
| **2x3 SPI Header pins x2** | To allow board SPS or I2C communication. | | Non-polarity. |
| **switch** | To switch between 3.3v and 5v. | | Non-polarity. |
![Individual Assignment](../week13/peripheral-kicad1.jpg "peripheral kicad 1")
![Individual Assignment](../week13/peripheral-kicad1.jpg "peripheral kicad 2")
**BOM - Baby Boards**
| **COMPONENT** | **DESCRIPTION** | **DATA SHEET** | **SPECIFICATIONS** |
......@@ -325,7 +335,7 @@ I took a bit of inspiration from the [Adrianino](http://fabacademy.org/2020/labs
| **ATtiny412** | IC | [Attiny212-412_datasheet.pdf](../week10/Attiny212-412_datasheet.pdf) | Polarity |
| **Capacitor (1µ)** | To stabilize power signal. | | Non-polarity |
| **2x3 SPI Header pins** | To allow board I2C communication. | | Non-polarity. |
| **Resistor (0 Ohm) x2** | To use as a bridge for tracks to run underneath. | | Non-polarity. |
| **Resistor (0 Ohm) x1** | To use as a bridge for tracks to run underneath. | | Non-polarity. |
**KiCAD**
......@@ -336,14 +346,14 @@ I took a bit of inspiration from the [Adrianino](http://fabacademy.org/2020/labs
![Individual Assignment](../week12/kicad-schematic.jpg "KiCad 2")
- Place 'Symbols'.
- Attach 'Global labels'.
- Place direct connections with 'Wire's if needed.
- Place 'no connection' where needed (to stop errors).
- Place 'PWR FLAG's to suppress power errors.
- Run 'Electrical Rules Check'.
- Run 'Assign PCB footprints to schematic symbols'.
- Run 'PcbNew to layout printed circuit board'.
- Place 'Symbols'.
- Attach 'Global labels'.
- Place direct connections with 'Wire's if needed.
- Place 'no connection' where needed (to stop errors).
- Place 'PWR FLAG's to suppress power errors.
- Run 'Electrical Rules Check'.
- Run 'Assign PCB footprints to schematic symbols'.
- Run 'PcbNew to layout printed circuit board'.
![Individual Assignment](../week12/kicad-pcb.jpg "KiCad 3")
......@@ -357,7 +367,7 @@ I took a bit of inspiration from the [Adrianino](http://fabacademy.org/2020/labs
For the controller board, power comes in through the FTDI or UPDI sets of pins depending on whether i'm programming or debugging with the serial port. This is then either regulated down to 3.3v or stays at 5v, depending on the setting of the switch.
The capacitor smooths out that power and delivers it around the board, and to the power pins fo the SPI and I2C headers. That way any networked IC boards or attached sensors can be also draw power.
The capacitor smooths out that power and delivers it around the board, and to the power pins fo the SPI and I2C headers. That way any networked IC boards or attached sensors can be also draw power.
The button input and LED outputs can be programmed to activate or give visual feedback on either the control board or other networked boards.
......@@ -379,7 +389,6 @@ Continuity testing 'sounded' like there were no missed or extra connections in t
![Individual Assignment](../week12/strange-results.jpg "strange results")
---
## What I should’ve done
---
......@@ -389,8 +398,18 @@ Continuity testing 'sounded' like there were no missed or extra connections in t
## Mistakes & Issues
---
**Big design**
My first 'baby' board i designed was a little big i thought and would take too long to mill based on how many people needed to use the milling machine. It was based on the 'master' board with a ATtiny1614 with both SPI and I2C connections. I decided to use the ATtiny412 and only have I2C connections, so i would use something different from the controller board and minimise the amount of space used.
**Rx + Tx around the wrong way again**
Another board with the Rx+ Tx around the wrong way. I purposely designed this the other way around from my last board that was wrong. So I solved this for future boards by changing the labelling on the footprint of the FTDI headers in my KiCad library. Rx labels will now all connect to Rx tags on foot prints and labels. The same with the Tx line.
**Pullup resistors**
Upon designing the baby boards, I read that 'pullup' resistors were needed with the SDA and SCL lines which connect to VCC. It wasn't really possible to save the control board by adding the extra resistors, so I redesigned the control board with the extra resistors and also the Rx + Tx around the right way this time.
---
## CONCLUSION
---
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment