Tag Archives: DIY

RADAR SENSORS

#130 A Few DIY Radar Sensors

Testing the current (multimeter was used for accurate uA measurments)

One sensor that’s been incredibly useful to me is the radar sensor. Over the past few years I’ve made quite a few different versions with great results and many improvements especially in power consumption. One of the most useful features is the ability to place wood or plastic over the entire sensor effectively covering the entire unit from sight. This allows the device to be placed covertly in very effective positions. The biggest issue is ensuring the alarm signal can be transmitted from these locations and that’s where LoRa technology comes into play.

My first wireless Radar prototype used a 12V 23A battery and used a lot of power

RF 2.4GHZ and 433MHz,Wifi and LoRa are some of the most well known and common low bandwidth digital wireless communication methods, of course we could use a classic analogue radio to send digital square wave signals like the very early alarm systems but that tends to make the device a power hog and increases the size of the device however more power can also have great pros like increasing the transmission and, having less interference affecting the signal and even some level of immunity to jammers.

My second radar sensor rechargeable uses less current and made use of deep sleep but still not good enough for me…

However I always focus on low power and low current applications I want my sensors to do the job in remote areas with solar power or hefty batteries running them for years without breaking the bank.

During my journey I started with basic breadboard projects moved to more permanent perfboard and strip board projects and eventually started creating fully fledged PCBs for these devices. I encountered various problems like matching antennas to increase the transmission effectiveness, waterproofing and powering the devices with solar and batteries, the effect the blazing hot African sun has on enclosures outside for years, consuming the least amount of current and running the microcontrollers in the most effective configuration suited to their purpose and I can go on.. there’s always something new to learn and I bet there will be even more advancements in Radar technology assuming solar flares or nuclear war or maybe even aliens don’t destroy our electronic and electrical technologies. we have our ancestors to thank for creating and sharing this power with us over the many many decades and hopefully we will eventually evolve to colonize the stars… well ahem I guess that’s a bit ironic coming from a South African but ideas are stronger than any country government or religion I can only hope we keep moving forward.

Front view of my 3rd radar sensor uses 100uA when in deep sleep mode and about 600uA when running and around 10mA when TXing for about 1.2s. Uses HC7333 regulator and a rechargeable LiPo battery. SYN1115 used to TX ASK alerts. Rd-04 Module Ai-Thinker X-band radar is used.
Back view

DIY ENEGIZER

#128 making a simple energizer

Since I’ve been living in a rural area for the past few years I’ve had to come up with some affordable solutions to problems unique to my situation. One of these problems is keeping animals out of certain areas with methods that wont cause permanent harm but will definitely be effective. So the logical solution was to use electricity in the form of electro shocks. I searched for commercial solutions and found a few but they were a bit overkill/overpriced and of course not very hacker friendly… so I decided to make my own which I can always scale up with microcontrollers/relays/monitoring and all those nice to have features but for this one I wanted it to be plain old dumb without any programming required.

So I did my research and came up with a suitable schematic found the correct parts and settled on the good old 555 timer. Designed a very small PCB and got it manufactured a voila the idea became a reality and after a few tests it works perfectly fine.

Now the shock is created by the collapsing fields of the ignition coil I used for the project. I got the most basic simple coil that is driven by a suitable N-FET at a frequency and strength that I can fine adjust via a potentiometer on the PCB. The whole system runs on a 12V battery and consumes very little current.

I took inspiration for this device and modified and created my own flavour. Like everything in life no one can do everything by themselves so I would like to credit the source which got me started here.

With that being said I had a lot of fun making this device and it’s been working well I was also able to adjust the voltage to a very humane jolt so smaller animals know not to enter the area but also don’t get fatally hurt.

CUSTOM UPDI PCB

#124 Making a Custom Programmer

Fake CH340N IC on the left real on the right

While looking for a good example PCB project I decided upon a simple UPDI programmer PCB for the well known new ATtiny ICs.
I had a few prerequisites I wanted to satisfy for the project.

  • Design must work but also have room for improvement
  • small SMD PCB design
  • BOM list and prices
  • simple schematic using KiCad
  • 1206 component size sop-8 IC size
  • USB-C
  • 2 sided PCB
  • all standard sizes for PCB manufacture
  • PCB panel example
Front
Back

I wanted the project to cover many of the basic and intermediate PCB manufacturing practices of course the IC is not very sophisticated and there is no impedance matching or equal length traces etc. However it shows how designing, quick and affordable manufacturing can be achieved in South Africa. Designing for manufacturing, thinking of the capabilities of the manufacturer and keeping best practices in mind at least to the best of my knowledge at that specific time.

In the project I keep things as standard as I can using metric measurements and easy milling panel design for the panel (no fancy curved edges or designs) although many interesting looking designs can be made surprisingly simple, it takes experience plus CAD artistic intuition. That being said I wanted this to be a simple and practical example I could use for teaching references later.

Getting to the component choices for a small UPDI programmer I chose the CH340N IC. It needs very little external components and has an internal crystal. Small and lightweight and perfect for my UPDI project. It is missing other pins like the reset pin but in my case this was not an issue. Always double check your IC datasheets and capabilities.

KiCad modal front
KiCad modal back

On that note I did receive some FAKE CH340N ICs and I tested them. They only worked on lower baud rates and adding LED indicator resistors to the TX and RX made them unstable. Unfortunately in this day and age fake ICs are very common you need to recognize them and weigh the balance between using them or not. Sometimes there’s a “good fake” so as a maker I may use this test projects or make throwaway projects but the characteristics of the IC are now different so any calculations are incorrect… so it’s a balancing act that no-one can escape. For production always use IC’s from the original manufacturer the stores are easily found online and it’s worth it in the end.

Simple schematic

All other components are very basic 1206 (easy to solder) SMD capacitors, resistors, TX/RX LEDs, power indication led, a diode 16-pin USB-c connector with 5k1 sense resistors keep the PCB copper balanced on both sides also saves etching chemicals for the manufacturer I also added some example fiducials and the copper stops 1mm from the edge of the PCB creating a small protection layer all around.

Since there is a USB-C connector I chose not to include any ESD or fuse but I would add these components to a commercial variant.

Also this v1.0 has the TX/RX LEDs on the wrong indication pins. I would change them to the USB side instead.

Overall I think it’s a good introductory example showing a simple design including some errors and fixes.

Panel front
Panel back
KiCad panel back

DIY UPDI PROGRAMMER

#117 A DIY UPDI plug and play board

Making fast and crude but reliable programmers

When getting into the new ATtiny series (tinyAVR-0 tinyAVR-1 tinyAVR-2 IC’s) of microcontrollers a few years ago I noticed how easy it had become to program them with only a few extra components.

I started out with just a 4.7k resistor and a cheap CH340 programmer. Then 3 wire hook-ups later I could easily program my IC’s. The only downside was that I had to sacrifice the UPDI pin to the dedicated Pin gods.. so I couldn’t use that pin unless I wanted to make my life more difficult.

Well this was okey for me and ever since I always have the UPDI pin open only for programming. So all my designs incorporate this principal. If I really need more pins I would use an affordable IO expander IC.

Now with that being said it’s all good and well programming with a mini rats nest… but I wanted to create a simple plug and play DIY programmer with commonly available parts and plug and play compatibility.

So I came up with a small circuit that’s easy to build on stripboard. I created a few versions over the years. Since I was the only one using this contraption I didn’t think of creating a professionally made PCB but that will come in future..

Front of the stripboard
Back of the stripboard

How do I use this?

Basically I solder the SMD package ATtiny to a suitable breakout PCB then I plug the ATtiny breakout PCB into my programmers female headers making sure the orientation is correct and presto all I need to do is upload my firmware. Then I can just remove the PCB and Plug it into my project

Simple and to the point… plus it’s been working for years.

DIY LORA MODULE

#115 Making A DIY LoRa Module

2x DIY LoRa RFM95W modules with adapter boards.

When taking a closer look at the DIY aspect of lora I wanted to test LoRa peer to peer.. E.G multiple peers to one peer (NOT LoRa WAN) I noticed that the actual radio PCB is difficult to use when going the traditional through hole way… adapter boards do exist but are few and far between at least in SA. you can make your own for manufacture but then rather create your entire product PCB for manufacture.

Even with this drawback I was able to source old adapters for one of the very firs modules the: RFM95W. In South Africa we are mostly using 868Mhz although 433Mhz modules are around I don’t see them being super common in terms of LoRa modules.

The modules I used have a footprint for adding a female SMA connecter for easy antenna connecting.

Parts used:

  • 2x RFM95W 868Mhz LoRa module transceiver
  • 2x 3.3v active buzzer
  • 2x 1 pole dip switch
  • 2x TP4056 module with protection ICs
  • 2x ATtiny404 MCU
  • 2x NCV8163 3.3V LDO
  • 2x SSD1306 128×32 OLED
  • 2x 2pin 2.5mm JST battery connector
  • 2x Headers and jumpers
  • 2x 13400 3.7V 550mAh
  • 2x 10k resistors
  • 2x 220R resistors
  • 2x SOIC to DIP adapter PCB
  • 2x BC547 transistors
  • Some 0.9mm tin plated copper wire
  • Some 0.255mm PVC insulated wire
Soldering made slightly easier…

After checking the PCB I commenced with testing the devices. Unfortunately the test area has largely mountains terrain
the signal works really well and penetrates better through foliage on the mountains terrain but once there is a full on mountain in the way the signal stops. so in this retrospect the devices are better then a radio which was quite interesting but makes sense because data is being sent and uses less bandwidth then interpreting voice audio. Also the error checking for LoRa helps a lot.

Some more pros for the LoRa is that its a transceiver out of the box with RSSI functions included. Also for increased range and/or quality the spreading factor and signal bandwidth can be adjusted.

Although there’s many pros regarding LoRa I still tend to use simple 433.92 RF modules without issue at least in my situation with rural areas under about 3KM at and given point.

So it really becomes more of a cost factor than anything else. Although I’m happy selling a custom LoRa product for compatibility with LoRa WAN or some other requirement with a similar principal. Plain old generic RF is still cool in my book.

Back of one of the PCBs

NEMTEK REMOTE CONTROL

#82 Remote control and monitoring NEMTEK LCD18

During summer there’s been a ton of rain this year and my electric fence alarm keeps going off
The 2 main reasons are lots of water and crazy grass growth around the property.
It’s been impossible to use weed killer because it rains so often it’s all just washed away.

So I decided to install a remote switch as well as a sensor to alert me if the siren is blaring off.

For the switch I used a SONOF RE5V1C DC powered relay. This device costs under R100.00 and can be powered by 5v DC, the switch can handle 10A of DC or SV loads up to 240V.

SONOF RE5V1C

For the alarm siren sensor I used an SONOFF DW2 Wi-Fi wireless door/window sensor. I de-soldered the magnetic switch and just soldered 2 wires to the pads. Now when the siren goes off a 12v relay will close the relay and the DW2 will report a closed event. The DW2 cost R115.00

SONOFF DW2 Wi-Fi

The great thing about this project is the price and the usage of the SONOFF software and MQTT service. There is no need to create my own firmware or MQTT software by using these affordable SONOFF products.

CREATING A DIY RELAY

#81 Building a 12v relay on a cheap PCB board

Completed relay

While working on one of my projects I needed a 12v relay unfortunately I did not have one on hand and was not about to pay for 1 relay plus shipping.

Luckily I had all the components at hand:

1 green and 1 red led
2x 470 ohm resistors
1x 1k resistor
1x 1N4007 diode
1x bc547 transistor
1x 12v relay
Some solid alarm wire
Very cheap rectangular PCB

For a 5 volt version just replace with a 5v relay and 2x 100 ohm resistors for the LEDs.

Unfortunately the PCB I had was very cheap and I could not fit the screw terminals I had so I had to squeeze them in.
I also used thin alarm wire as i did not need to switch high amps but luckily everything worked out in the end.

It was a bit messy but next time I will use a better quality PCB that doesn’t burn tracks when making solder bridge tracks.

The BC547 also allows switching with 3.3 volt logic but remember to supply the 12v

MIG WELD ATTEMPT

#72 Learning to MIG weld

While living on the farm I couldn’t help but notice the necessity of a welder. From fixing gates to fixing vehicles and setting up fences. Creating burglar guards and security gates. These are all musts especially in the dangerous rural areas in South Africa.

So I endeavored on my welding journey, looking for the best welder for a beginner. After months of research I decided on the MAC AFRIC 180 A IGBT (MIG & MMA) Industrial welding machine. It has (120A=100%, 150A=60%, 180A=35% ) duty cycles.







I purchased the machine from Adendorff

After setting up and practicing a few beads I got the hang of it, Just need to improve my bead and reduce splatter. More practice.

My first bead… quite a hot mess.
Second bead (on the other side) much better but still needs work…




Very happy with this option as a first timer welding steel.

DIY VEROBOARD TOOL

#64 DIY VEROBOARD TOOL

While working with electronics one of the easiest PCB boards I have found to work with is the horizontal stripboard. When using this type of board it is important to cut the tracks in a reliable fashion with adequate clearance veroboard cutting tool by Vero. This is a staple tool in the art of PCB prototyping but… it can be unnecessarily expensive. So I created a simple DIY version.

Factory made version.

Here is a small explanation of the process. Also take a look at this link which explains which are the best drill bits for a DIY veroboard trace cutter.

soft broomstick handle with 3.5mm drill bit epoxied in place.

Use a broom handle (or soft wood in a cylindrical shape) a 3.5mm drill bit and some epoxy.

In my case the price was 86.4% cheaper then buying one from the shop in South Africa.

Let the epoxy set in a smooth position (or as smooth as I could get it…)