Tag Archives: PROTOTYPE PCB

CUSTOM MOSFET PCB

#99 Custom WiFi Mosfet PCB with battery backup

Version 1.0 of the protoboard not as appetizing as the schematic…
Reverse side with thicker black wires for the MosFets.

Creating a a custom 4ch Mosfet switch PCB with a built in backup 12v battery changeover circuit takes some careful planning. Since I had experience working with mechanical relay versions the task was not too difficult however it did come with a few extra challenges.
Mosfets require more parts to work reliably they also have significantly different ratings when compared to relays. In this case I was using an esp8266 with 3.3v logic. I had to create an amplifying circuit out of two transistors in order to get around 6.6V to allow the Mosfets to turn on completely thus allowing me to utilize their max current ratings.

The beginning of prototyping always looks so clean…
Bread Board prototyping is always a good idea before soldering.

On my 4ch PCB I used 3x IRL520N and 1x IRLZ44N N channel Mosfets. The IRLZ44N is the best rated for logic level and also the most expensive and rare here at least at this time. I also needed a large amount of amps for the LED strips it was going to switch on and off. The other three IRL520N Mosfets will be used with applications using under 5A of current. Technically I could have just used TIP120 NPN transistors but I wanted to keep the entire PCB Mosfet compatible in case I wanted to swap out any chips.

Drawing block diagrams by hand help the though process.
Creating a clean schematic in KiCad makes building the board easy.

For more info on the project check it out on Github

WIFI FIREWORK IGNITER

#91 A WiFi battery powered firework igniter

Since I used low voltage with nichrome wire using LAN (RJ45) cable was not an issue. However with the next version I will solder a female RJ45 socket to avoid the hot glue tsunami… 🙂

Creating a WiFi fireworks igniter with a backup LiPo battery.

With December just around the corner I wanted to design a remote fireworks igniter working on WiFi and battery power.

The board will use mosfets as switches to nichrome wire which will heat up and ignite fireworks from a safe distance.

Before completing the PCB

The idea is to have the system self contained with the ability of remote control via a WiFi AP using an ESP8266 12F

The link to my GitHub repository (containing the design, parts list and other files) can be found here.

Nichrome wire
Vape coils containing nichrome wire

DIY BATTERY + WIFI 4CH RELAY PCB

#88 A DIY battery + WiFi relay solution

With the ever growing pains of load-shedding looming over South Africans people have been desperately looking for viable alternative energy and battery powered devices. In my case I needed my remote pepper spray devices to be operational in my laboratory even during extended load-shedding times 4h off with 2h charge times.

I could have purchased added a battery and charging circuit to my existing factory made Sonoff board however that could make the PCB larger and I wanted to build a custom solution instead.

My requirements were WiFi capability, at least 4 relays, li-ion battery powered, battery charger with all the standard protection features and for the device to be powered by 5v from a standard phone charger.

The device must be plugged into the 5v phone charger 24/7, when the electricity goes off the device must continue to operate uninterrupted, when the power comes back on the device must change to the charge state uninterrupted.

The device does not have to send a notification when using battery but it must protect from overcurrent and over-discharge.

While looking for components I came across the ESP8266 PSB 04 module which is basically just the MCU WiFi controller used to switch 4 channels by itself

This was perfect for my application because I am already very familiar with Sonoff devices and in this case I do not mind using the firmware on the esp8266 and the Sonoff application + API software for my automation tasks.

Building around the module was a breeze all I needed was the appropriate relay circuits and a decent charging module.

I ended up creating two prototypes because hey there’s always improvements to be made…

Drill holes for terminals and relays
ESP8266 board with buttons, led and 3.3v regulator
Headers to mount LiPo and ESP8266 boards

The components I used on my final version 1.1 are as follows:

  • 4x Songle 10A relays here
  • 4x BC547 transistors here
  • 4x screw terminals here
  • 4x 1N4148 diodes here
  • 4x red led 3mm here
  • 1x yellow led 5mm here
  • 1x LiPo charger MH-CD42 (IP5306 chip on mine) here
  • 1x USB-A male cable here
  • 1x ESP8266 PSB-B04-CN Module 4-Channel Switch here
  • 1x AMS1117 3.3 800mA regulator here
  • 2x 10uf 25v caps here
  • 2x 100nf 25v caps here
  • 1x 18650 battery holder here
  • 1x old laptop battery 18650 (LGABD11865)
  • 9x 1k resistors here
  • 2x small cable ties
  • Various male and female headers

I tried to make the design as modular as practically possible

There are 3 main parts in the design consisting of a main PCB which contains the battery and relays = complementary components then the WiFi module with buttons and 3.3v regulator is located on a small green PCB and finally the LiPo MH-CD42 module can be secured on the main board via headers.

While constructing I had to use a 1.6mm drill bit for the battery holes and a 1.5mm drill bit for the relay holes. I soldered the SMD AMS1117 reg onto 3 a pin male header for easy through hole placement. The relays and the screw terminals required more attention during drilling and placement of the holes due to their pin layout. I also coated all exposed wires with nail varnish as a make shift solder mask.

I had to add an extra 1000uF capacitor between GND and 5v out of the LiPo module because it would briefly lose power when transferring from USB to battery power

Version 1.0 with lots of hot glue and test points
Version 1.1 board layout

SIMPLE DIY 18650 BACKUP

#87 A DIY simple 18650 backup ups board

After setting up a CCTV system consisting of multiple WiFi cameras placed over my property I noticed that certain cameras were located in areas far away from AC outlets covered by my backup electrical system.

In this project I used some an old 18650 (LG makes the LGABD11865 ) from a laptop power supply. Also I upgraded my 5v charger to a 1.5A to provide enough charging and running current for the camera. The camera I am using is the EZVIZ C3W 1080p WiFi camera

Since Load-shedding has been increasing dramatically I had the need to find cheap simple and reliable power sources for there cameras (12v DC). One important requirement is that the backup system needs to fit into a small area E.G an electrical box on a pole where the camera is located.

While researching I came across the so called mini dc ups device mainly used for backing up WiFi routers at either 9v, 12v, 15v, 24v. however these devices seemed a bit overkill electronically wise and also price wise.

So I decided to opt-in on a cheaper smaller sized DIY version the components consisting of:

  • LiPo charger +DC-DC step-up module here
  • suitable PCB board here
  • 18650 li-ion battery holder here
  • 18650 battery 3500mah here
  • 5v cellphone charger micro-usb here

The components are all soldered onto a 50mm x 70mm 1 sided PCB board.

I noticed that the 4056 IC gets quite warm but doesn’t burn my fingers. The same goes for the coil. The specification is max 1A and the load I was applying was around 0.33mA – 0.670mA

After testing this particular LiPo charger PCB I noticed a few major problems the first being that the 8-pin 4056 LiPo chip is a copy of a copy… the next critical problem is that there is no protection circuitry besides the overcharge/discharge function in the 4056 chip.

This is a big problem since the chip does not switch off completely when low voltage occurs and as a result the load will periodically switch on and off unreliably before finally switching off completely. This oscillation can damage the load.

A solution will be to use a separate LiPo PCB with protection mosfets and a separate booster board.

A better solution
4056H PCB + protection mosfets and DW01-A
B6289Y (MT3608 booster)

DIY ATTINY85 ALARM

#62 SIMPLE DIY ATTINY85 ALARM

Working prototype PCB .

Upon experiencing a few break-ins on the farm I decided to look for a simple alarm system to monitor certain door. For such a simple project a full on alarm commercial alarm system would be overkill.. So I endeavored on the short and fruitful DIY journey.

My system is based on the simple circuit from Great Scott on YouTube. The brains of the circuit is the Arduino programmable Attiny85 MCU. A reset push button, notification LED, arm/disarm toggle switch, notification buzzer and magnetic read switch are the IN/OUT components used.

The project runs on 12 volts (12 volts for the siren) which is filtered down to 5 volts for the Attiny85. My plan is to use a 12 volts 7 ampere lead acid battery combined with a smart charge board to power the project effectively.

After soldering the components onto the board everything worked fine. However the siren was very soft and the 2N2222A transistor was getting extremely hot. This is because the transistor has to provide a ton of current to the siren in order to get it working at 100% capacity. A quick fix is to remove the 1k resistor between Attiny85 pin 1 and the transistors base.(replace it with normal wire) This allows the siren to be louder but the transistor is still hot. A possible permanent solution will be to just use a 5v relay or look for a transistor with a higher current tolerance.

In the end I decided to go with a 5v relay module since it’s a quick reliable solution but is more expensive than a transistor. In a future upgrade I will most likely use a BC517 darlington as referenced by this article. It will be cheaper than a relay and provides more than enough current for a 15W 1 tone siren (380ma).

DATASHEETS