Showing posts with label Raspberry Pi. Show all posts
Showing posts with label Raspberry Pi. Show all posts

Saturday, November 10, 2018

Back Home

I think the dogs were more excited at seeing the snow than I was. Or at least they prefer to not riding in the belly of the plane. There isn't a lot of snow and the neighbor mentioned that this is the first snow that is probably going to "stick". We went to Alaska Coffee Roasters this morning and met with some from the usual crowd. Then we went to the yarn store that will be closing up shortly. After a little more running around, we are back home. Time to get going on some other projects.

Not a very interesting or exciting picture but I have three Raspberry Pi computers in the RV and two of them haven't had any updates applied since I put them into service. This is the one that has been continually collecting data from the Tristar solar charge controller. It ran continuously from around 3/2017 to 10/2017 and from 4/2018 to 11/2018. Not a single crash or hang during the entire time. I'm impressed with the Raspberry Pi computers.

The second Pi is running OpenElec and has been a media server connected to the TV in the RV. It hasn't been running continuously as I shut it down if we don't have sufficient Internet bandwidth. We mostly use it to watch YouTube videos. Instead of updating it, I am probably just going to install whatever the current version is.

The third Pi is my DMR hotspot and it is the previous generation Pi2B+ that I had lying around. It doesn't have built-in WiFi and Bluetooth that the Pi3 has but the metal case I have it installed in negates those features. It is current as it has the update process built into the Pi-Star distribution. I do have an OLED display that I'm going to install so it'll show real-time connection info. I have the display sent to me in OR but I neglected to bring the 3D printed display mount that my son made for me.

Saturday, September 1, 2018

Steep Learning Curve

Since I can't afford to get an HF (High Frequency) radio plus antenna at this point in time, I'm looking into Digital Mobile Radio aka DMR. This mode uses low bandwidth digital transmissions over UHF (Ultra High Frequency) and VHF (Very High Frequency) radio frequencies to a local repeater. The repeater is connected to the Internet and your digitized voice is sent out as an IP data packet. You use globally assigned talk groups to communicate kind of like a digital party line. Anyone who is keyed up on that talk group can communicate with the voice data traversing the Internet.

To use DMR, I needed a radio that has the proper digital capability. Two Chinese companies, Radioddity and Baofeng, worked together to bring out a very affordable tier 2 DMR radio. The RD-5R. The case looks like the very common (and cheap) Baofeng UV-5R but the innards, programming software, and commands are Radioddity. It is dual-band i.e. 2m and 70cm and supports analog in addition to DMR. Right now, I'm just monitoring the Ester Dome analog repeater at 146.880 MHz. One of the challenges for me is that the Radioddity programming software is Windows only. And DMR is too cumbersome to even try and do manually. If that’s even possible.

The other necessary piece is access to a DMR repeater. Unfortunately, there are no DMR repeaters in Fairbanks. In fact, the only one in Alaska appears to be in Homer. UHF frequencies are strictly line of sight so not a chance of reaching more than 20 miles or so. The solution is a hotspot such as a Raspberry Pi with a radio "hat". The Raspberry Pi is a small, cheap single board computer that was developed to teach computer programming skills. It has built-in Ethernet, HDMI video, 4xUSB ports, audio out, and a camera connection. The Pi 3 has built-in WiFi and Bluetooth. Since I only plan on running DMR, I'm using an older Pi 2 and a WiFi USB dongle that I've had lying around. The "hat" is a daughter card which, in this case, has a 70cm radio and is made by DVMEGA. The transmit power is only a tenth of a watt so this is strictly a local device. But local could be in the RV tethered to my phone.

The software image that I'm using is called Pi-Star and the download includes Raspian, the Linux operating system for the Raspberry Pi hardware so all I needed to do was copy the bootable image to a micro SD card and plug that into the Pi. With the DVMEGA hardware, it supports not only DMR but also D-Star and Yaesu System Fusion. These are two other digital modes. DMR seems to be a more open standard i.e. supported by cheaper radios, that's the one I opted to mess around with try. I now have the Raspberry Pi/DVMEGA hotspot running but needed to order a small 70cm antenna for the daughter board. The screenshot on the left is the Pi-Star software running my hotspot. 

DMR is somewhat confusing since it is a commercial system being adapted for amateur radio. It's far from a perfect fit. It took me a couple of days but I think that I finally have the digital part of the radio configuration worked out. On Thursday afternoon, I connected through the hotspot to talk group Tac-310, which is listed as North America, and talked to several guys in MN, CA, AZ and TX. And this was with the hotspot paired with my phone. I had the hotspot sort of working on Tuesday but couldn't hear any audio from the radio. At that point, I wasn't sure if it was the configuration of the radio or the hotspot. It turned out to be one checkbox on the channel config of the radio. There isn't a lot of documentation or information on this stuff except on the Internet. The last picture is the completed hotspot. I found a nice aluminum case on Amazon for only $7 and I just needed to cut a small hole for the antenna.

I haven't tested the range of the hotspot but it's now usable throughout the house. The limitations to the range are the gain of the antenna and the output power of the hotspot radio.

Sunday Afternoon Update - I updated from the Raspberry Pi 2B to the Pi 3B which has built-in WiFi. The CPU load is now about 1/10th of what it was but the metal case was limiting the WiFi range. This isn't really a problem as I'm planning on having this sit right next to the AP anyway. I plugged in the little USB dongle and the link quality jumped up to 100/100 from 40/100. The data needs of this system is pretty low but the reduced load and temperature is significant.

Wednesday, April 12, 2017

Pressure Cooked Eggs

An odd title. But, first I'm still messing around with a status display. Nothing really fancy but at least I don't need to scroll the screen to see the info. The resolution of the 4" screen is only 320x480 and you need to use a stylus to get to the scroll bars of the screen. I have a few ideas how to make an enclosure for the RPi (Raspberry Pi) but need to allow for good ventilation as the screen drives the microprocessor hard enough to generate some heat. And I still want to add some virtual buttons to bring up the graphs. BTW, even if you include the screen, the cost of the whole "computer" is around $70.

The eight year old Dell netbook that the RPi is sitting on now has Windows 7 installed as well as the driver for the USB serial interface and the Morningstar charge controller software. This is just in case I wanted to make some changes to the configuration. I also installed the USB driver from Mads Electronics in case I need to change the firmware on the truck engines computer. The most significant parameter for me of the aftermarket firmware is the tire diameter within the ABS section. This allows me to get the speedometer (and odometer) to match the GPS by adjusting the diameter in 0.05" increments. I now have it within a couple of tenths of a mile on a 100 mile trip. The device is a "tuner" and I have it set for "towing" with a modest 70 hp boost. I originally set up the Dell as a hackintosh running OS X and at 2.3 lbs was my lightweight, travel computer. It's been on a lot of trips due to its rugged design. 

Since the forecast for today was mostly sunny, I ran the battery bank down a bit so the charge controller would stay at a control state of "BulkCharge" to see how much power I can get from the single panel. This is the power produced so far today. The dip around noon is a large spruce tree blocking the sun. Yesterday, the system was in absorption for most of the day as the batteries were charged.

To run the battery bank down, I steam cooked a half dozen eggs in an electric pressure cooker (14.2ah) and made some frozen pot stickers for lunch on the induction burner (15.5ah). Between the two tasks I drew about 30 amp-hours from the battery bank. Plus, I had the inverter and Ubiquity radio running for most of the day (22ah/day). 

BTW, for anyone wanting to hard boil eggs, the pressure cooker is the way to go. High pressure for 5 minutes. The shell practically fell off and perfectly cooked. I'll have to remember this technique. 

Sunday, April 2, 2017

TriStar Monitor

How I spent my Sunday afternoon.  

It may not look very fancy but the next step in my solar monitoring is working. I have a Raspberry Pi  (that's the small black box in the center of the picture) connected to the Tristar TS-45 charge controller with the same USB to serial cable that I was using with the Lenovo laptop. I'm using a  heavily modified Python script that I found on the Internet to query the TS-45 every 30 seconds and writing the results out a temporary file with a some possibly useful variables. Plus, I'm appending the data to a CSV log file every 5 minutes.

I have another program that runs every minute which creates this simple html file on the Apache web server also running on the Raspberry Pi. Simply showing the current status with the battery sense voltage, array voltage, charging current, control state, PWM duty cycle, battery temperature and the computed power output. I was originally thinking of using an RRD and auto-generating graphs but decided that I can alway create graphs using the CSV log files anytime I want one. Maybe if I find myself really bored...

If you are unfamiliar with the Raspberry Pi3 model B, it runs on 5VDC drawing approximately 2 watts using a micro USB cable. It has a quad core 1.2 GHz processor, 1 GB RAM, built in 10/100 Ethernet, WiFi, Bluetooth 4.0, HDMI output, camera connector and 4 USB ports. This is in addition to the GPIO pins (digital i/o). Storage is a 32GB micro-SD card of which I'm using 3.7 GB. Basically a full blown computer that you can pick up for around $39. After you add a case, power supply, micro-SD card, etc. it'll be around $70. The one thing missing on the Pi is a real time clock. It really needs access to the Internet when it's booted up to set the date and time. Fortunately, I don't see it needing to be rebooted very often.

Now I simply need to get a small serial cable extension as there isn't enough room to install the TS-45 cover with the existing cable. And install a 12V to 5v micro USB to power the Raspberry Pi. Bridget didn't seem to understand why I was so thrilled to get this working. This was also my first foray into Python. 

Wednesday, March 11, 2015

Good Time to Leave Town...

Winter has returned. Especially if you look at the prediction for Saturday. It sounds like a good reason to be somewhere else. Almost anywhere else. Actually, this is probably the last really cold spell that we're going to have. Plus, this evening, we are heading for Chicago and Pennsylvania for a bit. I not delusional enough to believe that it's going to be warm but hoping that it'll be warmer than here.

On another note, this is one of the new Raspberry Pi 2 model B single board computers. It has a 900 mHz quad core Arm 7 processor, 1 gig of memory, 4xUSB ports, 10/100 ethernet port, HDMI, analog audio out, camera input plus a smattering of digital inputs. Not too shabby for $35 though I wish it came with a 10/100/1000 ethernet port that supported PoE (Power over Ethernet). Initially, I loaded OpenELEC on a micro-SD card and have it hooked up to an old plasma TV that was going to be sent to surplus. The video performance blows the older model out of the water.

I am setting up another one to run Raspbian, a Linux distro for the Pi, and compile the PerfSonar tools. This would be a cheap method of monitoring network performance around the campus. A colleague at the University of Hawaii has a large number of the older model B Pi's deployed on their campus and I was inspired by his presentation at the last Internet2 meeting. The package also included a wireless network (802.11B/G/N) usb adapter, plastic case, SD cards, heatsinks, HDMI cable and 10 watt power supply. The total for each package ended up around  $65 on Amazon.

On Monday, I met with JedR another soon to be Ural rider and BMW airhead. He had just returned from Anchorage to get Mickey to sign off on some sort of card that indicates that he has been briefed and ridden a Ural. He brought back my speedometer from Mickey to replace the one that died when we first reached -28°F. Then it'll be a new bike restarting at 0 miles, right? His rig is being shipped up from the east coast fully assembled in what must be one huge crate.

Saturday, May 11, 2013

What Have I Been Up To

At times, I have been accused of going to Barrow for a vacation. But I've been pretty busy and have been working in the building for about 10 hours per day. And they moved me to another office within the building again. Since we now have some locking storage in the new office and a door that opened directly into the hallway, I didn't mind moving. Not exactly my version of a vacation.

This was dinner at the local Japanese restaurant I think on Wednesday. Miso soup, ikura, and loco moco. What a combination. Ikura is salmon egg sushi and loco moco is a Hawaiian dish made of rice with a hamburger patty and a fried egg on top all covered with some sort of generic brown gravy. Before this meal, I hadn't eaten anything for a day or so. I didn't finish what I had ordered. Overall, the meal was pretty good.

One of the fun tasks was setting up and testing the Raspberry Pi microcomputers running XBMC software. Here is the entire computer with the HDMI video cable coming out the left side of the case, the micro-usb power supply on top and the tiny wireless usb interface (with the blue light) on the front. They will be velcro'd to the back of the television monitors. To control them, you can use an iOS app or the built in web server. I'm pretty impressed with the capability. You can even use AirPlay from your Mac or iOS device to show movies. I had wanted to set one up on the conference room projector but it doesn't have an HDMI input. This means that I need to pick up a HDMI->DVI-D cable and run an analog stereo audio cable back to the audio mixer if I want sound.

One of the apps I installed on XBMC was Aljezera English so there would be some news feed into the building. Here is one of the four screens that I have set up in the building. I also have the ability to show content from other sources within the facility. It has bee running for a day now without any real issues. It doesn't support Airplay Mirroring which would allow you to send your Mac screen to the monitor nor does it play back mpeg2 encoded video. It also doesn't seem to support MP4 videos like you would download from iTunes. But is is easy to just play them off of your computer and send them to the system.

This evening I was planning on taking some pictures around town to try and give you the flavor of Barrow.

 

Thursday, April 25, 2013

Raspberry Pi

Absolutely ZERO moto content in this post. (Well maybe a little)

And, no, not that kind of pie

I like it when boxes arrive in the mail. I had been interested in these small single-board computers since they came out last year but couldn't think of a good use. I noticed that Amazon had "kits" available which includes the Raspberry Pi Model B and some popular options. In this case, a plastic case, 4G SD card, USB charger, micro USB cable, and an HDMI cable.

I have a use for the tiny computer in Barrow to drive the conference room projector and installed XBMC running on Linux. Here is the board installed in the case showing most of the interfaces which include Fast Ethernet, 2xUSB ports, analog stereo audio out, composite video out and HDMI out. Underneath is the SD card slot. On the top there is an port for  expansion boards.

I opened the box at 10:30am and by 11:30am, I was searching for an display with a free HDMI port. XBMC was installed and running and this will be a great, simple solution. And the entire kit was about $80 including the wireless 802.11b/g/n nano USB adaptor.

There is also an Arduino microcontroller sitting on my desk tempting me to see what I can do with it.

To add a little moto content, right after I had XBMC running, I got a call from a Ural rider about 100 some miles down the road. You know me, any reason for a road trip!