ADS1115 ADC checkout – #1

I have application for an analogue to digital converter (ADC) in a noisy environment, so a possible solution is to place an ADC module very close to the analogue sensors and use some form of digital connection back to a microcontroller. A possible protocol is I2C, and has the advantage that several ADC modules can be attached to the same bus, along with other peripherals Eg LCD.

ads1115-00The above ADS1115 modules have four input channels, 16 bit conversion, flexible input mux, and were available on eBay for less than A$4, so worth a try.
Continue reading ADS1115 ADC checkout – #1

Fan controlled by humidity sensor – pre implementation data gathering

This article documents measurements of temperature and relative humidity (RH) over 10 days prior to implementing the fan solution to provide a baseline for designing the Fan controlled by humidity sensor.

A RC-4HC datalogger was used to collect temperature and RH measurements over 10 days which included a range of late winter weather, some rain, some fine clear days. The logger was located at 1.5m above floor level in the shed in a relatively clear spot in the middle of the area..

Screenshot - 22_08_16 , 15_53_17

Above is a chart of temperature and RH. The daily RH peaks are typically between 08:00 and 09:30, and pretty much coincide with the minimum observed temperature. There is clearly a lag from outside temperature which would tend to be minimum a few hours earlier, and a lower minimum (there were plenty of frosty days in the sample set). Continue reading Fan controlled by humidity sensor – pre implementation data gathering

Time to get some experience with 32bit microcontrollers – some progress

At Time to get some experience with 32bit microcontrollers I wrote that after almost 50 years working with 8bit microcomputers and microcontrollers, I thought it about time to get my hands dirty on some 32bit microcontrollers.

This article reports some work in the STM stream.

I abondoned the ST Discovery board in favour of a low cost basic ST32F103 development board costing about $4 on eBay. The chip is a 32bit microcontroller clocked at 72MHz.

As a learning vehicle, I decided to implement the functionality contained in Arduino thermistor thermometer – a tutorial.

The development environment is Eclipse with the GNU ARM toolchain, a debugger probe, the basic development board, and a 1602 LCD display with I2C backpack and an inexpensive CP2102 USB RS232-TTL interface.

ST32F103-d01

Above is the working trial. The GDB debugger allows On Chip Debugging (OCD).
Continue reading Time to get some experience with 32bit microcontrollers – some progress

Fan controlled by humidity sensor – design technique

This article gives an outline of the process used in designing the Fan controlled by humidity sensor to use my Generic heating / cooling controller design (hcctl).

Arduino thermistor thermometer – a tutorial gave a method for designing a thermometer based on a formula predicting the behaviour of the sensor. This article explains a different approach where that is not possible.

HDS10-02

Above is a characteristic from the manufacturer’s data.

The curves to no lend themselves to simple curve fits, so a cubic spine interpolation will be made based on key points from the curve.

Four our purposes, the mean curve (green) is sufficient for design.

Screenshot - 24_07_16 , 08_16_07

 

Above, the mean curve was digitised to capture the shape of the curve, 17 points were used.
Continue reading Fan controlled by humidity sensor – design technique

Arduino app to set DS1307 Real Time Clocks.

I use a number of implementations of the DS1307 or DS3231 Real Time Clock chip, preferably the latter these days as they are considerably more accurate and compatible with DS1307 code.

In some applications, it is necessary or sometimes just better to preset the clock before connecting it into the application, and the need arises to set the clock ‘stand alone’. The method I have used for this has been clumsy and not as accurate as one might want for the DS3231, so this article describes a new solution.

IMG_1563

The solution uses an Arduino as the engine if you like. Above is an Arduino Pro, but a range of similar Arduinos would be equally suitable. ALso pictured are three RTCs, one connected to pins A2, A3, A4 and A5 providing GND, VCC, SDA and CLK respectively. Continue reading Arduino app to set DS1307 Real Time Clocks.

Fox flasher MkII – high power 2 LED solar powered beacon

Fox flasher MkII – owenduffy.net described an animal deterrent based on an STC 8051 microcontroller and running from a single LiPo cell.

This article describes a further development using a solar cell, shunt regulator, 1S LiPo cell with protection board, and two high power red LEDs.

FF100Above, the unit constructed in a medium size Jiffy box, and a 6V 0.6W PV panel fixed to the top with silicone adhesive. The LDR is fixed to one end with silicone adhesive.

Two SM 1W red LEDs are fitted to opposite sides. They are 120° LEDs, the holes are countersunk to provide for light dispersion and the LEDs clamped to the inside with small brass brackets and heat sink rubber, a little silicone adhesive seals the holes. Continue reading Fox flasher MkII – high power 2 LED solar powered beacon

USBTiny

I bought a USBTiny AVR programmer on eBay for about A$8 posted.

HOT NEW Usbtinyisp AVR ISP Programmer FOR Arduino Bootloader MEAG2560 UNO R3 | eBay - Mozilla Firefox firefox 06/08/2015 , 08:24:12

 

Above, the seller’s pic of the package.

It is almost always the case that the ISP headers on the programmer use the standard pinout published by Atmel, and in that case the supplied ISP cables need to be pinned pin for pin, ie pin 1 to pin 1 etc.

If you look carefully at the pic, the key is towards the top of the pic which means pin 1 on the right hand plug is towards the viewer and pin 1 on the left hand plug is away from the viewer. The cable does not connect pin 1 to pin 1, and as a consequence the package did not work.

6wayDil

There is more than one way to connect these plugs, and above is one way that does connect pin 1 to pin 1, and the cable and USBTiny work. Though the seller has been told of this defect, he continues to sell the item with the pic of the defective cable.

One wonders how many thousands of these things are and will be sold with this defect.

 

A tale of two USB-RS232 adapters

There are a number of USB-RS232 adapters available, among them Silabs, FTDI, Prolific and WCH.

The Silabs CP series adapters have been reliable but not very widely used.

The Prolific adapters are, well, prolific… but given their major compatibility problems and poisoned drivers, they are not a good choice.

FTDI was a good choice until they distributed through Microsoft Windows Update their device poisoning trick to disable chips they thought counterfeit… though they seemed to have backed away from that action.

The new kid on the block is an adapter by Chinese company WCH, chips that appearing in lots of low cost devices, eg Arduino Nano clones with WCH adapters instead of FTDI selling for around A$3+ on eBay whereas the FTDI equipped Nanos are more like A$12.

This article compares the WCH  CH340G and  FTDI FT232RL.

2USBRS232Above are two inexpensive adapters for Arduino boards, the upper one is FTDI based at A$8 each (inc post), and the lower one WCH based at 3 for $3.60 (inc post). Continue reading A tale of two USB-RS232 adapters

Arduino HMC5883 magnetometer – a tutorial

This tutorial shows how to explore an inexpensive HMC5883 3 axis magnetometer module with Arduino.

The magnetometer module can be purchased on eBay at very low cost (<$3), and is an ideal educational project for the budding Arduino practitioner.

It is an ideal low cost project for a first exploration of explore I2C, and the basis for a digital compass. This particular module breaks out DRDY which is useful for interrupt driven applications.

Fig 1
Fig 1

Fig 1 shows the test setup:

  • at the top is a Arduino Pro 328 with Opti bootloader and FTDI adapter for programming;
  • middle is the HMC5883L module; and
  • bottom is a Logic Shrimp for logic tracing.

Continue reading Arduino HMC5883 magnetometer – a tutorial

Arduino stepper motor – a tutorial

This tutorial shows how to explore an inexpensive stepper motor and driver board using an Arduino and included stepper library.

The stepper motor and driver board can be purchased on eBay at very low cost, and is an ideal educational project for the budding Arduino practitioner.

Fig01
Fig 1

Fig 1 shows the test setup:

  • at the top is a Arduino Pro 328 with Opti bootloader and FTDI adapter for programming;
  • middle is a Logic Shrimp for logic tracing;
  • bottom left is a 28BYJ-48 stepper motor; and
  • bottom right is a driver module based on UNL2003.

Continue reading Arduino stepper motor – a tutorial