Showing posts with label PCB. Show all posts
Showing posts with label PCB. Show all posts

Tuesday, 21 October 2025

Testing LoRA transmitters and receivers

I've wanted to have a play with 868MHz LoRA transmitters for some time now but never got around to it until,  a while ago, I did an hardware design and PCB for someone wanting a prototype remote sensor as part of a security system to monitor inclination levels and transmit them over longer distances than WiFi can reasonably achieve.

I chose the Seedstudio Wio-E5 for the prototype connected to an ESP32 S3 and it was succesful as a testbed for further development. 

I know some of you reading this will be saying that you can just buy the HELTEC modules and similar modules but, as usual, I want to learn myself and also use up some of the modules I've bought in the past and never got around to using.

For my own design I wanted a simpler solution that I could use for outbuildings (shed) to monitor the status of the door and also the ambient temperature, the requirements were: -
  • Cheap to build
  • Last a very long time on a battery
  • Have a good range, relative to WiFi
  • Not using Meshtastic just sending a datapacket when triggered
  • Use a DS18B20 Temp sensor
  • Have an I2C connection for other sensors or a screen
For the power control I used the same trigger logic  circuitry I used on my WiFi window/Door sensor  which means that the LDO is enabled when the reed switch opens or closes and when the code is finished sending the datapacket it shuts off the power to itself using a GPIO.

I have made three different variants of the PCB to use different processors: -
  • An adapter PCB to connect an Xiao ESP32-C3 or S3 (or other Xiao module?)


  • A transmitter using an ATMEGA328p

  • An adapter to connect the Wio-E5 to a Waveshare 1.47" Display module based on an ESP32-C6






The other thing I'm testing out for these projects is AI, I've tried ChatGPT for writing Arduino code for ESP32s etc. without much success but I thought I'd try out the new Google Gemini Canvas AI and I was blown away with the code it generated, it's not 100% perfect but unlike ChatGPT it remembers it's mistakes and doesn't make them twice.  It's not a cheap option at £18.99 ($25) per month but you also get 2TB of storage.

Within a couple of hours (total prompt writing time)  I had working code for all three options, the AI sometimes needed help with the different pins used on the different ESPs for serial connections and there were a couple of inconsistencies between the transimitter and receiver code when I switched on encryption of the data packets but by pasting the debug serial code from the PC into the prompt window the AI was able to track down it's mistake and fix it.

One of the biggest time saving things about using the AI to generate the code is that once the screen setup is complete it lays out all the text for you, no more counting pixels to determine where everything goes and when the screen refreshes it creates the code to draw a rectangle over the existing code to clear out any left over bits of text if the newer text is shorter in length.

I also added a web page option to the receiver by just asking the AI to include a web page with the same information that's displayed on the screen.

I will post the code and the PCB details on my GitHub page in the next few days, I'm making some corrections to the ATMEGA 328p version before I publish it to GitHub.







Saturday, 20 April 2013

Chronograph - Part 5

Latest project update for 2026 here


Files
Here are the various files etc. if you want to make your own Chronograph.

Rar file with the files required to make the PCB using Seeedstudio.com are here

A copy of the sketch I'm currently using with my PCB is here, please note it's definitely a work in progress, use at your own risk.

Please note that the connections to the LCD are not the standard ones, I have changed them to suit my PCB requirements.

Items needed
8x2 LCD (16x2 can be used, just modify the code to suit) from here
5V Step-up converter from here
Arduino Mini Pro clone from here (check the pin out is the same prior to buying)
Switches from here

Circuit diagram

PCB

Friday, 19 April 2013

Chronograph - Part 4

Latest project update for 2026 here


The PCBs arrived, at last!

They look good and after assembling the parts, the design works, well I've not tested the 868MHz transceiver yet but the LCD display connected to the Arduino Mini Pro clone works fine and when connected to the sensor fitted to the gun all seems to be OK.

I used a scope to check the calibration of the value sent from the Arduino and it looks pretty good.
Front View - LCD and switches


Back View - the Mini Pro plugged in
Various part plugged in
The PCB is essentially a carrier board for the processor and the display and the 5V step-up converter.
Using an oscilloscope I fired some pellets with my pistol through the sensor tube and compared the timing reported by the Arduino, via serial to the PC, with the measurements taken with the scope.

Scope display showing time between pulses
As you will see from the picture the timings are not exactly the same but this could be due to rounding or the fact that the Arduino only has a 4uS resolution for the micros() function.  I will do some calculations to see what the effect on the final FPS or FPE values would be.



Wednesday, 29 August 2012

All in one Prototyping PCB assembly

The assembly of the PCBs finally got started over the weekend and so far I'm pretty pleased with them, I've spotted a couple of minor issues so far but nothing that can't be fixed with a sharp knife some wire and a soldering iron.

Eagle files can be found here, they are version 2 with the power supply fixed and an added higher power 5V regulator.

So far I've only tried the ATMega 328p and it's peripherals, the ATtiny84 can wait until next weekend.


Firstly I added all the resistors, they need to be quite small resistor, physically that is, as I only used a 5mm lead pitch package.  I then added the voltage regulators so I could check that power appeared correctly at all the places it should do and at the right level.

This is where I spotted my first error, originally I'd planned to feed the 3.3V regulator from the output of the 5V regulator but then for some strange reason I changed it so both regulator inputs were tied together, unfortunately this meant that when the USB to serial (FTDI) was connected it wouldn't supply the 3.3V regulator and therefore the processor wouldn't be powered.

I cut the track from the supply to the input of the 3.3V regulator and wired it to the output of the 5V regulator. this meant that the FTDI 5V was fed into the 3.3V regulator and supplied the processor.


One of the first things I tried when I got the boards was to plug in the GLCD from Jeelabs as I use this quite a lot, luckily it fit perfectly and it even works.


Today the RTC chip arrived with a clock crystal and was soldered in place, not as difficult as I thought it would be.
Added a CR2032, loaded the RTC sketch and used my RTC time setting app for the PC to set the time and it worked fine.

So far so good.....

Saturday, 11 August 2012

328p / ATtiny84/85 Programming Adapter PCB

The Multi programming add-on PCB for my USBTiny programmer arrived today.

Just built one to test.

The ZIF socket came from HongKong via Ebay.

Just connect it to the ISP programming cable from the programmer, make sure the programmer can supply 5V and then you ca program your own boot loaders or sketches and use the Arduino IDE to program the ATtiny84s.

If you want the schematic or PCB files (Eagle CAD) let me know in the comments, also I have some surplus PCBs to requirements so if you want one then I may let some go a cost plus postage and packaging.

Link to the Eagle sch and brd files here.



Monday, 9 May 2011

Free Web based Autorouting software

In my internet travels I came across a really useful site for autorouting PCBs, the application is Java based and runs from the website.
It's compatible with most main PCB design SW like the free version of CADsoft-Eagle and even though it's still in the development phase, its on-line version is free to use.
So if you've got a nice Arduino clone design and you want to optimise the PCB by reducing the amount of vias you have then give it a try, if you haven't got a PCB ready then you can still give it a try with the demo files supplied.
The site can be found here http://www.freerouting.net/

New Accessories for the AirChrony S3

With the increasing abilities of AI it has become so much easier to take an idea to a finished, working item in a really short time. I was t...

Popular Posts