Code Monkey home page Code Monkey logo

pine's Introduction

hutscape

Everyday practical home automation projects

Made with open source hardware and software

๐Ÿถ ๐Ÿ— ๐ŸŽ ๐Ÿงบ ๐Ÿ‘œ ๐Ÿ”‹ ๐Ÿ“ฆ ๐Ÿ“ƒ ๐Ÿšช ๐Ÿ’ก ๐Ÿก

Visit hutscape.com.

pine's People

Contributors

sayanee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pine's Issues

Find out KiCad shortcuts

  • drag traces
  • change from front to back layers and vice versa
  • draw traces, drop via, continue on the bottom layer

Comments on routing / layout

from @notthetup

  • M2 drill holes should be non-plated and non-conducting
  • Check the clearance for traces near the drill holes
  • TH for SW1 and SW2 should be non-plated

from @catmaker

  • Link BATT_EN to GND or an FET 75e1301

Without download the datasheet of ATSAM, I can observe you're stressing the PA06 & PA16 (batt & batt_en) pins. Despite the limiting the current with 100kohms, you're back-powering the MCU at whatever batt voltage when the CPU is only at 2.8V. That stress can cause strange behavior over time.

In the past, I read in (I think) Energizer AA Alkaline Spec/AppNote that anything less than 50uA loading is better than its self-discharge (kind of like the battery's shelf-life) and is good for off-state of consumer goods. 4.5V / 200000 = 22.5uA, so that's good. But your LDO consumes > 85uA, not the best. The good ones I've used in the past were Microchip MCP1703 (2uA) and OnSemi NCP170 (0.5uA) These little savings can add up to your longer batt life.

If the batt reader is really a drainer, then the solution is a P-MOSFET at the top-arm of your potential divider, but that needs to pull down to turn on, so an inverting transistor logic might be necessary -- additional components

  • Interchange S and D for symbol BSH203 6327a1a

the symbol for BSH203 looks like source and drain reversed. it's only the letters S & D that are interchanged. for sot23 or other 3-pin smt mosfets, they're pretty much standard. 1,2,3=g,s,d.

  • Remove an extra solder jumper bb0ccd3

JP1 looks redundant when R11 can do the same

  • D3 IR LED needs a series resistor 2239f77

are you controlling current through D3 IRLED with the transistor in linear region? You need to decouple the rail to the LED too, because it is a pulsating drain on the supply. In the past, we treated that NPN as a switch and control current along the LED. Although more expensive (cents) i will lazily use n-mosfet.

LED current is usually limited(controlled) by a series resistor. You can control an NPN current flow by controlling the base-current, multiplied by NPN's hfe, BUT this is exotic and probably not realizable (due to NPN manufacturing tolerances). So the common way is to treat that NPN as a quick on-off >switch<. So to control current, the series resistor is used.

When batt power is low, and you xmit, the power rail is disturbed and possibly MCU is reset/browned-out prematurely. If you look at other similar circuits, the LED (only) is supplied by Vbatt, before the regulator.

@shannietron

  • Add thermal reliefs on the solder jumper pads

not a huge deal, but this pad doesn't have thermal relief.

  • Change to GND or add a FET to the battery measuring circuit 75e1301

the battery sense circuit, the Batt_EN is used to 'turn off' the sensing to save power but Batt_EN is at 2.8V when high. your VBAT is going to be at ~3.7V, and your BAT_EN will be at 2.8V. you'll still have a current flow: 4.5ยตA

Improve component placement

Thanks @notthetup ๐Ÿ™‡โ€โ™€

  • Micro USB jutting outwards or inwards for edge cut
  • Create custom footprint for diode and LEDs to show the direction hutscape/kicad-library@fab1f1f
  • Associate all LED, diodes, Resistors, Capacitors to the new footprint!
  • Label ON / OFF for SW1 on the silkscreen
  • remove the triangle in Micro USB silkscreen
  • Increase height of the PCB edge cut by 1 grid of 25 mils above the battery connectors
  • Label all connected pins of the SWD header
  • Create more space around bigger components for soldering

Connect GND of measuring batt to a digital GPIO pin

Little suggestion for your battery level measurements (you probably just didn't need this optimization yet): You can replace the GND with a GPIO that you ground only when you do the measures and set as output otherwise (high impedance).

~ source

Optimize power savings for power LED

You also have an LED that's always on, maybe that's not mandatory. And it can be nice to double-check that the default state of this "switchable ground" GPIO is set as input by (hardware) default.

~ Source

Add firmware features

  • Record and store IR raw codes, ideal temperature, interval, and duration
  • Measuring battery voltage hutscape/hutscape.github.io@ff755a7
    - need test with used batteries
  • Sleep and wakeup periodically to check the temperature and turn on/off the aircon
  • Display config data from flash if it is already there
  • Record any infrared signal and test it on the web UI before confirming which one is correct
  • Remove 292 signal length to store variable-length signals

Replace schottky diode

Before

30V 2A 430mV @ 2A SOD-123F Schottky Barrier Diodes (SBD) RoHS MBR230LSFT1G

After

Nexperia 30V 2A, Diode, 2-Pin SOD-123F PMEG3020EH,115

Changes to make:

  • BOM
  • Schematic component info: datasheet, part no., vendor link

IR LED is not working

Because 2N222A pinout (used in breadboard) is different from BC817

2N222A

image

BC817

image

Differences

Chip PN222A BC817
Pin 1 E B
Pin 2 B E
Pin 3 C C

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.