DHT11 Temperature and Humidity (hydrometer) sensor – Example with source code for Arduino

DHT11 Temp/Humidity sensor attached to an Arduino Uno.
I recently tried out the DIYMalls DHT11 temperature and humidity (DHT11) sensors with an Arduino Uno. With simple 3 wire set up (+5 volts, ground, and data) and the Adafruit DHT library, it was super simple to get readings streaming over the serial monitor.

Example code is as follows:

 

// Must install Adafruit DHT library and unified sensor library.
// Code below borrows heavily from their example code, but distills it down to the bare minimum.
#include <DHT.h>

// Connect the yellow/Signal/data line to pin 4
// Connect the GND/black line to GND
// Connect the Red/VCC line to 5V

#define DHTPIN 4
#define DHTTYPE DHT11


DHT dht(DHTPIN, DHTTYPE);

void setup()
{
  Serial.begin(9600);
  Serial.println("DHT11 test!");
  dht.begin();
}

void loop()
{

// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
float h = dht.readHumidity();
// Read temperature as Fahrenheit (isFahrenheit = true)
float f = dht.readTemperature(true);

Serial.print(F("Humidity: "));
Serial.print(h);

Serial.print(F("% Temperature: "));
Serial.print(f);
Serial.println();

delay(2000);
}

ELP Synchronized Stereo Camera module (ELP-USB960P2CAM-V90)

ELP Bare circuit board camera module with dual cameras.

This is the ELP-USB960P2CAM-V90, a dual camera with synchronized shutters on a single board. It streams side-by-side stereo pair images at maximum resolution of 2560 x 960 pixels [1280×960 for each image].  It is amazing what you can get for $80 on Amazon.   This module and a few hours of calibration and programming with OpenCV will get you a reasonable depth math / 3D vision setup.

It enumerated on my Linux system as a UVC 1.0 camera as follows:

usb 1-2: New USB device found, idVendor=32e4, idProduct=9750, bcdDevice=21.03
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-2: Product: 3D USB Camera
usb 1-2: Manufacturer: 3D USB Camera
usb 1-2: Found UVC 1.00 device 3D USB Camera (32e4:9750)

Albert Armea walks you through the basics, including calibration using an older version of this module that was basically two different cameras on a USB hub (so they were not well synchronized and you had to open each camera independently) here:
https://albertarmea.com/post/opencv-stereo-camera/

For testing purposes, I didn’t even bother to calibrate the cameras, I just opened the stream, chopped it down the middle to get a left and right image, and passed that right into the SterioBM object.  sterio_camera_demo_code.zip

Extracting private data from Android apps

Occasionally, an android application will store data inside its private data store, and not make that data visible to other applications. Sometimes you really really WANT to access that data (such as an ISS transit of the sun which you recorded).  It is possible to use debugging mode to “back up” the apps data, and then extract the backup file to get access to the individual files.  Here is an example of doing this, using the Zwo Seestar app as my example.

Continue reading

Dwarf Lab Dwarf 2 vs ZWO Seestar S50 Solar shootout

I took my Dwarf Lab Dwarf 2 and my ZWO Seestar S50 smart telescopes outside and imaged the sun.  Here is a 1:1 pixel side by side comparison of the results (click for full sized image):

Side by side shots of the sun by both the Seestar S50 and Dwarf 2 smart telescopes.

Unlike in the daytime lunar shootout, the Seestar automatically acquired the sun, giving it both the image quality and ease of use wins.    Here are the two videos showing my procedure and the GUI for each smart telescope’s phone app:

Dwarf Lab Dwarf 2 vs ZWO Seestar S50 DAYTIME lunar shootout

I took both of my smart telescopes outside this morning and shot some images of the moon in the daytime. I have a video that outlines the session (Dwarf2 won for user experience, SeeStar won for image quality) here:

Here they are side by size at 1:1 pixel size (click for full size):
Side by Side images of the moon shot in the day time by the ZWO Seestar S50 and Dwarf 2 telescopes.

And here are two of the raw images for you to look at as you would like:

Dwarf 2 image of the moon in daytime

Dwarf 2 image of the moon in daytime – click to see the raw/full sized image.

Seestar S50 image of the moon in the daytime

Seestar S50 image of the moon in the daytime – Click to see the raw/full image

Is your camera image sensor dirty, and if so, how do you clean it?

Do you have dust and foreign particles on your camera’s image sensor?  If you have an interchangeable lens camera body, you probably do. But in many cases, a few random specks of dust won’t be detectable in normal photography.

However, if you have visible spots showing up in your images, you know it’s time to clean your camera image sensor. For example, in this closeup of the N2A Goodyear Blimp, if you look closely at the end of the black hand drawn arrows, you can see the results of dust on the image sensor of my second-hand A6300 camera. [Obviously, all dust is the fault of the first owner, and I can keep claiming that until after I clean it.]

Photo of the goodyear blimp, with small dust spots evident in the photo.

Now that you know there are at least a few pieces of dust/debris on your image sensor, you can characterize just how bad the problem is by shooting a “flat” image.  Point your camera towards a clear patch of sky, put the lens in manual focus mode and defocus it, and take a photo that is just slightly over exposed. [Note that to take a true astrophotography flat you need to do more than this, but for the photos below I didn’t bother. You risk having cloud shapes show up in your flat image by not having a tight white cloth over the lens….but since we are just looking for dirt it’s not critical that your flat not have gradients in it.]

defocused image showing dust and debris on the sensor

If you have a lot of debris on the sensor, it will be easily visible directly in the image. In the image above, you can see I even have some type of fiber or thread (middle right). This is an example of a sensor that definitely needs cleaning.   But you can also digitally enhance these images to highlight the debris more, which is useful in cases where the amount isn’t as bad.  Just import it into a photo editing tool, and use the “auto adjust input levels” feature to get something like this:

digitally enhanced image showing lots of debris on an imaging sensor

With digital enhancement this looks super bad, but as you can see from the image of the Goodyear Blimp above, even this level of dust and dirt doesn’t mean you can’t take a mostly usable photo with the camera.

 

How to clean your image sensor

Continue reading

Gen 1.5 (2013-2017) Leaf vs Gen 2 (2018+) – No major differences

I own a 2015 leaf, and drove a 2021 S Plus for a week. It’s basically like the first gen leaf but with more range (and a few fancy driver assistance features like adaptive cruse control). Oh yah, and rear USB power outlets….

Three minor things I felt that the 2015 leaf did better than the gen2 2021 leaf:

Driver sunshade did not have the “pull out” tab to extend the shade (and could have used it)

Not a fan of the new center console. Arm rest wasn’t as big, drinks are in a more annoying spot. I mean, it’s FINE….but I liked the 2015 model year better.

Gen 2 has an analog (dial) speedometer in the main cluster. I prefer the heads up digital speed gauge in the 2015. But to compensate, the cruse control tells you what speed it is set to digitally, and that’s basically what I use for all speed control anyways.

So, no major complaints about the 2nd gen plus model, I did really appreciate the adaptive cruse control (e-pedal was fine…not worth upgrading for…) loved the extra range. Dash has a lot more informational options (more than you really need, but whatever…)

Bearing Replacement on an iOptron Cube E 8500 Alt/Az Telescope mount

I had to replace one of the Alt bearings in my Cube E mount (it was “grinding” and causing star trails at 1-5 second exposure times due to vibration).  I made a video of the procedure here:

https://www.youtube….h?v=TrKLkgV_WYM

 

The iOptron Cube E 8500 that I have uses 2 sizes of bearings:

 

1x   6804z bearing (20x32x7mm) for the Alt axle closest to the telescope.

3x  6803z bearings (17x26x5mm) for the ALT axle nearest the “lock” handscrew
and for both the top and bottom of the AZ axis in the bottom.

I purchased and used this NSK brand bearing.

You’ll also want a 14mm or 9/16th box end wrench to remove the AZ axis bolt head if you need to access the bottom.

Before/After results (click to enlarge):

Firmware / Software update on a Meade #497 AutoStar hand controller (ETX-125 telescope)

Meade Autostar hand controller displaying the red text: "FLASH LOAD 3.0 READY"

I recently purchased a used Meade ETX-125 (EC) Telescope that at some point in the past had been upgraded with a #497 Autostar hand controller (handbox).  This controller was running firmware/software version 22E (released in 2001), so I decided it was worth the time (and expense of purchasing a substitute for the Meade #505 serial cable) to upgrade the firmware.

I purchased a 3rd party USB to RS232 (rj11? rj10?) replacement cable that does the same job as a Mead #505 DB9 serial cable. The one I got had a CP2101 USB->UART chip inside, which required me to manually download and install drivers from Silicon Labs on Windows 11.  If I had it to do over again, I’d pay a little bit extra for the cable based on the FTDI chip, which is natively supported by Windows. Continue reading