Archive | Arduino RSS for this section

Lora Sensors – Hardware

 What have I been doing during the coronavirus lockdown, well playing with microcontrollers,

WeatherProto

This is a continuation of the experiments with Lora devices and have concentrated on developing nodes for measuring basic conditions inside and extended conditions outside. I have ended up with;

  • ASR6501 based internal devices X 2
  • ESP32 based external Weather station
  • ESP32 based Lora gateway
  • Raspberry Pi 3 Model B Database server
I’m using JSON to encode the data and keeping all results internal. No data is going out into the web. 
I’ll deal with the software in next post so let’s go over the hardware that I have ended up with. 
 

Devices

Started with AVR based devices but moved to the ESP32 due to the extra inputs and integrated LiPo management. Don’t worry, the Adurino board is awaiting an RF Shield from QRPLabs and that will a story for another day.

Internal Nodes

The internal nodes are HTCC-AB01CubeCell Dev-Boards

InternalSensor

 

Features,

  • BME280 Sensor
  • LiPo support
  • LoRa sx1268 

Straight forward operation. Take a BME280 sensor, wrap some sleep code around the reading of the sensor and send on wake. Here is a naked device in the wild;

InternalSensor

The weather station is a low end unit. Im happy to report the devices report temps within stated tolerances to this unit. Yes could be both wrong but at least they are consistent. The battery is a 1100mAh single cell lipo recovered from the recycling bin when we use to go to the office to work. Carefully soldered some leads and away it went. Awaiting new ones with protection circuitry. The node charged it up whilst connected to USB and it has been running for over a week on the end of my desk. Need a case, yes. Who has a 3D printer ?

ESP32 based external Weather station

The external weather station is based on ESP32. Initial testing and code was developed with a DFRobot ESP32 FireBeetle. Final design is using a SparkFun ESP32 Thing

The first picture shows functioning breadboard instance. Below is the schematic;

WeatherStation 001Currently the design supports;

  • BME280 via I2C
  • LoRa SX1278 via SPI
  • DS-15901 Weather Station,
    • wind vane (analogue Input)
    • anemometer (Digital Interrupt)
    • rain gauge (Digital Interrupt)
  • 780X Regulator for external power 
  • Testing supported a SSD1306 OLED via I2C
I have operational software with interrupt driven weather sensors and a BME280 providing humidity, barometric pressure and ambient temperature.
 
Yes, could have purchased a weather shield cheaper that designing my own but then would have missed out on playing with KiCAD and rekindling an interest in basic electronics. There was a bare board available but now it appears only an Arduino version or populated ESP32 version is available. So after reading the schematics for the discounted ESP weatherboard I added additional pins to give flexibility and completed the second input So it has pull up resistors, capacitors for filtering and diodes to protect the inputs. There is a second I2C interface (used by OLED during testing) as well as 8 inputs in 2 banks of 4 inputs with power. Also added support for a 780X voltage regulator to allow 12v connection. I have an old solar cell (BP1259) that is seperate to all other power currently trickle charging a backup battery for my radio. The weather station may end up close enough to tap into 12V so need to drop the voltage to a level the ESP onboard LiPo charger can handle.  
 
Don’t want to use veraboard so used KiCAD and PCBNew to design a PCB. Ordered from OSHPark and still waiting its arrival. The OSHPark PCB process will result in three boards so expect to use the RJ11 interface for varies input devices in other deployments.
 
Currently rewriting the code to use a BME680 thus giving me humidity, barometric pressure, ambient temperature and gas (VOC) levels . Also adding a AS3935 Lightning sensor (via SPI) and will exploited the low power abilities of the ESP32 with deep sleep. Initial code on a ESP-WROOM-32 based device (FireBeetle) board is promising. There are issues with using pins 32-39 to trigger wake up from deep sleep. It will wake but you can’t determine which int its was (returns inf) whilst you can determine who called for the lower pins. Will be using GPIO 15 for the lightening detector and adding a DS3231 RTC module to get around the loss of time between sleeps.
 
It’s still sitting inside until I receive the PCB.

ESP32 based Lora Gateway

Gateway

The gateway between LoRa and IP is a running on a Heltec WiFi LoRa 32 (ESP32 with OLED and SX1278) It is a single channel Lora Gateway. 
The current code is solid. Initially saw issues with reboots and hangs. Followed advice from Jack Purdum book ‘Beginning C for Arduino’ and converted all strings to chars so now seeing no issues. 
 
As it stands, it picks up the LoRa packet, decodes the JSON and sends via HTTP (POST) to the database server. The device is connected to a USB hud and sits on under the table. Works a treat. 

Raspberry Pi 3 Model B Database server

Initially setup the Centos box to host Apache, PHP (7.2) and MariaDB to act as the data store. The device was hosting a REST API that the gateway calls. It takes the JSON, converts into SQL adding to database.
Apache also hosts simple web form the displays the data.
The device was doing nothing except heating up the room so ran up a Raspberry with Ubuntu to act as the database server, moved the api code across and again its doing nothing;
 
DolosLoad
 
This is a single file REST API written in PHP so may not be perfect but functional and currently supporting;

  • HTTP verbs GET, POST, PUT
  • Escapes all data properly to avoid invalid entries 
  • Handles null values to again avoid invalid entries
  • Supports debug and return error states.
The Pi lives in the cupboard connected to the wireless router via ethernet. 
Had to include code to catch invalid data as despite being out in the country see occasional unknown packets. The RSSI indicate a distance away so suspect car remote or garage door.
I will share all code, postman testing calls and device sketches. That will be described in the next post – Lora Software. The code will be released under the ‘Don’t laugh your guts out’ licence.

Deep Sleep

The ESP32 device support deep sleep. This is straight forward in the case of the internal nodes. You setup a wakeup timer then sleep. On wake collect sensor data then send for processing and back to sleep. Bit like work….

Measured;

  • ASR6501 – 90mA awake and 20uA sleep.
  • ESP Thing – 110mA awake and 34uA sleep.

However sleep has been providing challenges for the interrupt driven external node. Currently testing new code with the FireBeetle that supports times sleep and wake on interrupt;

  • observed 10 to 30μA with meter running deep sleep 
  • calculated (100K resistor in series) 34μA during sleep.
  • observed 120mA whilst running the BLE iBeacon example
  • observed 110mA whilst running WIFI scanner example
I dont believe these are absolute numbers as using a cheap meter but it does demonstrate the ease that micro usage can be achieved.
I would also like to add a voltage divider to measure and report the voltage levels.

Learnings

What have I learnt,

  • Don’t use the YURobot power supply. If you do check the 5v line as the 5V regulator failed and presented the input voltage (9v in this case) unfiltered. Dare say 5V would have killed the device but 9v did a corker of a job, all the smoke escaped. This accounted for one TTG. This was not a pointless venture as brought joy to my son who was present.
BME280Sensors
  • Don’t buy the cheap BME280 clone sensors. The Bosh BME280 sensors are square whilst the clones are rectangles. The clones provided temperature pressure but not humidity. They should be described as ‘BMP280’.  I tried varies libraries trying to work out why I could not read humidity. Google revealed they were clones. 
  • A analogueread() call invalidates digitalread()s unless you reinitialise the GPIO. Minor but kept me busy with the CRO trying to work put why I could not read the input.
  • Confused the devices several times with crap code (technical term describing too many serial prints!) requiring manual intervention to re-program.

Conclusion

So the hardware is straight forward. The devices are cheap enough to kill a few whilst playing. Order a couple. Google will help address issues you may see. 

This was a great way to spend weekends when you can’t get out to play radio and avoiding the list of things you should be doing. Now the challenge is to process the data.

Next Lora Software …..

Lora Sensors

Sensor Network

Have been looking at deploying a sensor network for a while now.

Live on land here. My desire is to deploy basic sensors around the block reporting conditions (temp, humidity..) and also to activate relays (water system) or actuators (chicken house door). They will need to be watertight and low power. This is not a surveillance network. Its a sensor network spread across 4ha. The sensors will be distributed across the area with 200m being the longest path.

I have looked at deploying sensors using wireless or Bluetooth but neither were suitable. Either would work but range limited and high power requirements.

Whilst reading Glenn VK3YY’s blog describing LoRa tracker I recognised the opportunity LoRa presented.

LoRa stands for Long Range. This is a wireless Radio frequency technology introduced by a company called Semtech. This technology can be used to transmit bi-directional information to long distance without consuming much power. This is designed for remote sensors which have to transmit its data by just operating on a small battery. The LoRaWAN® specification is for a Low Power, Wide Area (LPWA) networking protocol designed to wireless connect battery operated ‘things’ to the internet in regional, national or global networks, and targets key Internet of Things (IoT) requirements such as bi-directional communication, end-to-end security, mobility and localization services.

Intend to use the (433MHz) LoRa transceiver modules based on SX1268 chips from Semtech Corporation and LoRa protocol for the network layer of my sensor network.

Use of 433MHz is legal to use in Australia without any form of licensing up to 25mW. Also included on Amateur 70cm band 420 – 450 MHz. Primary Service is  ‘RADIOLOCATION’ with Amateur as Secondary.

Difference between LoRa and LoRaWAN

  • LoRa is the modulation technique used in the physical layer of LoRaWAN network. It is basically CSS (Chirp Spread Spectrum) modulation used to provide different data rates using different spreading factors.
    • The basic principle is that information is encoded using chirp (a gradual increase or decrease in the frequency of the carrier wave over time).
    • Before sending a message, the LoRa transmitter will send out a chirp signal to check that the band is free to send the message.
    • Once the LoRa receiver has picked up the preamble chirp from the transmitter, the end of the preamble is signalled by the reverse chirp, which tells the LoRa transmitter that is it clear to begin transmission.
  • LoRa contains only the link layer protocol.
  • LoRaWAN includes the network layer RF, PHY, MAC and Application layer.
Lora the protocol will send what you tell it to. I will be using it to send information between the sensors and gateway (P2P communications) then the gateway will use HTTP over IP (WiFi) to send to application server.

High level view

Here is my proposed private IOT network.

Iot 12022020

Sensors, actuators, gateways and servers.

The network will consists of sensors, actuators, gateways and servers.

1. Sensors:

  • Sensors capture and transmit data to gateways over distances near and far, indoor and outdoor, with minimal power requirement.
  • Sensors will be based on Arduino devices
  • Sensors can be based on ESP32 devices.
  • End-nodes, or sensor devices will use LoRa Modulation (LoRa Technology) as the physical (PHY) silicon layer to create the long-range communication links
  • There is a wide range of input options
    • BME280 – temperature, humidity and atmospheric pressure sensor.
    • CC811 – CO2 and TVOC (total volatile organic compounds) sensor.
    • SDS011 – Dust sensor (particulate matter – PM 2.5 and PM 10).
    • MQ135 – Gas sensor. Has high sensitivity to Ammonia, Sulfide and Benze steam, also sensitive to smoke and other harmful gases.
    • AS3935 – Franklin lightning sensor (voltage divider)
    • https://create.arduino.cc/projecthub/projects/tags/sensor …..
  • Output will be relays or actuators depending on use. A relay can switch a water Solenoid whilst an actuator could close a chicken house door.

2. LoRa Gateway:

  • Gateways send information via Wi-Fi to devices on the TCP/IP Ethernet network.
  • Gateways will receive and send LoRa Technology
  • Arduino compatible device.

3. Application Servers & Cloud IoT Services:

Applications interpret the data collected by LoRa devices. Not sending into Cloud Services initially. Will send APRS WX from external sensors once sorted.

The application server in this case will be a device salvaged from a dumpster running Linux hosting a MySQL database displaying the information via Apache (LAMP Stack).

Devices

The sensor nodes will be based on Arduino,ESP32 and ASR605x (ASR6501, ASR6502) controllers.

Use LoRa Ra-02 module SX1278 (433Mhz) modules where not incorporated.
Use Audrino IDE for sketch development and uploading
FirstSketch bb

NewImage

The LoRa gateway will be based on Heltec micro controller.

This device is supported by Arduino GUI and has onboard OLED, WFIF and LoRa. There is also battery management abilities.

  • WiFi LoRa 32 (V2) from Heltec Automation
    • Microcontroller  ESP32 @ 240MHz
    • WiFi                  WIFI802.11 b/g/n/e/i
    • LoRa chip         SX1278
    • Bluetooth          BLE
    • Flash                8MB
    • RAM                 320KB
    • Display             0.96 inch 128*64 OLED

Highlights;

  • Fully supported by Arduino IDE
  • Lithium: Battery socket for Heltec boards is SH1.25-2 (JST 2P-1.25 (JST connector with 2 pins, separated each other by 1.25mm)
  • Vext 3.3V(500mA) output, for external devices (e.g. sensors) power supply, in deep sleep mode, Vext can be shut down via software
  • $30AUD delivered

Anyway so off I went.

Ordered some BME280 sensors and a couple of the CubeCell dev boards. The intent is to deploy outside. This setup will be able to run off a 18650 3.7V 1200mAH lithium polymer Battery.

Started to program with the devices and sensors I have here. Had all-ready ordered a WiFi LoRa 32. The built in Display, WiFI and Lora interfaces  for $20 was too hard to pass.

This data is not going to any cloud IoT services. Ultimately will expand to exploit select IOT cloud services but intent is to keep it internal.

I’ve used JSON ‘encoding’ for data being sent. There are a lot of reasons not to use JSON. Im using JSON to support device IDs.

LoRaWAN provides headers that support device identification. Had a go at Cayenne Low Power Payload (Cayenne LPP) encoding. Worked as described in the tutorials. It is used as payload for the TTN so a lot of material around. For now I did not want the overhead of LoRaWAN just for device ID so using JSON for the payload and adding own device control. Yes JSON is fat. Same data is 21 bytes using Cayenne whilst JSON comes in at 65 bytes.

When it comes time to send to IoT services it will be straight forward to pass the JSON to Cayenne then to via LoRaWAN to said service.

The use of JSON is also consistent with conditions of the Amateur licence. Not encrypted, clear text. No privacy concerns with clear text out here. Remote private network broadcasting current conditions in clear text. Dare say of little interest to Mr Potato Head.

Typical Data Packet;

 data={“id”:2,”t”:21.6,”h”:71,”b”:1007.5,”d”:0,”gps”:[-37.691,144.009]}

Also the size of the JSON data in bytes for the JSON string and RSSI from the gateways point of view are sent.

Decided not to use the Heltac library, not because it was not enticing but wanted to ensure compatibility across wider devices so open libraries used. Used the LoRa library from Sandeep Mistry. The Heltec library is identical

HTTP GET to PHP script on Centos server. Not happy with using GET. Again based on the Heltec examples as it worked.

PHP used for the script on the LAMP server to store the data in a MYSQL database.  Based on existing routines and works well. No presentation layer. Just working routines for now.

So currently (8 Mar 2020) Two sensors are sending data.

Here are the contents of two tables;

NewImage

So the basic functionality is present however, the gateway hangs after a couple of hours use. Suspect I have a buffer over run. Currently checking code as suspect its my error. I have Mega 2650 Mini available so will order another couple of SX1278 boards and create a gateway to see if its a hardware issue

I’ll go into detail of each step and link pages here;

So, more to come but initial efforts demonstrate a sensor network using Arduino and LoRa is more that achievable.
 
Allen
 

Libraries

Of Interest;

Notes:

Arduino Sensors – Sender

Arduino Sensors – Test Sender

NewImage

IMG 3224

This is the code for the test devices based on Arduino UNO.

The Duemilanove has hard coded values while the UNO a sensor.

This is the code for 1 (Duemilanove with no sensors).  As the sensors come in will be adding to the sketch and simply un commenting the required calls for the target device.

The posted data log like this,

http://Jupiter/processIoT.php?data={“id”:2,”t”:24.3,”h”:59,”b”:1007.5,”d”:0,”gps”:[-37.691,144.009]}&rssi=-86&size=65

Again, I want the same code for the Arduino and the ESP based boards.  

 

#include "DHT.h"
#include <SPI.h>
#include <LoRa.h> 
#include <ArduinoJson.h>
 
#define DHTTYPE DHT11
const int DHTPin = 8;
DHT dht(DHTPin, DHTTYPE);
 
int counter = 0;
 
void setup() {
 
  Serial.begin(9600);
  Serial.println("LoRa JSON Sender");
  
  // DT11 Sensor
  pinMode(DHTPin, INPUT);
  dht.begin();
  
  //RA02 Module
  if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }else{
    Serial.println("Starting LoRa Success!");
  }
}
 
void loop() {
 
  // Setup 
  StaticJsonDocument<128> doc;  
 
//  float h = dht.readHumidity();
//  float t = dht.readTemperature();
 
  float t = 21.5;
  float h = 75;
  float b = 1000;
  
  // ID. Match to DeviceInfo table
  // 1 = Duemilanove no sensors
  // 2 = UNO with DF11
  doc["id"] = 1;
 
  // Sensors or preset 
  doc["t"] = t;
  doc["h"] = h;
  doc["b"] = b;
  doc["d"] = -1; 
  
  JsonArray data = doc.createNestedArray("gps");
  data.add( -37.691);
  data.add(144.009);
 
  String output;
  serializeJson(doc, output);
  
  LoRa.beginPacket();  
  LoRa.print(output);
  LoRa.endPacket();
 
  if (1){  // Check what was sent
    // Decode JSON and print serial 
    serializeJsonPretty(doc, Serial);
    Serial.println();
  }
 
  delay(150000);
}

QRPLabs QCX 5W CW single band transceiver

QRPLabs QCX 5W CW Single band transceiver

Another Arduino basd project, well not quite. The Arduino Uno is a microcontroller board based on the ATmega328P. This kit from QRPLabs also uses the ATmega328P. The software is not open source. Updates are provided as hex files.

This kit is extremely well documented. It is worth buying and assembling just for the documentation.

The assembly instructions are very clear and contain operation theory and alignment process.

Once assembled the device would not start. According to the excellent troubleshooting doc the processor had not been reset.

I had performed the modification for reliable microcontroller startup (repurposing inductor L5) during assembly so turned to the troubleshooting manual for direction. First was to go back and  check components then touched up the soldering around the processor and crystal and she started Ok.

QCXBuild

Next was to follow the assembly manual and align / tune then update the firmware. Again wth the excellent instructions there were no issue here.

Update Firmware from Mac;

I’m going to update the firmware from Mac using avrdude.

Purchased a USBAsp AVR programmer locally. It has a 10pin connector so get a 10 to 6 to match the ISP interface on the QCX or use dupont connectors like I did.

There are instructions on the QRPLabs site for win process for using  but No I want to use my Mac. Again Google is your friend. Given allready have XCode installed, I decided to just install avrdude and use the command line.

Install avrdude on Mac OSX.

Process is straight forward.

Open a terminal session and install Homebrew;

ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” < /dev/null 2> /dev/null

Then install avrdude;

brew install avrdude

So the software is installed.

First Plug in the USBASP and verify the computer can see it (About->System Report) then check avrdude can see the QCX;

Allens-Air:QRPLabs allen$ avrdude -c usbasp -p atmega328p
avrdude: warning: cannot set sck period. please check for usbasp firmware update.avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: Fuses OK (E:FC, H:D1, L:F7)
avrdude done.  Thank you.

Noting the warning message. A quick Google revealed this is not an issue and there is a parameter you can pass to avrdude to skip skip the check so not worried, Ok then lets flash the device;

Allens-Air:QRPLabs allen$ avrdude  -c usbasp -p ATmega328P -U flash:w:T1.00f.hex
avrdude: warning: cannot set sck period. please check for usbasp firmware update.avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)avrdude: NOTE: “flash” memory has been specified, an erase cycle will be performed         To disable this feature, specify the -D option.avrdude: erasing chipavrdude: warning: cannot set sck period. please check for usbasp firmware update.avrdude: reading input file “T1.00f.hex”avrdude: input file T1.00f.hex auto detected as Intel Hexavrdude: writing flash (32076 bytes):
Writing | ################################################## | 100% 21.78s
avrdude: 32076 bytes of flash writtenavrdude: verifying flash memory against T1.00f.hex:avrdude: load data flash data from input file T1.00f.hex:avrdude: input file T1.00f.hex auto detected as Intel Hexavrdude: input file T1.00f.hex contains 32076 bytesavrdude: reading on-chip flash data:
Reading | ################################################## | 100% 16.32s
avrdude: verifying …avrdude: 32076 bytes of flash verified
avrdude: safemode: Fuses OK (E:FC, H:D1, L:F7)
avrdude done.  Thank you.

thats it done  ! Now running version 1.00f. 

From here I intend to go through the troubleshooting instructions with my new oscilloscope and explore the device.

W8TEE and K2ZIA Antenna Analyzer

Another Arduino based project. This time an W8TEE and K2ZIA Antenna Analyzer.

AABench

Purchased the PCB from https://qrpguys.com/w8tee-k2zia-antenna-analyzer

Not a kit so sourced the components. Easy to order from china off eBay. Took about 2 weeks for all the bits to come in.

Assembled and she started but the SWR for a 51ohm dummy load was off the scale.

The audrino and screen are ok. Checked and double checked solder joints so needed to verify the DDS and SWR bridge operations.

My old Dick Smith device is not cutting the mustard so borrowed an oscilloscope from Lacky VK3ALM. Traced the signal into the SWR bridge and nothing out. Checked the components and well my bad as the 51ohm resistors were in-fact 51K ohm. Bit of a difference. Replaced and off she went !

Downloaded the latest WA2FZW software from IOGroups – https://groups.io/g/SoftwareControlledHamRadio/files/Improved%20Analyzer%20Software

The documentation and a debugging guide are available from this group, essential information.

AAHoused

Use a case from radio parts (CB8808). Yes there is a pimple in the middle. No intention to remove as works fine.

So far have scanned all my antennas at home. I can recommend this device. Not a kit but the process to source and assemble was fun.

µBITx

DSCN9461

HF SIGNALS started shipping the μBITX boards (or micro BITX) December 2017. This is a a fully wide-band 3 to 30 MHz transceiver with upper and lower sideband and CW, power up to 10 watts and solid digital control. The circuit boards come wired and tested and with all the hardware. An interesting component of this radio is the Radino. This board has a Arduino Nano controller and a Si5351 for all local oscillators.

Radio Description – http://www.hfsignals.com/index.php/ubitx-circuit-description/

uBITX Net – great source of uBITX information.

groups.io has a group for the varies BITX projects.

Wiring Up

I chose not to use the plastic case that it came with or to print a 3D but instead purchased an universal enclosure from Amateur Radio Kits (INKITS). It took 6 weeks deliver, which was not unexpected.  These things take time and worth the wait, The case is excellent value. Metal and came with additional installation hardware including PCBs for the external connections.

uBITx wiring – http://www.hfsignals.com/index.php/ubitx-wire-up/

Case Manual – https://groups.io/g/BITX20/files/UBITX%20CASE%20MANUAL%20%20PCB%20FRONT%20PANEL.pdf

uBITX Net has a list of updates to make.

Initial build photo below. Have added additional wiring for ground issues and wired in USB interface. Will get a photo next time case off. Will be soon enough 

Wiring 003

 Digital to the Left, Analogue to the right. Pin 1 to the left

Boards 

Update – VU3SUA case documentation –  https://ubitx.net/2018/08/03/vu3sua-case-documentation/

Used the front panel board that came with the case. Proved to be convient and tidy but still not without its challenges. You will need to follow Sunil Lakhani on facebook to gain pictures of the boards, assembly tips and info for the board

Wiring 002

Encoder

The encoder is not straight through.   

1<->1,2 <-> 4,3<-> 3, 4 <-> 2

 

Encoder

CW Paddle

You need to add two resistors to support a CW paddle. Follow the directions on uBit.net.  

PaddleModFirmware Upgrade

Worked as advertised. Again checkout ubitx.net – http://ubitx.net/compare-software-options/ 

Decided to go with KD8CEC firmware – http://ubitx.net/wp-content/uploads/2018/04/ug1072_087.pdf

Get the latest from https://github.com/phdlee/ubitx

Install Arduino software, if not already installed. Install the USB drivers for the Arduino compatible board (CH340 serial interface) used by Radino for MacOS here 10.9+ or here 10.12.

Download the firmware files from GitHub, compile and upload to the Radino.

Bingo so now you have a HF  full source code for the HF transceiver on your computer. That is cool in initself. 

I ended up running version 1.08. Manual – http://ubitx.net/manual-kd8cec-firmware/

Upgrades

The board is v3. I want to address the T/R click noise and add an CW Audio Filter. Also saw pcbs for filters based on Glenn VK3IL’s blog.

Nick VK4PLN uBITX Add-On boards – https://vk4pln.blogspot.com/2018/03/vk4pln-ubitx-add-on-boards.html

Kess ND6T uBitX Add-On boards – http://www.nd6t.com/index.htm and ordering instructions in BitX20 group.

To Do

Calibration 

Calibration of these devices appears to be a black art;

Notes

 

Noise

I still have noise UBitxAudio.m4a when using the speaker. Headphones are Ok. It appears too be a Ground Loop problem.

Deployed common ground via a star config which improved the audio however still have the noise when using the speaker.  

GroundStar

Current solution is to stick to headphones and use the device.

Update 03082018

Updated the pic to show grounding. The brown wire goes to the common on front panel board. Still noisy.

There is a lot of information as to audio available uBitx.net and iGroups.

Conclusion

This is a fun radio.It’s cheap, it works and requires very little skills to  get operational.

Think will source another board. The uBitX v4 boards have no Audio IC On the board. 

Options;

 

Arduino Sensors

Arduino Sensors

Specialist Devices

45 in 1 box Sensor Kit

S l300

I’ve picked up one of the 45 sensors kits from eBay.This kit contains;

1.Arduino PS2 joystick module
2. Infrared sensor receiving module
3. Laser head sensor module
4. Temperature and humidity sensor module
5. Infrared emission sensor module
6. 5V relay module
7. Avoidance of the sensor Intelligent car infrared sensor photoelectric switch
8. ARDUINO finger detection heartbeat module
9. High sensitivity microphone sensor module
10. Metal touch sensor module
11. Flame sensor module
12. 3-color LED module
13. Hunt sensor module
14. Linear magnetic Hall sensor
15. Rotate the encoder module
16. Active buzzer module
17. Magic light cup module
18. Small passive buzzer module
19. Digital temperature sensor module
20. Light Breaker Module
21. Temperature sensor module
22. Two-color LED total negative module 3MM
23. Mercury opening module
24. Hall magnetic sensor module
25. 3-color full-color LED smd module
26. Arduino mini reed module
27. Tilt switch module
28. Colorful flashing LED module
29. Push the key switch module
30. Photoresistor module
31. Vibration switch module
32. ARDUINO percussion sensor module
33. Temperature sensor module
34. Analogy Hall Magnetic Sensors
35. Microphone sound sensor module
36. Large reed module
37. Two-color LED module
38, breadboard power module
39, ultrasonic module
40, MP1584EN step-down module
41, SD card reader module
42, gyroscope module
43, soil modules
44, DS1302 clock module
45, water level module

The “user manual” that comes in the case is a picture in the lid for a 37 in one kit so will work through each one at a time.

Manual from Jaycar for some of the sensors 

Libraries:

Notes:

  • The digital pins 0 and 1 are used for serial communication. As long as you aren’t doing serial communication (including uploading sketches), you can use them for other purposes but you loose the ability to communicate and up load sketches.
  • The analogue pins are for analogue input only not analogue output. You can use them like any other pin by referring to them as pins 14 to 18. They can be a digital input or a digital output.
  • Arduino works with 5 V and Rasp Pi with 3.3 V. Add a resistor divider to lower the voltage to something between 2.2 and 3.4 Volt. At divider with a (bottom) 3K3 and a (top) 2K2 resistor will divide the 5V to 5x(2.2+3.3)/3.3= 3V, so yes its possible to use many of the modules, but they are probably designed for 5V devices.

4. Temperature and humidity sensor module

LM315 Temperature and Humidity Module

  • Humidity Range: 20-90% RH 
  • Humidity Accuracy: ±5% RH 
  • Temperature Range: 0-50 °C 
  • Temperature Accuracy: ±2% °C 
  • Operating Voltage: 3V to 5.5V

The DHT11 humidity and temperature sensor appears to be an easy to add humidity and temperature data. Such a device will fit into the current ideas of a ‘sensor net’ which include home environmental monitoring (internal and external) as well as a garden monitoring systems. Given the dual information in a single chip and use of a single data line then is may included on the base board for all sensors.Will need to look into sourcing the chip seperatly

 

DHT11

TempHum

Libraries:

Current Code

#include <dht.h>

dht DHT;

#define DHT11_PIN 7

void setup(){
Serial.begin(9600);
}

void loop()
{
int chk = DHT.read11(DHT11_PIN);
Serial.print(“Temperature = “);
Serial.println(DHT.temperature);
Serial.print(“Humidity = “);
Serial.println(DHT.humidity);
delay(2000);
}

Future:

Simple code with interface to LCD;

#include <dht.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

dht DHT;

#define DHT11_PIN 7

void setup(){
lcd.begin(16, 2);
}

void loop()
{
int chk = DHT.read11(DHT11_PIN);
lcd.setCursor(0,0);
lcd.print(“Temp: “);
lcd.print(DHT.temperature);
lcd.print((char)223);
lcd.print(“C”);
lcd.setCursor(0,1);
lcd.print(“Humidity: “);
lcd.print(DHT.humidity);
lcd.print(“%”);
delay(1000);
}

 

Notes:

Arduino Bluetooth HC-06

Arduino Bluetooth HC-06

Bluetooth HC 06

HC-06 Wireless Serial 4 Pin Bluetooth RF Transceiver

Description:

  • Bluetooth module for use with any microcontroller.
  • Uses the UART protocol to make it easy to send and receive data wirelessly.
  • A breakout board for easier connectivity
  • Designed for 3.3v level ttl but will accept 5v level as well
  • Built in antenna with a range of up to 30 feet (range is dependent on a lot of things such as any obstacles or walls in the way so it may vary)
  • Supports baud rates from 1200 to 1382400 bps (default is 9600 bps)
  • VCC input voltage 3.3v to 6v
  • Bluetooth Specification v2.0+EDR
  • The HC-06 module is a slave only device. This means that it can connect to most phones and computers with bluetooth but it cannot connect to other slave only devices such as keyboards and other HC-06 modules. To connect with other slave devices a master module would be necessary such as the HC-05 version which can do both master and slave.

Connections;

  • Connect the HC-06 Ground (GND) pin to ground (duh!).
  • Connect the HC-06 VCC pin to 5v.
  • Connect the HC-06 TX/TXD pin to Arduino digital pin 4.
  • Connect the HC-06 RX/RXD pin to Arduino digital pin 2.

The Software Serial library comes pre-installed with the latest version of the Arduino IDE. It has been developed to allow setting up serial communication on (almost any) digital pin of the Arduino, using software to replicate Arduino’s native serial support. See the SoftwareSerial library page for more details on its features and limitations.

Datasheet – http://silabs.org.ua/bc4/hc06.pdf

Conclusion:

Unfortunately this device does not work with iOS based devices.There is no workaround. HC-05 simply doesn’t work with iOS, because iOS only supports a few Bluetooth profiles. This is because Apple uses MFi Licensing Program. What does work is BLE. It’s not part of MFi.

HM-10 and HM-11 are the BLE brothers of HC-05/06, and rumor has it that they work fine with iOs and Android

18102017 – Ordered an HM-10. Wil not bre requiring every device to have BlurTooth capabilities but do want a iOS interface so will have on the internal master.

Nordic nRF24L01

NRF24L01+ 2.4GHz Antenna RF Wireless Transceiver Module

S l1600

NRF24L01+ Specifications

  • NRF24L01+ 2.4GHz Antenna Wireless Transceiver Module
  • Maximum operating speeds up to 2Mbps, GFSK modulation efficiency, Anti-interference ability, Particularly suitable for industrial control applications.
  • 125 Channels, Multi-point communication and frequency hopping to meet the communication needs.
  • Available software to set the address, only received local Address when output data(Provide interrupt instruction), can be directly connected to a variety of microcontrollers
  • Built-in hardware CRC error detection, Multipoint communication address control.
  • Standard DIP Pitch Interface for embedded applications
  • Low-power 1.9 ~ 3.6V, only 1uA on Power down mode
  • Built-in 2.4Ghz antenna
  • Size:34mm * 17mm(L*W)

24L01Pinout 800

Connection to Arduino

 

RF24View

RF24 Connect

Libraries:

Others;

 

Conclusion:

This device will be the preferred method for device intercommunication. Intend to use the work described by manicbug as a basics.

Do not expect issues but will be watching RF interference as host an HF amature radio station at home.