Thursday, November 11, 2021

RGB shelf lights

 Hi! At most I don't have much time to post here. But I'm trying))

Here is a combination of my KSN20 RGB controller and shelf light endpoint repeaters.

At first, final result:


RGB controller

 

Hi! I like decoration lights, so RGB controllers are "must have" devices for me =)
I decided to make module system, so for any light power I need only different type of repeaters instead of making new controller board for each purpose.

So this is main RGB controller board designed for my KSN20 CAN network:

UPS for smart home =)

 Hi! During apartment renovation I've routed 12V supply wires to all rooms. For a several years this worked without UPS and everything was fine. Recently I've got used Back-UPS CS 500 and finally decided to upgrade power system.

I have a metal electric route box installed at storage room, but inner size of it is too small to fit UPS. So UPS was disassembled and mounted into this box =)


I've surprised that control board has same mounting hole position as main board, so they perfectly fit together.


On these photos I didn't yet connect AC mains and 12V output wires, just test UPS run on battery.

Tuesday, August 24, 2021

Back to work

 Since 2018 I didn't wrote any posts (was busy with family).

Now I'm collecting new materials for posts related to smart home (my long R&D pet project).

Some words about it.

Several years ago I've decided to make my flat smart. But most of devices in production didn't fit my requests and expectations. I want to have full control over device behavior and independence of external cloud services (for scenarios, etc.).

I remember Google cloud failure, when a lot of people couldn't ever switch on/off lights or heating. I don't like wireless technologies related to other than outdoor temperature sensors, also wireless communication may be a honey target for hack. So, critical systems must be wired and isolated from any external intruders.

At 2017 I made first version of module network. UART over current loop. It was slow, really slow. Even on 4800 baud due to slow optocoupler turn-off (~150nS falling and ~1.2mS rising). Version 2020 uses CAN over old current loop, I've improved transceiver schematic that reduced transition delays to ~33nS falling and ~85nS rising edge, so overall baud rate is now 115200 without any packet loss. Also migrating to CAN gave me a freedom of multi-mastering nodes. Also current loop works fine with mixed topology (already tested on overall >100m cable with stubs 5-12m, even not twisted pair).

Yes, I'm going to make support for wireless nodes later. My choice now is RFM69 868MHz due to low bandwith usage (2.4GHz is very noisy now) and hardware AES encrypt engine.

Global profit of this work is that system can work even gateway is down. Most links and node configuration can be made once at install. Gateway/local cloud make this system smart, but if it's down, you can use all devices locally. All nodes have duplicate IO ports for generic switches/buttons or remote panel support.

When I look at modern smart home devices it seems like marketers are making them for sales, not people. 

So I'm trying to make smart home in old school style, where reliability, security and convenience are at first place.

If you want to look some photos, follow me at Instagram @kabansanych. I didn't make special tag for project, it will come soon.

UPD: New tag for Instagram #kssmarthome

Greets to all, Kabanski.

Sunday, January 7, 2018

Another WS2812b VU Meter (Tiny version)

Hello friends!
About a month ago I bought several pieces of WS2812b LED strip. Why not make another VU meter?
I decided to make mini VU meter for single channel which can fit to CFL lamp base.


Saturday, January 6, 2018

Cheap LED string rework (220VAC to 12VDC)

Hi friends!
Before New Year I've searched for a multicolor LED strings to decorate my home. But there was a problem. All strings at our stores must be powered from mains 220VAC. But there are some places at home without mains power outlets due to safety and 12VDC only. And the other reason is poor quality of most these products. Some of them are really dangerous and can burn without any visible reason.
So I decided to make some rework of a cheap LED string.
Click on any photo for full size.

60+60 series LED's work with 12VDC supply

Tuesday, April 25, 2017

Thermal transfer paper DIY PCB test

Hi!
Some days ago I've got another pretty thing from Aliexpress: thermal transfer paper for PCB DIY.
After making some boards with 0.5mm traces with perfect quality, I decided to test capability of this paper and my printer (HP 1020). Main goal was to create home made PCB with 0.25mm traces and 0402 components =)
So here is a test board after etching in ferric chloride:


Left side: 0.33mm traces with ~0.3mm spacing. Right side: 0.25mm traces, ~0.2mm spacing, one 0603 and two 0402 components.

Let's have a close look (click for large images):



Close to perfect for home DIY! Link to Ali store if you're interested.

Sunday, April 9, 2017

MAX7219 Library for 8-bit AVR

Hi friends!
Yesterday I've got my 32x8 matrix module from Aliexpress.
I don't understand need of C++ usage in low-memory chips (most of all I'm using Attiny2313, Atmega48 and Atmega88), so I decided to write my own C library for 8-bit AVR's.

Because I have matrix module, digit mode for MAX chips was not tested.

Features:

  • Per-pixel draw
  • Simple buffer scroll function
  • String render (latin+cyrillic variable character width font included)
  • Easy to implement text scroll
  • Support for both Flash and RAM string sources

Please note: library uses alpha version of AVR SPI library based on Stefan Engelke's code (included). Software and USI SPI not tested.

Here is Atmel Studio 6.2 project:
Download from Google Drive

Wednesday, March 22, 2017

PixelImage 0.4.51

New build of my image converter for embedded projects: *0.4.51* (Windows OS)

PixelImage

New feature: *Color calculator* (RGB,HSV to RGB565 and vice versa)

What's new:

* Changed row alignment rules (read compatible with previous version).
* Removed 4-byte row alignment for flash bitmap export (padding affects RA8875 DMA compatibility).
* Added Color calculator (RGB,HSV to RGB565 and vice versa).
* Bunch of small fixes.

Download at SourceForge


Saturday, February 25, 2017

RA8875 LCD Flash share with Arduino

Hi!
For some time I have fun with 7" LCD display from Waveshare built on RAiO RA8875 controller chip. One of RA8875 great features is DMA support to load images from onboard flash chip.
Real trouble that there is no way to reprogram flash chip after soldering it to board.
Thanks to Waveshare engineers made header for dedicated flash SPI interface! There is no need to solder flash chip to display PCB, you can connect it to this header.

Idea! RA8875 does not use dedicated SPI all the time, only while DMA transfer is active. So why not share flash chip between two SPI buses: RA internal and Arduino?

There are cool IC's: 74LVC1G3157, single analog/digital SPDT switches. So, almost all time flash chip is connected to RAiO SPI, but when needed, it can be switched to Arduino's SPI bus. Switch control pins are connected to Arduino's CS pin.

Monday, February 20, 2017

Fixing Arduino Due R3 not starting bug

Arduino Due is a cool board with ATSAM3X8E microcontroller. But R3 version has a bug: on first power-up (or if power was turned off for more than ~5sec) board mostly will not start, and you have to push "Reset" button to make your sketch work.
I have two R3 boards with same issue. And it's annoying to push button every time =)
Today I've tried to use voltage control supervisor to automate power-on reset process.

We need:

  • MCP100-315 supervisor (I have some of them, another not tested)
  • 1N4148 diode (MCP100 series have totem pole reset output)

Pros. of MCP100 series: cheap, TO-92 case available, and 350ms delay before reset pin becomes high.

So here it is:
Connections
First I tried to connect Vdd pin of MCP100 to 3.3V pin. But threshold was too little and in most case board was in reset state for infinite. I think that MCP100-300 will work fine with 3.3V.

Conclusion.
I've made this fix for all two my R3 DUE's. All of them now start OK.

P.S. People say this bug was fixed in a new version: R3-E.

Monday, November 14, 2016

DIY switch indicator light

Customized light indicator for wall switches.

Holes were made with a piece of tungsten carbide drill with engraving tool. After milling holes were filled with clear glue. LEDs are covered with pieces of opal diffusor and a piece of white thick paper (120 g/m2) for additional light scattering.


Switches control low-voltage signal, no mains voltage is applied. LED's are driven independently by light control unit.

Friday, October 21, 2016

Image Editor/Converter for embedded (MCU-based) projects

Hi! Some time ago I've bought Arduino Due board (based on Atmel SAM3X8E chip) and 4.3'' 16-bit color TFT display. When I started to code graphics output, I've found that existing picture tools not very handy for me. So I've made a helper tool for graphic conversion. After some time, I've decided to make this program open source and add some useful functions.

I've tried to make easy-to-use image editor/converter, and hope I succeeded.

PixelImage
works under Windows (Linux users, sorry...)


If you find this project interesting, please feel free to leave comments and bugreports at sourceforge.

Monday, September 12, 2016

Analog audio via UTP twisted pair

Hi all! Every time I want to listen music from my collection in another room (ex. kitchen), I have to take my tablet, connect it to audio system and setup streaming over WiFi. It's boring.
But what about direct audio from sound card to another room without network transcoding? I know there are devices starting from low costs to high-cost multiroom systems. Not my choice. It is interesting for me to make some kind of "multiroom audio" by myself =)

Analog audio via UTP (unshielded twisted pair) logo

Sunday, September 11, 2016

Buck-Boost LED Driver (34063)

Hi all! Earlier this year I've made improved version of 34063 LED driver. This is combined buck-boost converter witout output voltage inversion. Now I have some time to describe it =)

Buck-Boost noninverting LED Driver 34063

Monday, August 29, 2016

Font Editor for embedded projects

Hi! I've started a new project: Pixel font editor for DIY embedded projects.

Features:

  • Character map generator from any installed font with flexible options.
  • Individual character editor
  • A bunch of code export options:
    • UTFT library support
    • Array for Nokia 3310/1202 LCD's
    • Customized array (byte,bit order, packed character data)


Take a look here:

Monday, August 22, 2016

9V multimeter powered from single AA battery

Hi! Another 9V battery was dead in my 830 multimeter. I've used this situation to make some modifications. I have a lot of half empty AA and AAA batteries, so I decided to power up multimeter from 1.1V (fresh AA/AAA have 1.5V).


DIY solder smoke absorber

Hi! As you could note my hobby is electronics =) So solder station is my frequently used tool. Long time I've used it without smoke absorber. I think that it is really useful thing =) I had a choice: buy it or make it. Of course, the simplest way is to buy, but I'm not looking for simple ways).
So I've decided to make something like this:


Update: Device is complete =)


Tuesday, July 26, 2016

AM2320 library for AVR's without hardware TWI support

Hi! Some time ago I've bought several AM2320 sensors. They have I2C interface, so it is very easy to use them with AVR's that have h\w TWI support. But what about low-end MCU's without full TWI implementation (Tiny2313, Tiny24, etc.)?
First I tried to use USI module for TWI implementation. As for me resulting code was too "fat" for 2Kb FLASH and there was no need for full TWI feature support (the only TWI device in my project was AM2320).

After some time spent on datasheet reading and hardware testing I've wrote a C library for these sensors. Please note that AM2320_ReadData function writes raw data to variables. This notice is actual for negative temperature values, where 0x8000 bit is set.

AM2320 Datasheet

Sunday, January 31, 2016

Driving MOSFET's in a cheap way

Hi all!
As you know MOSFET-s are definitely best choice for switching-mode applications. But in most cases they need a gate driver circuit to work properly (of course, if you don't want o make a heater =)). There are lots of driver IC's, but I decided to go another way and test simple discrete driver.

Few days ago I bought some BJT's: SS8050 and SS8550. they are fast (~150-200 MHz), have high collector current (0.7A continuous, 1.5A pulse). Vce is about 20V (most FET's Vgs value).


So I've made two drivers on a breadboard: N-FET low-side and N-FET high-side with bootstrap.


To drive MOSFET(Q1) 8050 and 8550 BJT's are connected as totem-pole emitter follower. I've tested these drivers with 5V signal source, so I've added an inverting level shifter (Q6, R26). If TL494 (for example) is used as control source there is no need in level shift in most case.

Load was 12V 21W auto lamp (~1.8A). MOSFET was without any heatsink. Control signal: square wave generator with PWM on TL7555 timer with output buffer (74HC04). Frequency: 2KHz to 70 KHz.