Tiny House project - Jeremy: Difference between revisions

From Sensors in Schools
Jump to navigation Jump to search
No edit summary
 
(95 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Download 580*580*580 Close box SVG file ==
'''This box is used to test the thermal performance of a model Tiny House'''
* This box is used to test the thermal performance of a model Tiny House.
 
* Box designed using MakerCase.
= Photo/Video Library =
* Click on '''Download SVG''' to create and download your box
 
[https://photos.app.goo.gl/wCWKwJe3hQmQZXyk9 Photo/Video Album]
 
= MakerCase 580*580*580 Close box SVG file =
 
Creation of pt-1 of the scale tiny house box
 
== MakerCase ==
 
Go to [https://en.makercase.com/#/ MakerCase]
 
Click on '''Simple Boxes'''
 
Change Units to '''Millimeters'''
 
Change With to '''580''' Change Height to '''580''' Change Depth to '''580'''
 
Ensure '''Outside''' is selected for ''Are these inside or outside dimensions?''
 
Ensure ''Material Thickness'' is '''3mm'''
 
Ensure ''Open or closed box?'' is '''Closed'''
 
Change ''Edge Joints'' to '''Finger''' and set ''Finger Size'' to '''51'''
 
Your settings should look like this
 
[[File:Screenshot 2023-07-09 142842.jpg | 900px]]
 
Then select '''Download Box Plans'''
 
== Adjusting parameters ==
 
You should see a pop-up with this picture in it
 
[[File:Box plan.jpg | 900px]]
 
Adjust Line And Spacing settings to match the ones below
 
[[File:Lables and spacing.jpg | 900px]]
 
Adjust Line Formatting settings to match the ones below
 
[[File:Line formating.jpg | 900px]]
 
Adjust Kerf settings to match the ones below
 
[[File:Kerf.jpg | 900px]]
 
Then select '''Download SVG'''
 
Finally rename the downloaded file to something better/more suited
 
= Inkscape Editing =
 
Open the aforementioned file in Inkscape and proceed to do the following things ([https://inkscape.org/release/inkscape-1.2.2/ Download Inkscape])
 
== Adding Pages ==
 
In Inkscape change view mode to '''View -> Display Mode -> Outline''' so you can see the box sides
 
[[File:View change.jpg | 900px]]
 
Create 6 pages with the dimensions '''600*600mm''' by selecting the '''Create and edit document pages''' icon in the left toolbar
 
[[File:Add Pages.jpg | 900px]]
 
You can also add labels to the pages
 
[[File:Rename pages.jpg | 900px]]
 
All 6 pages
 
[[File:Seperate pages.jpg | 900px]]
 
Align the 6 pages
 
== Un-group & Align ==
 
Select the design then select '''Object -> Ungroup'''
 
[[File:Ungroup.jpg | 900px]]
 
Align separate sides onto their own page
 
[[File:Center on pages.jpg | 900px]]
 
Delete labels
 
[[File:Delete label.jpg | 900px]]
 
'''Optionally after deleting the labels add smaller 1-2 letter labels in the corner of each side'''
 
== Adding access hole ==
 
Add access square with the dimensions 131*131mm to the to-be front panel
 
[[File:Somthing.jpg | 900px]]
 
Center the square on the front panel
 
[[File:Center.jpg | 900px]]
 
== Fixing parameters ==
 
Set Stroke Style to 0.01pt on all objects
 
[[File:Stroke style.jpg | 900px]]
 
Change Stroke Paint
 
[[File:Stroke paint.jpg | 900px]]
 
= Insert Creation =
 
This is the creation of pt-2 of the scale tiny house box
 
== MakerCase ==
 
Go to [https://en.makercase.com/#/ MakerCase]
 
Click on '''Simple Boxes'''
 
Change Units to '''Millimeters'''
 
Change With to '''574''' Change Height to '''180''' Change Depth to '''180'''
 
Ensure '''Outside''' is selected for ''Are these inside or outside dimensions?''
 
Ensure ''Material Thickness'' is '''3mm'''
 
Ensure ''Open or closed box?'' is '''Closed'''
 
Change ''Edge Joints'' to '''Finger''' and set ''Finger Size'' to '''30'''
 
Your settings should look like this
 
[[File:Insert.jpg | 900px]]
 
Then Select '''Download Box Plans'''
 
== Editing parameters ==
 
And edit the parameters to be the same as below
 
[[File:L&S.jpg | 900px]]
 
[[File:L&F.jpg | 900px]]
 
[[File:K&C.jpg | 900px]]
 
Then select '''Download SVG'''
 
And rename to something better/more relevant
 
== Editing insert in Inkscape ==
 
Open the file in Inkscape
 
[[File:Open in inkscape.jpg | 900px]]
 
Add new page and size to fit
 
Rearange with new page
 
[[File:Rearange.jpg | 900px]]
 
Remove labels
 
[[File:Remove lables.jpg | 900px]]
 
Edit Stroke Style
 
[[File:Stroke Style.jpg | 900px]]
 
Add 131*131mm cutout
 
[[File:Adding cutout.jpg | 900px]]
 
= Final SVG files =
 
These are pictures of the final SVG files
 
== Main Box ==
 
[[File:Screenshot 2023-07-07 150255.jpg | 900px]]
 
== Box Insert ==
 
[[File:Screenshot 2023-07-07 150238.jpg | 900px]]
 
= Laser Cutting =
 
Making the digital SVG files into a cardboard/wood box
 
== Software ==
 
Put SVG files into your laser cutter software
 
[[File:20230705 113322.jpg | 900px]]
 
Then Cut!
 
[https://photos.app.goo.gl/XgmBE7c9AvpT4Mww8 Video Of Laser Cutting]
 
== Assemble Laser Cut Side Panels ==
 
Connect all side panels into their according locations and stick together
 
[[File:Pt-1.jpg | 900px]]
 
Add top panel but '''DON'T STICK DOWN''' (For Later Access)
 
[[File:Pt-2.jpg | 900px]]
 
== Adding Insert ==
 
Assemble and add insert without sticking down
 
[[File:Insert-pt-1.jpg | 900px]]
 
= Creating Sensor Board =
 
Solder in place in order
 
[[File:Pt-0.jpg | 900px]]
 
[[File:Pt-1-1.jpg | 900px]]
 
[[File:Pt-2-2.jpg | 900px]]
 
[[File:Pt-3.jpg | 900px]]
 
[[File:DHT22.jpg | 900px]]
 
[[File:Pmb bottom.jpg | 900px]]
 
[[File:Pmb top.jpg | 900px]]
 
[[File:Wire1.jpg | 900px]]
 
[[File:Wire-2.jpg | 900px]]
 
[[File:Wire-3.jpg | 900px]]
 
The tape is just to relive the solder joints of stress (because my battery holder solder joint disconnected)
 
[[File:Wire4.jpg | 900px]]
 
[[File:20230718 172959.jpg | 900px]]
 
== Final Sensor Board ==
 
[[File:20230718 173016.jpg | 900px]]
 
= Programming The Pycom LoPy 4 =
 
[[File:20230725 174332 HDR.jpg | 900px]]
 
Some code examples for the Pycom
 
== LED ==
 
<nowiki>from time import sleep
from machine import Pin
 
led = Pin('G16', mode=Pin.OUT, value=0)
 
for i in range(4):
    led.toggle()
    sleep(1)
led(1)</nowiki>
 
== RGB-LED ==
 
<nowiki>import pycom
from time import sleep
 
pycom.heartbeat(False)
pycom.rgbled(0x0000ff) #green
sleep(2)
 
for cycles in range(10):
    pycom.rgbled(0x00ff00) #green
    sleep(2)
    pycom.rgbled(0xffff00) #yellow
    sleep(2)
    pycom.rgbled(0xff0000) #red
    sleep(2)
 
sleep(2)
pycom.rgbled(0x000000) #off</nowiki>
 
== Sleep ==
 
<nowiki>import time
import machine
 
time.sleep(1) #sleep 1 second
time.sleep_ms(10) #sleep 10 milliseconds
time.sleep_us(10) #sleep 10 microseconds
 
machine.sleep(100, True) #light sleep 1 second
machine.deepsleep(1000) #deep sleep 1 second</nowiki>
 
== GPIO-Output ==
 
<nowiki>import time
from machine import Pin
 
led = Pin('P9', mode=Pin.OUT)
 
for i in range(5):
    print("high")
    led.value(1)
    time.sleep(1)
    print("Low")
    led.value(0)
    time.sleep(1)</nowiki>
 
== GPIO-Input ==
 
<nowiki>import time
from machine import Pin
 
led = Pin('P9', mode=Pin.OUT)
button = Pin('P10', mode=Pin.IN)
 
while True:
    if(button() == 1):
        led.value(1)
        sleep(1)
        break
    else:
        led.value(0)</nowiki>
 
== ADC ==
 
<nowiki>from machine import ADC
 
adc = ADC(0)
adc_c = adc.channel(pin='P13')
adc_c()
adc_c.value()</nowiki>
 
ADC-Calibration
 
<nowiki>from machine import ADC
adc = ADC()
 
Output Vref of P22
adc.vref_to_pin('P22')</nowiki>
 
== LED-Brightness ==
 
<nowiki>import pycom
from time import sleep
 
pycom.heartbeat(False)
 
value = 000000
end = '0x'
 
for i in range(9):
    value = value + 101010
    product = (end+str(value))
#    print(product)
    pycom.rgbled(int(product))
    sleep(1)
 
for i in range(9):
    value = value - 101010
    product = (end+str(value))
#    print(product)
    pycom.rgbled(int(product))
    sleep(1)
 
pycom.rgbled(0x000000) #off</nowiki>

Latest revision as of 01:08, 5 August 2023

This box is used to test the thermal performance of a model Tiny House

Photo/Video Library

Photo/Video Album

MakerCase 580*580*580 Close box SVG file

Creation of pt-1 of the scale tiny house box

MakerCase

Go to MakerCase

Click on Simple Boxes

Change Units to Millimeters

Change With to 580 Change Height to 580 Change Depth to 580

Ensure Outside is selected for Are these inside or outside dimensions?

Ensure Material Thickness is 3mm

Ensure Open or closed box? is Closed

Change Edge Joints to Finger and set Finger Size to 51

Your settings should look like this

Then select Download Box Plans

Adjusting parameters

You should see a pop-up with this picture in it

Adjust Line And Spacing settings to match the ones below

Adjust Line Formatting settings to match the ones below

Adjust Kerf settings to match the ones below

Then select Download SVG

Finally rename the downloaded file to something better/more suited

Inkscape Editing

Open the aforementioned file in Inkscape and proceed to do the following things (Download Inkscape)

Adding Pages

In Inkscape change view mode to View -> Display Mode -> Outline so you can see the box sides

Create 6 pages with the dimensions 600*600mm by selecting the Create and edit document pages icon in the left toolbar

You can also add labels to the pages

All 6 pages

Align the 6 pages

Un-group & Align

Select the design then select Object -> Ungroup

Align separate sides onto their own page

Delete labels

Optionally after deleting the labels add smaller 1-2 letter labels in the corner of each side

Adding access hole

Add access square with the dimensions 131*131mm to the to-be front panel

Center the square on the front panel

Fixing parameters

Set Stroke Style to 0.01pt on all objects

Change Stroke Paint

Insert Creation

This is the creation of pt-2 of the scale tiny house box

MakerCase

Go to MakerCase

Click on Simple Boxes

Change Units to Millimeters

Change With to 574 Change Height to 180 Change Depth to 180

Ensure Outside is selected for Are these inside or outside dimensions?

Ensure Material Thickness is 3mm

Ensure Open or closed box? is Closed

Change Edge Joints to Finger and set Finger Size to 30

Your settings should look like this

Then Select Download Box Plans

Editing parameters

And edit the parameters to be the same as below

Then select Download SVG

And rename to something better/more relevant

Editing insert in Inkscape

Open the file in Inkscape

Add new page and size to fit

Rearange with new page

Remove labels

Edit Stroke Style

Add 131*131mm cutout

Final SVG files

These are pictures of the final SVG files

Main Box

Box Insert

Laser Cutting

Making the digital SVG files into a cardboard/wood box

Software

Put SVG files into your laser cutter software

Then Cut!

Video Of Laser Cutting

Assemble Laser Cut Side Panels

Connect all side panels into their according locations and stick together

Add top panel but DON'T STICK DOWN (For Later Access)

Adding Insert

Assemble and add insert without sticking down

Creating Sensor Board

Solder in place in order

The tape is just to relive the solder joints of stress (because my battery holder solder joint disconnected)

Final Sensor Board

Programming The Pycom LoPy 4

Some code examples for the Pycom

LED

from time import sleep
from machine import Pin

led = Pin('G16', mode=Pin.OUT, value=0)

for i in range(4):
    led.toggle()
    sleep(1)
led(1)

RGB-LED

import pycom
from time import sleep

pycom.heartbeat(False)
pycom.rgbled(0x0000ff) #green
sleep(2)

for cycles in range(10):
    pycom.rgbled(0x00ff00) #green
    sleep(2)
    pycom.rgbled(0xffff00) #yellow
    sleep(2)
    pycom.rgbled(0xff0000) #red
    sleep(2)

sleep(2)
pycom.rgbled(0x000000) #off

Sleep

import time
import machine

time.sleep(1) #sleep 1 second
time.sleep_ms(10) #sleep 10 milliseconds
time.sleep_us(10) #sleep 10 microseconds

machine.sleep(100, True) #light sleep 1 second
machine.deepsleep(1000) #deep sleep 1 second

GPIO-Output

import time
from machine import Pin

led = Pin('P9', mode=Pin.OUT)

for i in range(5):
    print("high")
    led.value(1)
    time.sleep(1)
    print("Low")
    led.value(0)
    time.sleep(1)

GPIO-Input

import time
from machine import Pin

led = Pin('P9', mode=Pin.OUT)
button = Pin('P10', mode=Pin.IN)

while True:
    if(button() == 1):
        led.value(1)
        sleep(1)
        break
    else:
        led.value(0)

ADC

from machine import ADC

adc = ADC(0)
adc_c = adc.channel(pin='P13')
adc_c()
adc_c.value()

ADC-Calibration

from machine import ADC
adc = ADC()

Output Vref of P22
adc.vref_to_pin('P22')

LED-Brightness

import pycom
from time import sleep

pycom.heartbeat(False)

value = 000000
end = '0x'

for i in range(9):
    value = value + 101010
    product = (end+str(value))
#    print(product)
    pycom.rgbled(int(product))
    sleep(1)

for i in range(9):
    value = value - 101010
    product = (end+str(value))
#    print(product)
    pycom.rgbled(int(product))
    sleep(1)

pycom.rgbled(0x000000) #off