A low cost break-out board for STDC14

It is now near impossible to procure a genuine STLINKV2 or a good clone. Newer versions of STM32CubeProgrammer will not work with poor clones.

In pursuit of a small inexpensive replacement for the STLINKV2, the STLINKV3-MINIE is a candidate. That said, they can be difficult to source… mine is on 9 months wait from element14.

Above is the STLINKV3-MINIE (~$20). Continue reading A low cost break-out board for STDC14

Programming a PIC 12F510 using the DIY-150 programmer

A correspondent asked how to program a PIC 12F510 used in one of my projects using his DIY-150 programmer.

The DIY-150 programmer is quite an old design and there has been no development for more than 10 years, meaning no new chips added, though there are lots of online sellers of the now stale design.

The 12F510 is very similar to the 12F509 which microbrn v150807 does support. The 12F510 can be programmed by selecting chip type 12F509.

Alternatively, download the archive below and extract a modified chipdata.cid file which includes a 12F510, and extract it to replace the existing installed file.

The revised chipdata.cid can be downloaded here: chipdata.7z.

Review of inexpensive Chinese thermostat – DST1000

The DST1000 targets the market for inexpensive digital thermostats, the most popular being the STC1000. The novel features to the DST1000 is that it uses  a DS1820B digital temperature sensor (well probably a Chinese clone).

The problem with thermistor based thermostats is that they commonly have significant error, and although most firmware allows the user to enter a calibration adjustment, it is a fix at one temperature and does not solve the problem that the thermistor equation implemented in the firmware does not match the behavior of the thermistor. In my experience, calibrating at 20° might result in an error as much as 5° at 80°, unacceptable for lots of wide ranging applications.

It is sold with brief and inadequate / incorrect user instructions. Two were purchased to give a good chance one would work, and you guessed it, only one worked. The lower display segment of the first digit did not work on the fautly one, and the seller thought that was not a problem. The seller frustrated attempts to obtain a refund for the faulty unit.

Above, the seller’s pic of the DST1000. Continue reading Review of inexpensive Chinese thermostat – DST1000

Garden environmental telemetry project – part 5

Garden environmental telemetry project – part 1 laid out plans for a simple maker / DIY IoT garden environmental telemetry system.

This article documents a change to the sensor configuration and payload formatter adding another temperature and humidity sensor for the greenhouse.

The sensors are now:

  • ID=1 air temperature and humidity;
  • ID=2 soil temperature and humidity.
  • ID=3 greenhouse temperature and humidity.

The payload contains an 8bit payload version number then six 16bit values for the six sensors. This is parsed by the TTN uplink formatter.

RS485-LN firmware has been upgraded to v1.4. Continue reading Garden environmental telemetry project – part 5

Garden environmental telemetry project – part 4

Garden environmental telemetry project – part 1 laid out plans for a simple maker / DIY IoT garden environmental telemetry system.

This article documents a change to the sensor configuration and payload formatter in preparation for another RS485-LN.

The sensors are now:

  • ID=1 air temperature and humidity;
  • ID=2 soil temperature and humidity.

The payload  contains a 8bit payload version number then four 16bit values for the four sensors. This is parsed by the TNN uplink formatter.

function decodeUplink(input) {
  var payver=input.bytes[0];
  switch(payver){
    case 1:
      return {
        data: {
          field3: ((input.bytes[3]<< 8)|input.bytes[4])/10,
          field4: ((input.bytes[1]<< 8)|input.bytes[2])/10,
          field5: ((input.bytes[7]<< 8)|input.bytes[8])/10,
          field6: ((input.bytes[5]<< 8)|input.bytes[6])/10
        },
      warnings: [], // optional
      errors: [] // optional (if set, the decoding failed)
      };
    case 2:
      break;
    }
  }

Above, is the Custom Javascript formatter which writes the measured values into variables fields3-field6 of the data object.

To be continued…

Garden environmental telemetry project – part 3

Garden environmental telemetry project – part 1 laid out plans for a simple maker / DIY IoT garden environmental telemetry system.

Earlier experiments highlighted the disadvantage of analogue sensor connections. This article reports tests on sensors connected using digital signals.

Above is the Dragino RS485-LN LoRaWAN end node, about $90 incl shipping. In this application it will be used to read two MODBUS sensors (each with two data channels) and forward the data to The Things Network via LoRaWAN, then after some processing, RESTFUL submission to Thingspeak. Continue reading Garden environmental telemetry project – part 3

Garden environmental telemetry project – part 2

Garden environmental telemetry project – part 1 laid out plans for a simple maker / DIY IoT garden environmental telemetry system.

This article reports tests on three sensor configurations, all using a Pt100 sensor with 4-20mA converter.

This article reports

  • Pt100 remote from a 4-20mA converter (ie long Pt100 3 wire wiring);
  • Pt100 with co-located 4-20mA converter (ie long 4-20mA loop wiring);

Pt100 remote from a 4-20mA converter (ie long Pt100 3 wire wiring)

The 4-20mA sensor is 8m of CAT5 cable from the Pt100 element. The Pt100 signal sensitivity is about 400µV/° @ 15° (25000°/V).

Above, some experiments in AC powering and earthing shows the analog sensor chain prone to noise. The first half of the display is powered from a small power bank (18650 cell with switched mode boost converter). The second half is with the 5V derived from a DIN rail mount Chinese 230VAC power supply (copy of Meanwell MDR-2–5), not the quietest of output. Continue reading Garden environmental telemetry project – part 2

IoT – exploration of LoRaWAN – part 4

My experiments with LoRaWAN were cut short by the announcement that The Things Network (TTN) was to discontinue its V2 network in favour of a new V3. This coincided with Laird’s decision to manufacture region specific versions of its gateway, and all existing equipment was designated US region and would not directly support frequency plans used here in Australia.

After some years there is a solution. Newer firmware for the RG191 supports the more generic Semtech basic forwarder and protocols for TTN to configure the RG191 frequency plan… so it is possible to connect the RG191 to the North American server (instead of the AU server), and configure the gateway in TTN for Australian frequency plans, and it all comes together. Continue reading IoT – exploration of LoRaWAN – part 4

Garden environmental telemetry project – part 1

This is the first in a series of articles describing a simple maker / DIY IoT garden environmental telemetry system. The project is a derivative of IoT water tank telemetry project – part 1, and some of the optional components are as per that project (eg battery / solar power).

Plans are to explore some different kinds of sensors including analog and digital connection types:

  • Pt100 remote from a 4-20mA converter (ie long Pt100 3 wire wiring);
  • Pt100 with co-located 4-20mA converter (ie long 4-20mA loop wiring);
  • MODBUS soil sensor (temperature and humidity).

The measurements of this (get) and an another project (bme280r) are posted to the same Thingspeak channel (https://thingspeak.com/channels/436449 at this time).

Above is a screenshot of the Thingspeak channel. Continue reading Garden environmental telemetry project – part 1

CG K/ J/ S/ B to 4-20mA 0-1800 Celsius Thermocouple Converter TC Input 4-20mA Output Head-mounted Temperature Transducer – first impressions

CG K/ J/ S/ B to 4-20mA 0-1800 Celsius Thermocouple Converter TC Input 4-20mA Output Head-mounted Temperature Transducer.

So the concept is that one can program the transducer module for a range of input sensors, and lower and upper limits to the conversion range. Another significant benefit is that it does cold junction compensation (and it does not seem possible to disable it if you wanted).. Continue reading CG K/ J/ S/ B to 4-20mA 0-1800 Celsius Thermocouple Converter TC Input 4-20mA Output Head-mounted Temperature Transducer – first impressions