Set the thermal throttling limit to 75 degrees C instead of 60 degrees C.
I operate some single board computers, like the Raspberry pi3, pi4, and pi5, and LibreComputer Le Potato or Renegade as mini-servers with active and passive cooling. One thing I've run into is thermal throttling. To protect the hardware, when the CPU temperature gets too high, the board will automatically reduce the clock frequency. Reducing the clock frequency reduces the power usage which prevents the CPU from over heating. I prefer the performance of a higher clock frequency. So, I'll commonly overclock a computer if I'm using active cooling (fan and heatsink). To prevent thermal throttling as often, I'll set the fan to turn on at a temperature lower than the thermal throttle setting. However, for the LibreComputer devices, the thermal throttling is defaulted at 60 degrees C, versus 80 degrees C for the Raspberry Pi default setting. I wanted to change the defaults, so after an Internet search, I found the commands below: Set the thermal throttling limit to 75 degrees C instead of 60 degrees C. Return the current CPU temperature.
0 Comments
I needed to replace an old desktop PC with a shared network drive. I was also looking for a solution to automatically save pictures from my mobile phone and my wife's mobile phone. My wife had a requirement that she be able to backup her pictures with minimal intervention. I decided that the NextCloud software provided a good solution for that requirement. Using a single board computer, I ended up building a cloud server that replaced the shared network drive, enabled access to my files from anywhere I had a web browser or my cell phone, the ability to share files like with Google Drive or One Drive. But unlike Google Drive or One Drive, I could host the webserver on my own hardware withou monthly fees with storage limits only set by the size of the drives I installed on the webserver. This is a recipe for creating a self-hosted cloud NAS (Network Accessible Storage Server) with a shared hard drive for storage and automatic backup to another network drive. The NAS setup includes the setup for a file server and NextCloud to allow the upload of files from mobile devices or through a web interface. It also explains how to share the web interface to the public internet so the files are accessible from anywhere. First, the server consists of a LibreComputer Renegade single-board computer similar to a Raspberry Pi 3. The Renegade is connected through an ethernet cable with a powered USB 3.0 hub plugged into its USB 3.0 port. An external USB 3.0 hard drive is plugged into the hub. I plugged the USB drive into the USB 3.0 port on the LibreComputer Renegade. The Renegade specs say you must use a power USB hub with an external hard drive. Indeed, I found that an external USB drive would draw enough power to cause strange operations without a powered USB Hub. The instructions below will guide you through the software installation and configuration. 1.) Follow instructions from https://hub.libre.computer/t/raspbian-11-bullseye-for-libre-computer-boards/82 summarized as follows: a.) Download 2022-09-22-raspbian-bullseye-arm64-lite+roc-rk3328-cc.img.xz image file from https://distro.libre.computer/ci/raspbian/11/ b.) Burn the image to the SD card using Pi Imager. I used custom image settings and no advanced options. c.) Add an ssh file to turn on ssh on the ROC-RK3328-CC (Renegade) to the boot directory with the following commands on my Linux laptop: d.) Add a default user and password with the following commands on my Linux laptop: In nano added [username]: so that userconf is a single line like For example: 2. Boot the Renegade computer. Confirm it is on the network by looking up the ip address and pinging it. You can also ping using the host name raspberrypi.local 3. Log into an ssh session. All of the remaining steps from 4 and beyond will be executed on the Renegade using an ssh session. 4. In the ssh session run the following commands to make sure the OS is up to date 5. Rename the hostname to nas (you can set the hostname to whatever you'd like, really) with the following commands: 6. When the Renegade rebooted, it terminated the ssh session. I waited for it to reboot and then logged back in via ssh using the new hostname 7. Expand the file system to take up the entire SD Card Select Advanced Options -> Expand Filesystem 8. Prepare the USB drive a.) Get the device name and create a partition I get sda as the device b.) Create a partition using fdisk fdisk has single key commands. m is menu, d is delete partition, n is new partition, p is print or list the partitions c.) Format the drive (sda1 means sda, partition 1) 9. Configure the Renegade to mount the USB drive on boot a.) Get the UUID of the drive: I get /dev/sda1: UUID="07076bce-1487-4fe2-8660-fb67c6b6db09" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b7f89f76-01" b.) Add a line to the end of /etc/fstab using the UUID Add the line c.) Create the mount directory d.) Mount the drive e.) Change the permissions 10. Increase the size of the Swap file (i.e. virtual RAM. Yes, I know you don't really want to use this because it's slow and could wear out your SD Card, but if you need Swap space to manage memory requirements, you want a bigger Swap file. Change CONF_SWAPSIZE=100 to whatever value you'd like. I used CONF_SIZE=2048 for 2GB After the reboot, open up the ssh session again. 11. Configure the IP Address to be static a.) Get the router Gateway IP Address: Mine is 192.168.254.254 b.) Get the router DNS Address from resolv.conf: Mine is 192.168.254.254 and 208.67.220.220 because I use OpenDNS for Internet filtering c.) Setup for a Static IP by editing /etc/dhcpcd.conf Add a section as follows 12. Mounting the Network Backup Drive (I have another server with a Samba Drive that I want to use as a backup to the drive connected to the Renegade) a.) Install cifs b.) Create a directory to mount to (I called it share) c.) Create credentials file Add the login credentials for the network drive and save the file Change the permissions so that only the root user can read the file d.) Mount the network drive e.) Configure fstab so that the network drive will be mapped every time the Renegade reboots Add the following line at the end of the file 13. Create a backup script and scheduling it to run daily at 2:00 AM. In my case, I wanted the network drive to be the backup for the USB drive connected to the Renegade. a.) Create a bash script file to backup the USB drive to the network share. The contents are: This will create a log file with the date/time and synchronize the contents of the USB drive to the network drive using rsync. This will creating a backup of the USB drive on the network drive. Change the permissions to allow execution of the backup script b.) Schedule the bash script to run on a regular basis using cron. 14. Sharing the USB Drive as a SAMBA Drive a.) Install samba b.) Configure the shared drive Add the following to the bottom of the file. This will share a Samba share network drive at location //nas/share c.) Create a samba user and password for accessing the shared drive You will be prompted for a password d.) Restart the samba service to enable the share thre15. Install NextCloud using the guide below
https://pimylifeup.com/raspberry-pi-nextcloud-server/#setting-up-a-mysql-database-and-user-for-nextcloud 16. If desired, configure access on the Internet outside of your local network https://pimylifeup.com/raspberry-pi-port-forwarding/?__cf_chl_tk=EE9dAfgvbS0ewGHaORLSEFZa.6L37yPRjWYBtnlB.mI-1691452991-0-gaNycGzND6U If you want a free DNS Server so you can set up an URL for your NexCloud acces, you can use the priver below https://www.dynu.com/DynamicDNS/IPUpdateClient/DDClient 17. You can also install a Plex Media Server to manage your movies, music, and pictures. You can also share and play these files on other devices on your network or across the Internet if your Internet connection is quick enough https://pimylifeup.com/raspberry-pi-plex-server/ In the steps above, we went through a basic NAS server configuration including burning a server image to a single board computer, setting up the ssh access, host name, network configuration, swap file configuration, external hard drive, access to a network shared drive, sharing a network shared drive, creating a backup script, and setting up the script on a scheduler. The last three steps are links to guides for setting up NextCloud and Plex on the server and granting access for file and media sharing and playback. Hopefully this guide is helpful. I certainly learned a lot in the process of setting up my server and wanted to document what I learned here. Thanks for reading this far. I had the privilege of helping with a high altitude balloon launch on a team for West Jackson Elementary School. The team was lead by Ben Probes and included teachers, parent volunteers, members of the West Jackson Fire Department, and Tricounty Amateur Radio Club. The balloon was equipped with a camera, pressure and temperature sensors, an APRS beacon, and a Verizon GPS. I worked on the APRS beacon, which worked properly during testing, but apparently had a failure of the GPS receiver. As a result, the APRS radio packets did not contain GPS data and the Verizon GPS was used to recover the balloon. I was out of town the morning of the launch, so I missed out on some of the fun, but I stayed in touch with Ben during the launch and recovery. It was a very cool project! Here is the video highlighting the launch: I made a short video where I attempt to cover antenna theory basics or as I call it "black Magic". I finally decided to expand out of the VHF/UHF bands into HF. I wanted an "invisible" antenna, so I'm starting with an attic mounted G5RV antenna. The junior version from MFJ that covers 40 meters through 10 meters on the ham bands. Antenna mounted as high as practical. You can see it's clear of metal objects and the ladder line goes off to the right at a 90 degree angle. Not ideal, but I'm avoiding routing it near any air ducts and wiring in the attic. Since I have a hip roof, the radials are bent down. The supports are wire tie loops supported with nylon twine. This radial gets the closest to metal. The foil on the ducts may cause the antenna to have a null or contribute to an unwanted noise gain. You can see the end insulator, again supported with twine. And the duct work I'm trying to avoid. Here is the ladder line to coax transition. This was my first time installing a UHF connector on coax. It turned out neat with the blue heat shrink. Also, since this is a balanced multi-band antenna (not usually reasonant), MFJ recommended constructing a balun by looping the coax. This is 10 loops around 5" in diameter. The function of the loops is to provide high impedance to any common mode current. Ideally, in a balanced antenna, balanced feed line, all of the current would be differential mode. That is the current on the coax shield would be equal and in opposite direction from the current on the center conductor. If that's the case, the loops will not add impedance to the current and all the energy is radiated by the antenna. However, any current on the shield in addition to the differential mode current would see the inductance of the loops. That inductance helps to prevent and minimize common mode currents. You don't want common mode currents because they add to the noise of reception and can cause problems during transmission. This is because the common mode currents cause the coax to act as an antenna, and some of the energy is radiated by the coax shield instead of the antenna.
We'll see how it works when we get everything hooked up on the radio end. Due to a corrupt file on my laptop hard drive, and HP/Compaq's lack of support for my laptop (I bought it in 2007), I decided install the Fedora 22 operating system. Fedora is a Linux distribution. I have been operating the laptop in dual boot, Windows Vista and Fedora 19 for 2 years. I found that I could address my entertainment needs (Hulu, Netflix, Nick Jr., History, YouTube, and DVD's) in Fedora. I also found I could bring 90% of my development software over using native Linux or running under Wine. I may be the only person running TinyCad / FreePCB for drawing schematics and PCB's, developing software for Windows using Code::Blocks, and developing firmware under MPLABX and Arduino on Fedora. Well, maybe not the only person, but it takes a special kind...
Also, I decided that since OneDrive is not supported on Linux, I'd drop my use of that software. I've backed up in time to the use of thumb drives and home network for moving files around. It's just as well that I'm not taking up space on a server in the cloud somewhere. Limiting demand of that sort of thing will reduce the costs of the Internet and save on fossil fuels. It's a good move for humanity, I think... Hopefully one day I'll be back to working on things that make sense to post here. I put my new home brew Yagi antenna up for a few minutes this past week. Here are some pictures: Mounted around 17 feet in the air, on the end of a painter's pole. I was hitting the repeater at Ga Tech and Bank of America building 50 miles away with this set up. Leaned up on the car. The 2M 5 element Yagi is 66 inches long and 40 inches tall. Made out of 1/2 inch CPVC, six metal clothes hangers, and a few other parts. I'm going to add a few braces to support the pipe. Handheld radio and SWR meter to test antenna. The antenna tested pretty good (1.2 to 1.4 SWR or 3% signal loss). You can see the input connection on the antenna as well. There is nothing in the box, no balun, no matching network. Just one end of the driven element soldered to the center of the connector and the other end attached to the outer shield by being wrapped around a screw and compressed with a nut. The insulating material on the outside of the clothes hanger wire was scraped off at the connecting ends. The dimensions along the boom are: Reflector to Driven Element: 0.433 meters (17 inches) Reflector to Director One: 0.755 meters (29 3/4 inches) Reflector to Director Two: 1.185 meters (46 5/8 inches) Reflector to Director Three: 1.688 meters (66 7/16 inches) of The lengths of the elements are: Reflector: 1.048 meters (41 1/4 inches) Driven Element: 0.978 meters (two halves) (38 1/2 inches) Director One: 0.940 meters (37 inches) Director Two: 0.944 meters (37 3/16 inches) Director Three: 0.884 meters (34 13/16 inches) I designed the antenna with a free software package called 4NEC2. Simulated properties were 1.0 to 1.2 SWR and gain of 10 db. I didn't get that good, but not bad for a pile of clothes hangers. I definitely need to add reinforcement to keep the antenna as straight as it was on the floor when I laid it out. Still, it's fun on a stick!!! And I learned a good bit researching how to build it! Last month, I presented on making printed circuit boards at home at the Tricounty Amateur Radio Club meeting. I featured a board I had made to interface my Baofeng UV5R HT with a computer sound card. The board features an external VOX circuit (if you turn the squelch off the Baofeng, the VOX of the radio doesn't work properly). The external VOX circuit worked great until I plugged the unit into the radio. I had two problems:
In the meantime, I did get on APRS for the first time using the little circuit, using the internal VOX of the radio. It wasn't ideal, but it worked. For a camera to use high altitude balloon project, I ordered a Canon Powershot A560 from E-bay for $15. I want to use the camera to take pictures and also create a time lapse video. I reprogrammed it with the Canon Hack Development Kit to take a picture every 10 seconds. As a test, I laid the camera on its back facing the sky and left it taking pictures for an hour and a half. I used a software package called VirtualDubMod according to instructions published online to convert the images into a video. Here it is: On the night of November 9, I got to play with my Meade Jupiter Telescope. My wife bought it for me for Christmas about ten years ago. I've used it about a dozen times. This was my first video I've captured through the telescope using its electronic eye. It was a clear night around two days after a full moon. The electronic eye sends out a standard NTSC video signal, that I captured on my laptop using a Pinnacle video capture device. The video turned out awesome! Everyone I've shown it to has the same response I do. Isn't it amazing the things God has created and put in front of us that we all take for granted. In a word, the moon is, by all measures an amazing creation of God. |
AuthorHusband. Father. Electrical Engineer. Electronics and woodworking hobbyist. Archives
December 2023
Categories
All
|