Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Monday, 16 January 2017

Milling Madness

The end is in sight. I got some more work done on the Mill upgrade over the weekend and am now at a point where I am happy to start making chips.

Last time I tried to get some work done on the mill I was defeated trying to get a fan set up. This time I found a fan in my junk pile that works.
This is the old power supply that I installed in the control box here. Then I replaced it here. Although it has been sitting for over a year the fan still works from it. It is labelled as a brushless fan but I figured that the designers wouldn't have gone to the trouble to drive the fan with some kind of waveform and it could be driven with plain DC.

It turns out my guess was correct. So I now have a fan to go in the case. It was even exactly the right size for the mounting holes.

Here it is set up in the black box testing phase. I had it rigged up on the desk without plugging in the machine just to get this stuff sorted. Now that I have the fan and everything sorted it is time to move it off the desk onto it's home on the CNC bench.
Here you can even see the penguin power. I am planning on using just the mouse and the little numpad pendant as the interface for this as there won't be much call to type stuff in and this will keep the fairly crowded bench clearer. For now however while I am setting up the parameters for the stepper motors as a proper keyboard makes this much easier.

Now I just need to work out the toolchain to turn a CAD drawing into code to run on this machine. Getting it onto the machine should be fairly easy as it runs a quite up to date version of Linux so I can just set up an NFS share or similar for loading up programs.

Cheers,
Rex

Tuesday, 8 March 2016

There's the right way, then there's my way.

Sometimes you just can't do things the "right" way straight off the bat.
This is a great example of that. I've been trying to get Jerry (The NAS server) working so we can share files among our LAN. Unfortunately the RAID card in there doesn't like to play nicely with *BSD so I've gone back to Linux which I know. And has drivers for the card.

Unfortunately I couldn't find an easy way to boot from the USB drive that FreeNAS was using. So I had to use a normal Hard Drive. The only one I had spare with SATA was a little 2.5" laptop drive. That is fine, except I don't have 2.5" caddys for the bays in the front and I can't see any other spots to put this. So I've attached it to the backplane and you can see to do that it couldn't be sitting right on the bottom of the tray. However if I left it like that there could be problems with dust or rodents. So I slipped a normal caddy in, lifting up the front of the drive a little to slide it under.
Hmmm, a bit sketchy, but it let me test this idea without spending money or stupid amounts of time on it.

It's in the bottom tray here, just before I boot to test this. The middle caddy has my big drive and is unplugged to make sure it doesn't cause issues. The top one is just a blanking caddy.

So sometimes you can get away with doing something without having everything perfect. So don't let the fact that it's not the best way to do something don't let it stop you from doing it.

Cheers,
Rex

Sunday, 31 January 2016

Fixing a worn out power supply in a computer

A bit of a nerdy one today.

I have recently gotten an older PC that I will be using as a Home Theatre PC (HTPC) Unfortunately it has been having issues with instability and would shut down randomly and then when shut down properly it would not boot back up again. Sometimes it would not even reach POST (Power On Self Test), others there would be an issue with the POST. Once I even had it say there was a problem with the BIOS flash memory itself.

The original Stats. It's had a RAM upgrade and a new graphics card.
As you can see, not the most exciting computer. But it has a discrete graphics card which immediately blows anything else I have here out of the water for a HTPC. The computer I had been using did work, however there was often a lot of stutter during playback and complete CPU usage. This machine does not have that issue.

Here we see the new power supply next to the case. Originally it had a 300W supply. I have upgraded it to a 550W as the newer graphics card recommended somewhat more than the orginal 300W. I think this may have been one of the contributing factors that lead to the original supply failing. Often a supply will handle being overloaded. But it will cause it to fail much much sooner.

It's a pretty tight fit in this case. The only way for me to un plug the motherboard power cable was to first remove the hard drive and personal media drive bay. I was lucky that it came apart fairly easily and soon I had the motherboard un plugged.

With the motherboard and drives all un plugged; all that needs doing to remove the old PSU is taking out the 4 screws on the back. These all came out easly like they should. If this had been in a factory or somewhere where it's likely to corrode a bit it would've been a different story.

Here we have a side by side comparison to check that the old (left) and new (right) are actually the same size. They were. Time to reverse everything and put it all together.

If I was willing to spend the money on this computer I could've gotten a modular power supply. With a modular PSU you can remove some of the cables so you don't get a mess like the one above. As it was I was lucky enough to have to find a way to get this spaghetti monster into the case without jamming in a fan.

Before putting too much effort in I like to check that I have fixed the problem. This is what you see here. I plugged in only enough for the motherboard to boot off the BIOS chip and run it's POST. With that done I can finish buttoning up the system and getting the loungeroom back to a reasonable state.

With a little coaxing it all went back together reasonably well.

Success. Now I just need to set up Mythtv on here. If anyone is interested in seeing a writeup on how to configure a Mythtv Frontend, Master Backend and Slave Backends please let me know. I am not particularly happy with the current arrangement and if it would be of interest to someone then I would be happy to document the process.

Replacing a power supply is something that is not too difficult once you know what plugs go where and you are willing to take your time to work out what each part does the first time around. Also like this computer that was likely to be tossed, it is a relatively easy test that you can do that can extend the life of your computer.

Any questions, or thoughts please leave them below in the comments.
Cheers,
Rex

Friday, 15 January 2016

Bad Youtube Playback arch

Shortly before I left on my holiday I came across a problem that has been getting worse and worse over time. When I watch a video on Youtube on my laptop it would use quite a lot of CPU. Inititally I thought well that makes sense, seeing as it is a video and I know videos are a fairly intensive thing to handle.

However it got worse, to the point where my laptop with a quite reasonable for the task Core i5 processor and practically nothing else running would eventually reach thermal cutout temperatures (>100 degrees C) and eventually to the point where it couldn't really play videos. Surely there must be a better way.

And it turns out there is a better way, seeing as I am currently running Arch Linux on there. Also I didn't have that problem on Windows or Debian on the same computer.

Turns out that in Chromium (Not quite Chrome) there is something funny with the rendering for web based playback. This causes massive CPU usage for no good reason.

The Solution?

Go to the URL chrome://flags then enable "Override Software Rendering List" (#ignore-gpu-blacklist)

I'm not 100% sure what it does, but a guess for the blacklist mentioned in the # name make me think that perhaps it was trying to do all of the rendering in the CPU. Rather than getting the GPU (Integrated but still better) to do that part of the hard work, for which it is much more suited.

This may also work on Windows or Mac if you are having similar problems. It certainly hasn't hurt my computer and has made it barely load the CPU at all with video playback now.

If you have any other tips or tricks for Chrome/Chromium that make it perform better please let me know so we can help share this information.

Cheers,
Rex

Saturday, 28 November 2015

Network Sharing - Samba, Linux and Macs

Just a quick one today. I've been having issues with my samba server here at home recently and I finally had to fix it today.

Problem:What was happening was my computers running Linux would be able to connect to the smb shares on my server and I have put my movie collection onto it that way. However my girlfriend's Mac could get onto the shares but could only paste small files. Nowhere near big enough for a movie.

What was happening is samba was sharing /media which has /media/part{1,2} in it which are both mounts to large hard drives that the movies are on. I have also set up the root partition to be very small and it has relatively little space left; which is fine because almost everything else is on other partitions.

When you tried to copy across a movie on the Mac it would say there was no space left on the device and it can't copy the files. When I turned on the status bar on finder I saw that no matter what folder I was in the space it was reporting free was small, about what df -h said was free on the server's root.

The solution? Share /media/part1 & /media/part2 separately so that the free space is reported correctly.

Why:It seems that samba only shares the free space for the root of the share. Unfortunately in this situation because there were partitions mounted within the share the free space was wrong. This wasn't an issue with my linux computers because they seem to just copy until an error is given, rather then testing for free space first. The problem with the Mac system is that because it seems to be testing to make sure it can copy first and it was seeing the incorrect size it just gave up at the beginning.

Sorry for the wordy post today. Hopefully this will help someone. Probably even me if I remember to look this up here.

Cheers,
Rex

Monday, 9 November 2015

Mill Woes

Just a quick update on how the mill is going as that's the only thing that's actually had anything done on it recently. I finally got the software issues sorted and worked out a display, then when I pressed the go button to power on the motors they hissed like they should for a fraction of a second. Then.. all of the power died to the board.

A second test confirmed that this is consistent behavior unfortunately. I think what is happening is that the turn on current draw of the steppers is too high for the computer PSU and it trips the overload protection. To test this what I'm going to do is connect my bench power supply in parallel with the computer supply and then after starting the motors wind down the current. That should tell me if the computer PSU will handle the base load current.

If it will then I will probably put some kind of large capacitor across the 12V rail and GND to help minimize the surge. I may do a quick writeup on the display arrangement I finally got working, particularly if there is some interest there.

I'll report back how I go with this.

Cheers,
Rex

Tuesday, 25 August 2015

Inception computers


So I managed to get the remote desktop connection working to my work computer. Unfortunately as you can see, that required a few layers. At the bottom of the screen is my Debian taskbar, then running within virtualbox is the windows install on the other partition of this computer. Then within that is an RDP connection to my work computer at the office.

Probably the most impressive thing about this whole setup is how good the performance was. It felt like I would still be able to use it for doing actual work.

I am in the process of finding an alternative that will run natively within my Linux install and I have found this program http://remmina.org/ that will do RDP through a TS Gateway which is causing my headaches. Unfortunately the ppa I found for it is only for newer versions of Ubuntu than the version of Debian I am using. So I can either compile from scratch and probably have to sort out a whole lot of dependencies. Or I can update in place this install of Debian I am using now. Or I move to a distro with rolling updates like Gentoo which I was going to use but then needed a working install far to quickly.

I'll let you know what I end up doing. And particularly if it is a bit interesting I will do a writeup on it. If anybody has a suggestion as to how I should proceed let me know what you think and why.

Cheers,
REx