Skip to content
Snippets Groups Projects
Commit d49da0e6 authored by Lonnie Gamble's avatar Lonnie Gamble
Browse files

Outline the final working set up

parent b732948e
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ _**Evaluated on**_
I decided to make a relay board for the solar electric toaster oven, my final project. I will communicate with the main controller board through I2C. This will allow me to isolate solar power from the controller board.
Here's some images of making the relay board. The relay connects solar power to the oven heating element based on a temperature sensor in the oven. The temperature sensor is connected to the main control board (Sunduino) and communicates to the relay baord via I2C. I did it this way to isolate the high voltages (up to 60 volts) and current (up to 10 amps) of the solar panel from the main control board.
Here's some images of making the relay board. The relay connects solar power to the oven heating element based on a temperature sensor in the oven. The temperature sensor is connected to the main control board (Sunduino) and communicates to the relay board via I2C. I did it this way to isolate the high voltages (up to 60 volts) and current (up to 10 amps) of the solar panel from the main control board.
![Screenshot of KICAD schematic](../images/Week13-networking/networking board.jpg)
......@@ -53,32 +53,39 @@ Here's some images of making the relay board. The relay connects solar power t
![stuffed board](../images/Week13-networking/relay-board.jpeg)
The relay board didn't work at first - I needed to do some troubleshooting and repairs. Found a broken trace that I repaired with solder. I made a design error - I misread the schematic of the relay and used the wrong pins. I repaired this with a jumper wire.
The relay board didn't work at first - I needed to do some troubleshooting and repairs. I found a broken trace that I repaired with solder. I made a design error - I misread the schematic of the relay and used the wrong pins. I repaired this with a jumper wire.
![Repairs needed on relay baord](../images/final-project/repairs_needed_for_relay_board.jpeg)
![Repairs made on board](../images/final-project/repaired_board.jpg)
As I went through the process of getting the realy baord to work for this assignment, I found that I had forgotten to solder a zero ohm resistor on one of the I2C leads and I used the wrong pin on the samd for one fo the I2C leads. Both problems were easily fixed with a zero ohm resistor, some wire for jumpers, and some solder.
## Sunduino Board
I completed several versions of the controller for my final project earlier - I call it the Sunduino. It uses the 20 pin version of the Samd microcontroller.
I completed several versions of the controller for my final project as part of earlier assignments - I call it the Sunduino. It uses the 20 pin version of the Samd microcontroller.
![Sunduino Board]()
Before I got started with the Samd based boards I made, I decided to try making I2C communication work between two arduino boards. I used this tutorial, which uses a potentiometer on the master board to control the brightness of an LED on the slave board. It was pretty smooth working with tehearduino boards - they reliably load programs from the Arduinio IDE on my computer and I had everything working in about 15 minutes.
Before I got started with the Samd based boards I made, I decided to try making I2C communication work between two arduino boards. I used this [tutorial](https://www.instructables.com/I2C-Between-Arduinos-With-Potentiometer-and-LED/), which uses a potentiometer on the master board to control the brightness of an LED on the slave board. It was pretty smooth working with the arduino boards - they reliably load programs from the Arduinio IDE on my computer and I had everything working in about 15 minutes.
However, the Samd boards are highly unreliable being programmed from the Arduino IDE on my computer (2010 macbook pro running Catalina). I have had an extremely frustrating week trying to get them to work and I am still not done. The work done by Quentin to make the Samd boards work with the arduino IDE seems really unreliable, meaning sometimes it works and sometimes it doesn't and even simple programs using the libraries we were given fill the 16 k memory of the samd while on an arduino with an older microcntroller, I only use 10% of the memory of the microcontroller. Ugh. Not sure why this fetish with the SAMD boards when they are the software we work with is so buggy.
However, for me the Samd boards are highly unreliable when I attempt to program them from from the Arduino IDE on my computer (2010 macbook pro running Catalina). I have had an extremely frustrating week trying to get them to work and I am still not done. The work done by Quentin to make the Samd boards work with the arduino IDE seems really unreliable, meaning sometimes it works and sometimes it doesn't and even simple programs using the libraries we were given fill the 16 k memory of the samd while on an arduino with an older microcntroller, 10% of the memory of the microcontroller is used. Ugh. Not sure why this fetish with the SAMD boards when they are the software we work with is so buggy.
Sure, I could program the functions directly but the whole point of this is that I want to build stuff, not dick around with low level programming tasks that have been reliably solved a long time ago by others for other borards and controllers.
Sure, I could program the functions directly but the whole point of this is that I want to build stuff, not dick around with low level programming tasks that have been reliably solved a long time ago by others for other boards and controllers.
OK my rant is over.
For this assignment, I decided to connect a temperature sensor to the Sunduino (master) and have a relay on the relay board turn on an LED to simulate the heater element. For the test, I used a potentiometer connected to the relay board to simulate a temperature sensor based voltage divider. This way I could simulate a wide range of temperatures without having to bother with the oven at this point.
For this assignment, I decided to simulate controller the oven heater element with a temerature sensor in the oven. The idea is to connect a temperature sensor to the Sunduino (master) and have a relay on the relay board turn on an LED to simulate the heater element.
For the test, I used a potentiometer connected to the main control board (sunduino)to simulate a temperature sensor based voltage divider. This way I could simulate a wide range of temperatures without having to bother with the oven at this point. I used an LED connected to the relay board to simulate the oven heating element.
Here's a circuit diagram:
![circuit diagram]()
### Testing Each Board Separately
I decided to get each board working separately before I networked them together with I2C.
Here's the relay board blinking an LED:
......@@ -92,16 +99,26 @@ Here's the relay board blinking an LED:
Here's the Sunduino board reading voltages as I turn the potentiometer:
[video of the sunduiono baord test]()
### Everything Together
Next I hooked the Sunduino to the relay board via I2c.
The oven elements will be on all the time unless the oven overheats, so I implemented a maximum temperature limit. When the max temperature is exceeded, the LED goes off. Adjusting the potentiometer simulates higher or lower temperatures in the oven.
The Sunduino sends the potentiometer voltage (simulating the variable resistance of a temperature sensor) to the relay board via I2C, The relay board checks to see if the voltage represents a temperature higher than the maximum temperature fo the oven. If it does, the relay board activates a relay. The opening and closing of the relay contacts provide power to an LED, which represents the heating element in the oven.
Here's the whole thing integrated - the potentiometer (simulating the variable resistance of a temperature sensor) connected to the Sunduino controls the relay on the Relay Board. The opening and closing of the relay contacts provide power to an LED.
The oven elements will be on all the time unless the oven overheats, so I implemented a maximum temperature limit. When the max temperature is exceeded, the LED goes off.
Here's what the setup looks like:
![image with labels fo the final thing](../images/Week13-networking/Sunduino_and_Relay_Board_Neat_wires.jpeg)
![back up image of the whole thing](../images/Week13-networking/Sunduino_board_neat_wires_farther_back.jpeg)
Note the soldering station baord I mae with teh CNC cutter and some scrap lumber. And a piece of bamboo and one of the bamboo connectors I 3d printed.
Note the soldering station board I made with the CNC cutter and some scrap lumber, a piece of bamboo, and one of the bamboo connectors I 3d printed.
......@@ -115,7 +132,7 @@ Here's a diagram of the hookup between the ESP board and the samd based relay bo
![Diagram of Samd hookup]()
Here'aa picture of the hookup:
Here's picture of the hookup:
![Pic of hookup](../images/Week13-networking/ESP32_and_relay_board.jpeg)
......@@ -127,12 +144,20 @@ The wiper voltage simulates a voltage divider based temperature sensor. If the
### Files:
_**Software**_
[Sketch for the I2C master]()
[Sketch for the I2c Slave]()
**_Hardware**_
Kicad files for relay board
_**Hardware**_
Kicad files for relay board
[Kicad .pro file](../files/week-13-networking/Sotar Toaster Relay Board.kicad_pro)
[Kicad schematic](../files/week-13-networking/Sotar Toaster Relay Board.kicad_sch)
[Kicad PCB layout](../files/week-13-networking/Sotar Toaster Relay Board.kicad_pcb)
......
This diff is collapsed.
{
"board": {
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.19999999999999998,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.049999999999999996,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": false,
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.15,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.0,
"height": 2.0,
"width": 0.33
},
"silk_line_width": 0.15,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.15,
"silk_text_upright": false,
"zones": {
"45_degree_only": false,
"min_clearance": 0.508
}
},
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"copper_edge_clearance": "error",
"courtyards_overlap": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint_type_mismatch": "error",
"hole_clearance": "error",
"hole_near_hole": "error",
"invalid_outline": "error",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "error",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_dangling": "warning",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zone_has_empty_net": "error",
"zones_intersect": "error"
},
"rules": {
"allow_blind_buried_vias": false,
"allow_microvias": false,
"max_error": 0.005,
"min_clearance": 0.0,
"min_copper_edge_clearance": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_silk_clearance": 0.0,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.19999999999999998,
"min_via_annular_width": 0.049999999999999996,
"min_via_diameter": 0.39999999999999997,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
"use_height_for_length_calcs": true
},
"track_widths": [
0.0
],
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
}
],
"zones_allow_external_fillets": false,
"zones_use_no_outline": true
},
"layer_presets": []
},
"boards": [],
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_label_syntax": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"extra_units": "error",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"lib_symbol_issues": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"similar_labels": "warning",
"unannotated": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "Sotar Toaster Relay Board.kicad_pro",
"version": 1
},
"net_settings": {
"classes": [
{
"bus_width": 12.0,
"clearance": 0.4,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
"line_style": 0,
"microvia_diameter": 0.3,
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.35,
"via_diameter": 0.8,
"via_drill": 0.4,
"wire_width": 6.0
}
],
"meta": {
"version": 2
},
"net_colors": null
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"specctra_dsn": "",
"step": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"drawing": {
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"ngspice": {
"fix_include_paths": true,
"fix_passive_vals": false,
"meta": {
"version": 0
},
"model_mode": 0,
"workbook_filename": ""
},
"page_layout_descr_file": "",
"plot_directory": "",
"spice_adjust_passive_values": false,
"spice_external_command": "spice \"%I\"",
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [
[
"62ab9051-fded-466c-9df1-9b40d76dc590",
""
]
],
"text_variables": {}
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment