Radio check sat! Using 433MHz transmitter and receiver with Uno board….

transmitAndReceive

Now that picoEngine has reached version 1.0, I’m ready to work on a few other projects. Namely some electronic ones. Since Christmas, I’ve been holding on to a few Arduino Uno boards, and a pile of stuff for them. So, I broke out a few parts.

IMG_20190326_132946

I decided to start with the 433MHz transmitter and receiver.

There were several guides online, and I stole some code from them. I like starting any project with a known good source before stepping out into something I made, to make sure the hardware/software is set up properly. It was a great tutorial, and it worked.

However, there was one unexpected drawback: range. I knew these little transmitters and receivers were weak, but I didn’t realize that they literally only transmit an inch! As you can see in the picture, the Uno boards are almost touching just to transmit the data back and forth. I had purchased a few of these (three sets for myself, and two for my brother) with the intention of doing a few fun projects. Unfortunately, these wont transmit across my desk, let alone the parking lot, so I’ll need something else to work with.

But, these are still a fun learning tool, just a little lacking in the range department! Here are the sketches I used, keep in mind, you need the “radiohead library” installed in your IDE to make this work.

Transmitter:

#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile

RH_ASK driver;

void setup()
{
Serial.begin(9600); // Debugging only
if (!driver.init())
Serial.println(“init failed”);
}

void loop()
{
const char *msg = “Hi World!”;
driver.send((uint8_t *)msg, strlen(msg));
driver.waitPacketSent();
delay(1000);
}

Receiver:

#include <RH_ASK.h>
#include <SPI.h> // Not actualy used but needed to compile

RH_ASK driver;

void setup()
{
Serial.begin(9600); // Debugging only
if (!driver.init())
Serial.println(“init failed”);
}

void loop()
{
uint8_t buf[12];
uint8_t buflen = sizeof(buf);
if (driver.recv(buf, &buflen)) // Non-blocking
{
int i;
// Message with a good checksum received, dump it.
Serial.print(“Message: “);
Serial.println((char*)buf);
}
}

I certainly like the simple code, since the radio head library does all the heavy lifting for you. Have any of you ever tried these out?

Linux – keep it simple.

BlueFruit autostart was a success!

image20180531_074506688

After several series of bench tests, I was finally ready to make the plunge and install my home made autostart into my truck. The vehicle in question is a 1993 GMC K3500 pickup truck. It took about 30 minutes to remove the lower dash portion and properly identify the wires in question. Then, about 15 minutes later, the whole thing was hooked up.

Then came the scary moment of truth.

I opened my app on my phone, and pressed the big orange start button.

The first set of relays engaged, turning on ignition power, fuel pump power, etc. So far so good. After the 5 second delay (purposefully programmed to allow the priming of the fuel) the second set of relays kicked in, the vehicle cranked, and STARTED!

To God be the glory! Wow! I can’t believe it actually worked! Lo and behold, pushing the stop button on my app killed the truck too! Great! By the way, the entire project, all files, apps, sketches, pictures, etc., can be downloaded from the repository I made for this on GitLab.

A few tests showed that I still have some fine tuning to do. As can be seen from the two issues I opened on the repository, there are two enhancements that really would make this better. The first is that the range is limited to about 30 feet, on a good day with nothing between you and the truck. The second is a slight problem with voltage detection for determining if the vehicle is started.

You see, I am using a voltage divider to break down the 12+ vdc to less than 3 vdc for the BlueFruit board. If it is less than 0.9 volts on the board (13 volts on the vehicle), then the alternator is not charging and the vehicle must not be running. This causes a few problems.

  1. If the vehicle’s alternator ever fails, the autostart will attempt to start a running truck numerous times.
  2. During the cranking process, the board keeps checking voltage to see if the engine started, but it will always read low when a huge load like the starter is engaged. So it will always crank the full 3 seconds of crank time, even if the vehicle is started.

Both of these conditions will cause excessive wear on the starter, and in general is just poor design. So I’ll be thinking on a way to make that better. In any event, I’m really glad that the initial run was a success!

Linux – keep it simple.

Solder time! Fixing a GPX LCD photo frame…

I don’t know exactly when it happened. I just know that it eventually quit working. It is one of those picture frame LCD panels with a slot in the back for a flash memory card. My lovely wife had purchased it for me a couple of years ago, and I keep it on my desk at work, occasionally updating the photos on the memory card, so I can have nice scrolling pictures of my family with me while I am working. I really like these things. If you don’t have one, you should get one!

In any event, at some point this past week it quit working. The screen was black, and there was no indication of what the problem was. A quick press of the power button didn’t revive it either. So I started troubleshooting.

The power supply says that it is 5 volts DC, and that it is 1000 mA of current. A quick check with the multimeter looked good at first, since it was 4.9 VDC, making me think it was a good power supply. But then I decided to check the amperage. Bingo! It was only putting out about 100 mA, not 1000!

Well, long story short, I couldn’t find another readily available 5 volt DC, 1000 mA power supply. Then I realized that all USB power supplies are 5 volt DC, and usually 800-1000mA. So, I chopped the old cord off, cut a USB cord in half, and did a quick test using alligator clips. Success! The unit powered right up with cheery images of my fun loving family!

I grabbed some heat shrink tubing, did some trimming, warmed up the soldering iron and got to work. About 5 minutes later I had a functioning LCD picture frame!

Linux – keep it simple.