draft0

Menu

Entries tagged 'cat:Hardware'

Planet Computers' Astro Slide

I've finally received my Astro Slide. A smartphone with a physical keyboard that came out of a crowdfunding campaign that I've backed a few years ago. This entry contains my first impressions of the device, in the context of having used and having been disappointed by both its predecessors.

Specifications

Display6.53 inches, 2340 x 1080 pixels
ProcessorMediaTek Dimensity 800 (4 x Cortex-A76 + 4 X Cortex-A55)
GPUARM Mali-G57 MC4
RAM8 GB LPDDR4x
Storage128 GB
Cameras48 MP rear, 13 MP front
SpeakersStereo
Ports2 x USB-C, 3.5 mm audio, microSD card slot
Wireless5G, WiFi 5, Bluetooth 5.1, NFC, FM radio, GPS, GLONASS
Battery3.500 mAh
Charging10W Wireless + wired fast charging
BiometricsFingerprint sensor in power button
Keyboard53 keys, slide-out, backlit
Dimensions164 mm x 76.6 mm x 15 mm
Weight300 g

Planet Computers

Planet Computers has created/produced and is selling three PDAs/smartphones with keyboards (Gemini PDA, Cosmo Communicator, Astro Slide). That's their legacy - smartphones of the clamshell kind (or slide-out in case of the new model, the Astro Slide) similar to the Psion Series 5. The form factor and keyboard of all three those devices is remarkably similar to this 1997 PDA. The opening mechanisms aren't. But enough about previous devices. Maybe I'll write about those two, since they are relatively unique devices.

Crowdfunding period

You can skip this and the next paragraph if you just want to know about the device and not my experience of getting it and my opinion on the crowdfunding process. The Indiegogo campaign ended in May 2020. Mass shipping of the produced devices was delayed until the end of December 2022 for various reasons. There was an availability/alleged scamming issue with important parts, forcing a redesign of the board including a switch to a different SoC. There were the usual discrepancies between time planned and actual time needed to finish steps. And there was a long series of problems caused directly or indirectly by the COVID19 pandemic. There was (and continues to be) a fucking huge pile of negativity and hostility towards the maker of the device. Maybe you know the sort of comments delayed crowdfunding campaigns tend to get. My impression is that people regret giving their money to a company as an investment with no security, lose hope to receive the device as expected, and then start to badmouth everything about the project and insult people who continue to support the company behind the project. I don't read much of the comments on campaigns that I'm not supporting. But I've never seen so much hate and unnecessary negativity for a fucking tech gadget. I'll refrain from repeating any details or telling any stories that don't have a point. But I wanted to mention it.

My personal take on the long waiting period: The stated delivery date at the time of backing was never realistic. Even the date to which it was later changed, or the one after that weren't to be expected to be the actual dates at which any devices would be delivered. Every tech gadget crowdfunding I've ever seen missed their delivery target date. But of course people will expect or pretend to expect to receive it before the stated date because that is precisely the purpose of stating that date. Anyway, most of the announced delays were sort of understandable in the current situation; even though Planet Computers surely didn't tell the (whole) truth all the time and their often denounced lack of communication skills is undeniable although not as big as purported by some. Instead of checking and filling the comments page weekly for two years, myself and other people who also didn't channel all their hatred into that page just didn't complain in the comments and still received the same device at the same time as the others. Although one good thing came of the complaining of some on the comments page: When a picture of a prototype or render or something (I don't remember) was shown in an update and people complained about the space between the feet not being filled with battery, Planet Computers made a poll that ended up showing that most backers want an even thicker device than it would have already become, and the design was changed to fill the last gaps with a bigger battery. Communication as a customer with them never feels great. They try to evade warranty claims, ignore questions and arguably lie if they feel that the response sounds better that way. My contribution through Indiegogo was locked for many weeks without an update. I moved house before shipping actually started. So I couldn't update my address on my own but had to send Planet Computers a message instead. They claimed to have updated it (ignoring other questions), but over a week later it was sent to the old address. Gladly UPS really tries to fulfil their task to the utmost satisfaction of the recipient.

Unpacking

At first I wasn't sure whether I even wanted to open the package. Because by I'm already waiting for another device that I discovered after backing the Astro Slide campaign but expect to like better than the Astro Slide. I shortly considered selling it unopened. But whatever, I wanted a treat now, not wait a few weeks for a better one. The packaging is of the sort that we have to come to expect from electronics gear that's not of the lowest price and quality. Nice, thick cardboard and not the simplest box design imaginable. I don't really appreciate this packaging the way others do. When getting everything out of the box, the bottom tray came out too. It obviously used to be glued in but ripped out with force. Also the holder for the SIM tray opening tool was damaged. If the box hadn't been sealed by a thick round transparent sticker, I'd say this box was opened before. Anyway, the device looked fine. When I turned it on I was surprised to find that it was already set up and the language was set to Japanese. Not the most obvious choice for a device with a EU charger and a German keyboard. It really seems to me like somebody else has received and tried out this device before.

Hands-On, Keyboard

My first impression is: It's thick and heavy, as we wished for in the poll. I don't mind that. It's supposed to be a tool, a PDA, not competition for the iPhone or not something to impress people with. The sliding mechanism is new. Both folding mechanisms of Planet Computers' previous devices didn't last long in my hands (or pocket). So I'm curious to find out whether this new approach works better. In the videos it looked more awkward to open than it really it. It's hardly possible to open with only one hand, but it's possible if you absolutely have to. And I think it would become even quite easy and less awkward as long as your hands are at least of average size. It's less fumbly to close with one hand though. After only a few tries of opening it with two hands I got the hang of it and I can do it quickly, without the edge getting stuck in the keys and looking really cool. Maybe that success is due to me using it too violently. But it doesn't feel like I'm straining or pressing anything in a way I shouldn't. So before I've actually used it for a while I'd say the new mechanism feels better than the old one. The keyboard layout is the same as with their previous devices: very much inspired by the Psion Series 5 PDAs from 1997 (and other similar PDAs from that time). For some unapparent reason they've changed the size of some keys though (Left Shift, Left Ctrl, Up, Down). The keys feel more firm than on my Cosmo Communicator, except those on the edges of the keyboard. During my first few tries typing text on it this feels better than with the Cosmo or the Gemini. But my main issue persists: Keys often to very often get stuck. Not in their pressed-down state. Rather they refuse to move down if hit in the wrong angle. When touch-typing on a too small keyboard, one hits the keys in all sorts of angles though. But beyond that I don't want to judge the typing experience. I find it too small for two-handed typing and it's too big and not made for thumb-typing. It takes quite some getting used to or training to type fast and reliably on it. But that's not the fault of the device. I'm sure it must have been the same with the Psion 5. Compared to most high-quality laptop keyboards the Astro's feels a bit cheap in that the keys don't travel consistently straight downwards depending on the angle from which they are pressed. When typing quickly and carelessly, keys sometimes can feel like the got stuck on their way down. But the key press usually gets registered, so that might not matter after getting used to typing on this keyboard. The experience is very similar, if not the same, to typing on a brand new Cosmo Communicator. The space key for some reason feels like it has hardly any travel. But it works well when actually typing text. The bugs that were there in the previous devices haven't been addressed. There's still ghosting when pressing more than two keys, caps lock still sometimes gets enabled accidentally and the caps lock light still sometimes is off when caps lock is on and vice versa.

First few minutestimes trying it out

A certain standard for features, form factor and quality has became standard for smartphones. The form factor of the Astro Slide is obviously different. The technical features can be looked up in the table above. For the perceived quality and experience I'll just list things that I found noteworthy during the first few times using the device. When the device is close, the screen flashes to maximum brightness every time it turns on. The display can not be turned off while the device is opened. It turns off after the set time of inactivity. There is now automatic screen rotation based on the device orientation, like in any other smart phone since the iPhone. But more prominently placed, there is also a setting in the pull-down menu that lets the user switch between landscape and portrait mode as long as the device is closed. When it is opened, the setting is ignored and the screen is set to landscape mode. When the device is closed again, the setting gets changed to portrait mode regardless of what it was before opening or while open. The lock screen is always in portrait mode when closed and always in landscape mode when opened. That mess needs to get sorted out. But, as long as you only ever want to use the Astro Slide in portrait mode when closed and only ever use it in landscape mode when opened, it should be fine. Except when booting the device while it's opened. Then the screen is in portrait mode and can only be changed by closing and opening it again. This could be done properly. But since it's not, having two separate automatic screen rotations (based on opening/closing the device and based on orientation) plus a manual setting may have been the wrong choice.

There is a notification from "System Update" with the title "System Update" and the message "System Update" that's almost always present. Sometimes it disappears for a short while, then it comes back. It can't be dismissed, opened, turned off or blocked. I bet there are system updates because the OS is pretty old by now and I've never done an update. But I also don't see a way to do an over-the-air update. The check in the settings says there is no update even though the security check says there has been a security patches available for over a year. Too bad those update problems weren't fixed after causing me so much frustration with the Cosmo Communicator. I'll have to research doing the update manually if I want to keep using Android. (I probably won't though.)

The keyboard backlight still doesn't turn off automatically even though there is an "Auto Keyboard Backlight" setting that seems to affect nothing. Same as with the predecessor. Maybe the setting does something less obvious. But since questions like this are almost never answered and have been ignored for years, it feels pointless to try and find out. While browsing the settings I came across an empty sub-menu. No idea what I'm missing out on and why it's empty/there.

I got the Astro with only Android pre-installed. That option was supposed to become available sooner than the others. I don't intend to use it with Android. But since that's what it has right now, I'm only writing about Android in this entry. There is a Debian variant available from Planet Computers and probably also some mobile OS other than Android, but not officially supported by Planet Computers this time. The Android comes with Planet Computers' own apps and with the Vivaldi browser pre-installed. It's also heavily bloated with Google apps. I assume Google requires this to allow Google Play Store access. Very many permissions are already given to Google apps. As with other Google Androids using Google apps and sending Google all your data feels optional but isn't. The setup after a factory reset was quick and easy. I was basically just asked for a language, that's all. The user is not forced or even asked to sign in to or create a Google account unless one of their apps is opened.

I like the display. It has no high frame rate, no resolution beyond what can be detected with perfect eyesight but also not less. It doesn't have extremely thin borders. The viewing angle is as good as it gets (better than with my recent Google Pixel). Nothing noteworthy about colours. It's a very good display. The pictures that the cameras produce are very bad though. I didn't test it in bright sunlight. I'm sure there's no major problem there. But in normally lit rooms and on a cloudy winter day outside the picture quality is really crappy. Pictures are almost always blurred unless you try really hard not to move at all. And even then all pictures are a collection of blobs created by a noise removal algorithm. Every picture makes it obvious how cheap the camera sensor is. That's what happens when you put 48 megapixels in an area where 8 megapixels could have done a very good job. The front camera actually seems to make better pictures, but not by much. I had to take a picture of the lightbulb in a lamp in order to get a picture that's not a blobby mess. The speakers aren't quite as bad. But they absolutely lack bass. It's like cheap phone speakers from 10 years ago. Not nice for listening to music. But at least you understand what people say if you're in a small and quiet room.

There is a finger print sensor integrated in the power button. But it fails more often than it works and it is delayed. I've regretted trying to use it almost every time I did. It's much less annoying to completely ignore it. That may be the fault of my fingers though. I've trained several of them. But I also have had difficulties with the finger print sensor on my Google Pixel recently. (It says to clean it, but cleaning it doesn't help much/long.) All hardware buttons aside from the keyboard are very soft, leaving the user wondering whether the button press has been recognised when the device's reaction is delayed. It's unpleasant to turn it on with a button press. But I can imagine getting used to the button positioning and feeling.

Buggedibug

There there quite a few things that I noticed that don't work smoothly. Things that might be attributed to the apps that I'm using. But I found it conspicuous how many of bugs I noticed in the first few days of using the device. My guess is that the MediaTek chipset in the Astro Slide is just not supported as well and tested as much as more widely used chipsets. Here are a few things that keep annoying me: Sometimes while playing media, the entire system becomes incredibly slow, reacting very delayed, playing video with less than 1 fps, until rebooted. Sometimes (often) it's just slow, not being able to play an H264 video in 1080p. Sometimes part of the touchscreen isn't working. Sometimes the PIN touch keyboard isn't displayed on the lock screen. Sometimes the notification light lights up or blinks shortly without any reason. F-Droid crashed several times when trying to install some apps. Overall one should expect hiccups like that, sometimes having to use workarounds like rotating the screen when the area of the touchscreen that you want to use isn't working.

This text was not written on the Astro Slide. The keyboard is just too small for long texts for my opinion. But the more I use the device the more I get used to and over its shortcomings. I'll probably try Debian on it and possibly write about that too. Debian worked pretty well on its predecessor.

File Attachments (6 files)

Comment via email

Fred - Part 3 - Power Supplies

This entry is a reply to or continuation of the entry 'Fred - Part 2 - The Case Lid And Cooling'.

After getting rid of the fan wall, the power supply was the main source of noise. The original PSU was a 3U redundant (2+1) server power supply. Noise does not matter with machines like that. I wanted to be able to have it running in my living room though, so the noise had to drop a fucking lot. Seriously, that's said so many times for people who don't work with servers like this. But people are still surprised when they hear a server fan for the first time. One of original 60 mm fans in the back is louder than my vaccum cleaner. And there were two of those, four 80 mm fans and five 40 mm fans. Three of the latter in the power supplies. Because I have no means to control the fans in software and don't need all the power the power supply can supply, I tried how much I can lower the noise by adding resistors in series to the fans. That did reduce noise a lot. But not only aren't these fans optimated for quiet operation, they are 40 mm fans. They will nver be quiet enough.

So I looked online for a power supply that

  1. fits in the case (it's not completely an ATX case)
  2. can supply enough current for everything and
  3. is trustworthy/doesn't appear to be too cheaply built

I found a Newton Power Model NPS-300AB B, which doesn't meat points 2 and 3 but fits so perfectly into the case that it was a weird feeling to accept that it is mostly coincidence. I got it for a couple of euros on ebay. Most sellers seem to think it's some piece of premium equipment because it's used in some Fujitsu servers or something. But it's really just a cheap ATX power supply in a non-standard case. But because of that non-standard case fitted so well into my non-standard server case, I got it anyway. I only had to drill the screw holes and that was it. It's hardly enough for 14 HDDs and the internet says it's really cheap and not trustworthy. But I went with it anyway in order to pay tribute to r/thingsfittinginthings.

Not a year later the PSU died. Probably overstressed it for too long. I replaced it with a better SFX unit. I had a nice and thick plate of stainless steel lying around, from which I cut an adapter plate.

I'll attach some photos below. Maybe I'll continue this series of entries on Fred some other day with experiences of dust and heat and such over time.

File Attachments (5 files)

The old power supply after it died. (The unplugged fan and the missing screws do not resemble how it looked while it was in use.)
The old power supply after it died. (The unplugged fan and the missing screws do not resemble how it looked while it was in use.)
Maybe it would have lived longer if I had cooled it better. It wasn't efficient. It would have been too loud.
Maybe it would have lived longer if I had cooled it better. It wasn't efficient. It would have been too loud.
The new power supply. Fits well in height and leaves more than enough room for its modular cables (even for the ones that aren't used) and airflow.
The new power supply. Fits well in height and leaves more than enough room for its modular cables (even for the ones that aren't used) and airflow.
I'm happy with the adapter plate and how it turned out, even though I originally made it for a different SFX unit and the fan cutout now seems redundant. But it actually looks kind of professional. That's rare enough with me. I bet you can't tell which part I made myself. (Or is this because the photo is so bad?)
I'm happy with the adapter plate and how it turned out, even though I originally made it for a different SFX unit and the fan cutout now seems redundant. But it actually looks kind of professional. That's rare enough with me. I bet you can't tell which part I made myself. (Or is this because the photo is so bad?)
I made my own modular cables with old molex connectors for the HDD backplane. The unused cables in the plastic bag has its place at the back of the PSU.
I made my own modular cables with old molex connectors for the HDD backplane. The unused cables in the plastic bag has its place at the back of the PSU.
Comment via email

Fred - Part 2 - The Case Lid And Cooling

This entry is a reply to or continuation of the entry 'Fred - Part 1 - Modding The Quiet Into A Server Rack Case'.

In this entry I'll describe how Fred's components are air cooled.

So, after removing the fan wall and unplugging the two fans in the back of the case there was no active cooling left. That's good for reducing noise, but not enough cooling for the hard drives, the CPU and the SAS controller cards. Since the case is not mounted in a rack and nothing is placed on top of it, I decided to use the space in the case lid to place larger fans.

The CPU

My idea was to replace the CPU cooler with a larger one that just fits into the case and have a fan above it suck out its hot air (also pulling in ait from the RAM modules next to the CPU socket). I fount a heat sink from Scythe called Iori (SCIOR-1000). Mounted on the socket there would be just enough space for a 15 mm fan above it. As it turns out though, the heat sink is large enough to cool the CPU passively and the RAM doesn't need any additional cooling, too. So the fan above it is not even plugged in.

The Extension Cards

Since the HBA and the RAID card that I'm using are designed for servers with a proper airflow, they need at least some additional cooling. Their heat sinks are quite small for the amount of heat they produce. But there was enough room above them to place a fan that sucks the hot ait directly from the extension card area out of the case. I was told these cards usually don't have any problems getting extremely hot. But I rather don't want to have them do their things for hours or days streight without any active cooling. Replacing their heat sinks with larger ones would only be a sufficiant option if there was room for much much larger heat sinks.

The Hard Drives

I don't want to have have hard drives run continuesly without any active cooling, especially when they are sitting in enclosures that don't allow for any aitflow without some amount of pressure. There is just no-where for the heat to go on its own in these tight drawers. I decided for three 140 mm fans that would neatly in a row behind the hard drive compartment and backplane. Since the motherboard isn't that large, there was nothing but a few cables in that area of the case. I've mounted an aluminium bar that I had lying around and tucked two pieces of flat plastic between this bar and the bar that originally held the fan wall at the bottom. That way, the air that is pressed in from above gets directed only into the hard drive compartment where it has no way to escape without passing the hard drives.

Unfortunately the room around the hard drives is so small that quite a lot of air preassure is needed to cool them as much as I wanted to. Running the fans at full speed all the time is hardly enough to keep them at a temperature that I deem acceptable. I tried to increase the cooling effect by sealing all the edges and other tiny spaces where some air could escape without cooling the hard drives. But this didn't lead to a measurable difference. I ended up taking out two of the 16 hard drives to increase the size of the duct. I chose two drives in the centre so that there now is a large surface where the air cools the remaining drives. That lowered the temperatures of the surrounding drives a lot. The temperature of the drives at the edges was of course hardly effected. But those weren't the problem anyway.

I'll probably continue about the rest of the case mod in a followup entry.

File Attachments (12 files)

Making the holes for the fans was easier than I expected. I marked the borders with a pencil by following the outlines of the actual fans, cut the rough holes with an angle grinder with a cutting disk, then did the finishing with a rotary tool (a not Dremel).
Making the holes for the fans was easier than I expected. I marked the borders with a pencil by following the outlines of the actual fans, cut the rough holes with an angle grinder with a cutting disk, then did the finishing with a rotary tool (a not Dremel).
I used up several cheap grinding bits for the finishing. The remaining borders between the fas are only a few millimeters wide. But the ~2 mm thick steel holds up surprisingly well. They don't make regular home computer cases from that material.
I used up several cheap grinding bits for the finishing. The remaining borders between the fas are only a few millimeters wide. But the ~2 mm thick steel holds up surprisingly well. They don't make regular home computer cases from that material.
First coat: primer, second coat: matte black, thirdly added sparkly sprinkles. In the picture I started taping the sides for what comes next.
First coat: primer, second coat: matte black, thirdly added sparkly sprinkles. In the picture I started taping the sides for what comes next.
Then I painted the middle part pink. After the tape was removed I noticed the paint came off in one spot. Well, that's how it goes if you don't do it right. I can just cover this with a sticker. For now I just added a matte clearcoat.
Then I painted the middle part pink. After the tape was removed I noticed the paint came off in one spot. Well, that's how it goes if you don't do it right. I can just cover this with a sticker. For now I just added a matte clearcoat.
In between cooling systems. I tested the modded lid as it was in the picture but closed. It did do something and it was better than the open case with scattered fans in the next picture, but not by much.
In between cooling systems. I tested the modded lid as it was in the picture but closed. It did do something and it was better than the open case with scattered fans in the next picture, but not by much.
That's how it looked for a day while I used the NAS before finishing the new cooling system. Notice the large space in the middle. That will be used in the next pictures.
That's how it looked for a day while I used the NAS before finishing the new cooling system. Notice the large space in the middle. That will be used in the next pictures.
This is how the case looked inside now. (I'll write about the power supply in the next entry.)
This is how the case looked inside now. (I'll write about the power supply in the next entry.)
And from the outside. The fan on the bottom right cools the RAID card and the HBA. I don't know if it's cooling it enough because I don't know what the cards/processors are made to withstand. But they still ran a few years after that picture was taken. The CPU fan is off because it stays cool enough during a hours-long burn test.
And from the outside. The fan on the bottom right cools the RAID card and the HBA. I don't know if it's cooling it enough because I don't know what the cards/processors are made to withstand. But they still ran a few years after that picture was taken. The CPU fan is off because it stays cool enough during a hours-long burn test.
The cooler mount wasn't made for that socket. I think it was for an AMD socket. The bracket was really strong and tight and eventually broke in two. The CPU lid didn't take any damage though and I simply used a few zipties to hold the cooler in place without much preasure on the CPU. That still was enough to cool the CPU passively and the machine ran three quarters of a year that way.
The cooler mount wasn't made for that socket. I think it was for an AMD socket. The bracket was really strong and tight and eventually broke in two. The CPU lid didn't take any damage though and I simply used a few zipties to hold the cooler in place without much preasure on the CPU. That still was enough to cool the CPU passively and the machine ran three quarters of a year that way.
Eventually I made my own bracket (not in the picture) and now that is held down by zipties. It's quite sturdy.
Eventually I made my own bracket (not in the picture) and now that is held down by zipties. It's quite sturdy.
Comment via email

Fred - Part 1 - Modding The Quiet Into A Server Rack Case

Fred is an old Supermicro rack server that I got as an attempt at building a NAS that replaces all the smaller NASs that I already had. But I like to collect stuff and it's never going to be enough. So it ended up being just another extension of my home network.

Overview

It's an old 3U Supermicro server case with 16 3.5" hard drive drawers, a good but not too bulky Asus motherboard and a nice low-power Intel CPU. I kept the motherboard, CPU and 32 GB ECC RAM. It's more than enough.

I wanted to do some mods on the case though to make it more comparible to my home and my visual taste in computer cases. In short, what I did was: Switch the PSU to a quieter one, build fans into the lid for quieter drive and card cooling, painted the case, switched the CPU cooler for passive cooling, added two HBA cards and 14 8 TB hard drives (two drawers left intentionally free).

I will tell about/may document these mods in more detail in separate entries.

File Attachments (5 files)

The case before I started (but not before I added some stickers)
The case before I started (but not before I added some stickers)
The pretty much finished case
The pretty much finished case
Comment via email

PIN Changer

I had to change the default PINs of over 200 SIM cards once. And such a situation could arise again. So I've built a PIN changer in which I just have to insert the card, wait a few seconds and it's done.

The Card Slots

SIM cards in their natural form factor aren't as fiddly to handle as they are in the form factors most people know, which is Mini SIM, Micro SIM and Nano SIM. Classical SIM cards are the same size as other smart cards. I found a card slot with an end switch on eBay. I like it when I find industry grade parts for cheap on eBay as part of some remaining stock. Additionally I've used a slide-in mini SIM slot and another, separate end switch from my parts collection in case I to change the PINs of smaller cards.

The Baseband Processor

Other parts that I've used is an Arduino Nano sized Arduino Nano nearly-clone and an A6 modem module. There are many similar modem modules designed around different but similar ICs. Many of them are cheap and widely used for DIY IoT projects. So example code for the Arduino and other help can be easily found on the web. I don't know why I went with a module with an A6. But it works fine and there are an Arduino library for it as well as cheap modem modules with it available.

(tba:voltage supply)

The Controller

Yes, Arduino may be kind of the noob go-to board and could look up how to use microcontrollers on their own finally and even if I don't want to I could finally start to use ESP32s like everybody else. But I know Arduinos and by now I'm familiar with it and it works, so, whatever. Arduino Nano is kind of my go-to form factor now because they have integraded USB, are Uno compatible and small. Unless I need more or something very specific I use Arduino Nano almost-clones with USB-C port.

The Code

The code is a real mess. It had been a long time since I had written any even halfway serious C. It may have been the first time, actually. The sketch surely is very easily improved by somebody who knows what they are doing. I intended to improve it myself. But the project is currently abandoned and The code is doing what it should in a way I initially had in mind as the goal. But I'll leave the mess of the comments in for the case that somebody wants to make out what I was thinking.


// Funktionen umschreiben: Beim Empfangen wird erwartet: 1. der AT-Command zurück, 2. eine Antwort, 3. OK oder ein ERROR.
//                         Daher sollte abgefragt werden, bis entweder OK oder ERROR kam oder 20/50/9001(?) Abfragen lang weder OK noch ERROR an kam.
//                         Die Antwort in Variable speichern? Naja, String zurückgeben halt.
//                         Antworten, die mit "^" anfangen brauchen nicht gehandlet zu werden, da keine Kommandos, die mit AT^ beginnen gesendet werden.


#include  

SoftwareSerial A6MODULE(6,7);
int intled = 13; // Internal LED
int successled = 8; // Green LED
int failled = 9; // Red LED
int wrongpinled = 10; // Orange LED

boolean debug=true;

//String commands[5] = { "AT", "AT+CPINC2", "AT+CPIN?", "AT+CLCK=\"SC\",2", "AT+CPIN=\"3010\"" };
//int command = 0;

const byte maxmsglength = 32;
char received[maxmsglength];
boolean newData = false;
String response = "";

int i=0;

/*
To check/do:
1  AT: OK?
2  is PUK required - abort
3  are less than 3 PIN attempts left? - abort AT^CPINC=?
4  is PIN disabled
       5  enable it: 0000
6  is PIN enabled
       7  unlock
8  is card unlocked
       9  change PIN: 1996
              was PIN wrong - report and leave it
*/


void setup() {
  pinMode(intled, OUTPUT);
  pinMode(successled, OUTPUT);
  pinMode(failled, OUTPUT);
  pinMode(wrongpinled, OUTPUT);
  // All LEDs turn on at the beginning and stay on during the wait period at the beginning, then turn off before communication with the A6 module starts.
  digitalWrite(intled, HIGH);
  digitalWrite(successled, HIGH);
  digitalWrite(failled, HIGH);
  digitalWrite(wrongpinled, HIGH);
  Serial.begin(9600);
  delay(500);
  digitalWrite(intled, LOW);
  digitalWrite(successled, LOW);
  digitalWrite(failled, LOW);
  digitalWrite(wrongpinled, LOW);
  A6MODULE.begin(9600);
  delay(500);
  digitalWrite(intled, LOW);
}

void loop() {
  sendtoa6("AT");
  if(getfroma6("OK")) {
//    sendtoa6("AT+CPIN?");
//    if(getfroma6("+CPIN:SIM PUK")) { fail; }         // If the required password is PUK, abort.
//    sendtoa6("AT+CPIN?");
//    if(getfroma6("+CPIN:SIM PIN2")) { fail; }        // If the required password is PIN2, abort.
//    sendtoa6("AT+CPIN?");
//    if(getfroma6("+CPIN:SIM PUK2")) { fail; }        // If the required password is PUK2, abort.

// WAIT FOR SWITCH RELEASE FIRST
    sendtoa6("AT+CPIN?");
    getfroma6("+CPIN:SIM PIN");                      // The last non-empty response will be stored in the global response variable. Problem with this: If the A6 module sends an unsolicitated message before the response to the CPIN command, nothing gets done and the card needs to be re-inserted again.
    if(strcmp(response, "OK") == 0) {                // If already no PIN is required

//      sendtoa6("AT+CLCK=\"SC\",2"); // Ist PIN-Abfrage eingeschaltet? Oder ist es "SC"?
//      if(getfroma6(???)) { PIN-Abfrage einschalten mit 0000; }

      // ENABLE PIN HERE
      d("I don't know how to enable the PIN.");

    }
    if(response = "+CPIN:SIM PIN") {                 // If the required password is PIN, continue.
      sendtoa6("AT^CPINC=?");
      if(getfroma6("^CPINC: 3")) {                   // If not exactly 3 attempts are left, abort. (should be larger than or equal to 3, shouldn't it?)
        sendtoa6("AT+CPIN=\"0000\"");                // Freischalten mit 0000
        delay(50);
        if(!getfroma6("OK")) { fail; }               // If that was not the right password, abort.
        sendtoa6("AT+CPWD=\"SC\",\"0000\",\"1996\"");// PIN ändern
        delay(500);
        if(getfroma6("OK")) { Serial.println("Looking good."); }

//      sendtoa6("AT+CMGD=0,4"); // Should delete all SMS
//      if(getfroma6(???)) { ; }
        d("I don't know how to delete SMS.");

        sendtoa6("AT+CPIN?");
        if(getfroma6("+CPIN:READY")) {
          
          // TURN OFF A& MODULE FOR SAFE CARD REMOVAL

          digitalWrite(successled, HIGH);
        }
      } else {                                         // If not exactly 3 times left
        fail;
      }
      delay(1000);
    }
  }
}

void fail() {
  digitalWrite(failled, HIGH);               // Turn red fail LED on and ...
  d("Something failed! Ending programme.");
  while(1);                                  // ... don't do anything anymore.
}

void wrongpin() {
  digitalWrite(wrongpinled, HIGH);           // Turn yellow LED on and ...
  d("Wrong PIN! Ending programme.");
  while(1);                                  // ... don't do anything anymore.
}

//boolean getfroma6(char str[32], char str1[32], char str1[32], char str1[32], char str1[32], char str1[32]) { // Returns true if the passed (expected) message was received, false if anything else was received.
boolean getfroma6(char str[32]) { // Returns true if the passed (expected) message was received, false if anything else was received.
  boolean asexpected = false;
    for (i = 1; i < 9; ++i) {
    receivelinefroma6();
//    d("d1 "+response);

    if(received[0] == '\0') {                            // If the received message is empty
      continue;
    } else {
      response = received;
    }
    if(strstr(received, "ERROR") != NULL) {              // If the received message contains "ERROR"
      d("Received an error: "+response);
      fail;
    }
    if(received[0] == '+') {                             // If the received message starts with a "+" sign
      d("Reseived response: "+response);
    } else {
      if(strstr(received, "OK") != NULL) {               // If the received message is "OK"
        d("Received OK.");
        asexpected = true;                               // Also treat OK like the expected message. No unexpected OK should ever be sent from the A6 module. So this is fine. No, it is, really.
//        if(asexpected) { return true; }
      } else {
        if(strncmp(received,"AT",2) == 0) {              // If the received message starts with "AT"
          d("Received AT: "+response);
        } else {                                         // For any other received message
          d("Received: "+response);
        }
      }
    }
    newData = false;
    if(strstr(received, str) != NULL) {
      d("Received expected message: "+response);
      asexpected = true;
    }
  }
  if(asexpected) { return true; }
  return false;
}


//void handleresponse() {
//  response = received;
//  if(received[0] == '+') {
//    d("               Response: "+response);
//  } else {
//    if(strstr(received, "OK") != NULL) {
//      d("               It's okay.");
//    } else {
//      if(strncmp(received,"AT",2) == 0) {
//        d("               I've sent: "+response);
//      }
//    }
//  }
//  newData = false;
//}



void receivelinefroma6() {
  delay(80);
  static byte counter = 0;
  char rc;
  
  received[0] = '\0';

  while (A6MODULE.available() > 0 && newData == false) {
    rc = A6MODULE.read();

    if (rc != '\n') {
      received[counter] = rc;
      counter++;
      if (counter >= maxmsglength) {
          counter = maxmsglength - 1;
      }
    }
    else {
      received[counter] = '\0'; // terminate the string
      counter = 0;
      newData = true;
    }
  }
}

void sendtoa6(String command) {
//  Serial.println(command);
  A6MODULE.println(command);
  d("Sent: "+command);
}

void d(String line) {
  if (debug == true) { Serial.println(line); }
}

(tba:connections,assembly,photos?)

Comment via email

USB/Serial PWM Fan Controller Using an Arduino

I wanted to be able to control the speed of the fans in my big NAS, Fred, individually. Even though the mainboard in use has five PWM fan connectors, the chipset can only control the speed of all fans together. There are probably good fan controllers commercially available that solve this problem better than I did. But they seemed overpriced and it seemed like a fun learning project for me.

The fan controller that I made uses an Arduino Nano clone that listens to it's serial port, waiting for a command to change the speed of a fan. When a command is recognised the continuous PWM signal for that fan is changed accordingly. It's possible to control up to six fans this way with an Arduino Nano. I'm only using three though since I only have three fan groups that need to be controlled separately.

The Arduino sketch/C code for the Arduino Nano that I used is as follows.




//fan speed sensor wire attached to digital pin 2 with a 10kohm pullup resistor
//fan PWM control wire attached directly to digital pin 9

#include <PWM.h> //include PWM library http://forum.arduino.cc/index.php?topic=117425.0

volatile int half_revolutions1; //allow half_revolutioins to be accesed in intterupt
volatile int half_revolutions2; //allow half_revolutioins to be accesed in intterupt
int rpm1; //set rpm as an integer
int rpm2; //set rpm as an integer
int pwm=255;
const byte numChars = 5;
char receivedChars[numChars];

boolean newData = false;

void setup()
{
  InitTimersSafe(); //not sure what this is for, but I think i need it for PWM control?
  bool success = SetPinFrequencySafe(9, 25000); //set frequency to 25kHz
  pwmWrite(9, 51); // 51=20% duty cycle, 255=100% duty cycle

  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  analogWrite(5, 170);
  analogWrite(6, 255);
  pinMode(2,INPUT_PULLUP); //set RPM pin to digital input
  pinMode(3,INPUT_PULLUP); //set RPM pin to digital input
  half_revolutions1 = 0;
  rpm1 = 0;
  half_revolutions2 = 0;
  rpm2 = 0;

  Serial.begin(9600);
}



void loop()
{
  sei(); //enable intterupts
  attachInterrupt(0, fan_rpm1, RISING); //record pulses as they rise
  delay(1000);
  detachInterrupt(0);
  attachInterrupt(1, fan_rpm2, RISING); //record pulses as they rise
  delay(1000);
  detachInterrupt(1);
  cli(); //disable intterupts

  rpm1 = (half_revolutions1/2)*60;

  Serial.print("1");
  Serial.println(rpm1);

  rpm2 = (half_revolutions2/2)*60;

  Serial.print("2");
  Serial.println(rpm2);

  rpm1 = 0;
  half_revolutions1 = 0;

  rpm2 = 0;
  half_revolutions2 = 0;

  pwm = 255;
  recvWithStartEndMarkers();
  processCommand();
}

void fan_rpm1()
{
  ++half_revolutions1; //increment before returning value
}


void fan_rpm2()
{
  ++half_revolutions2; //increment before returning value
}


void recvWithStartEndMarkers() {
    static boolean recvInProgress = false;
    static byte ndx = 0;
    char startMarker = 's';
    char endMarker = '\n';
    char rc;
 
    while (Serial.available() > 0 && newData == false) {
        rc = Serial.read();

        if (recvInProgress == true) {
            if (rc != endMarker) {
                receivedChars[ndx] = rc;
                ndx++;
                if (ndx >= numChars) {
                    ndx = numChars - 1;
                }
            }
            else {
                receivedChars[ndx] = '\0'; // terminate the string
                recvInProgress = false;
                ndx = 0;
                newData = true;
            }
        }

        else if (rc == startMarker) {
            recvInProgress = true;
        }
    }
}

void processCommand() {
    if (newData == true) {
        Serial.print("s");
        Serial.println(receivedChars);
        switch (receivedChars[0])
        {
            case '1':
                receivedChars[0] = '0';
                sscanf(receivedChars, "%d", &pwm);
                analogWrite(5, pwm);
                break;
            case '2':
                receivedChars[0] = '0';
                sscanf(receivedChars, "%d", &pwm);
                analogWrite(6, pwm);
                break;
            case '3':
                receivedChars[0] = '0';
                sscanf(receivedChars, "%d", &pwm);
                
                break;
//            default:
//                Serial.println("I don't know what that means.");
        }
        newData = false;
    }
}

Well, how should I put it? It works, usually.

(tbc?)

(tba:photos)

Comment via email

My Atrocities to Vintage Hardware and Software

I've thrown away a lot of stuff over the time that I mourn now. This is just to say: I'm sorry!

I feel bad when I think back and remember some things that I had collected, didn't value back then, but miss now. I had a lot of computer hardware that wasn't worth anything at the time. (Like 386 and 486 stuff in the 2000s.) I'd love to play with some of the stuff today sometimes. I think it was a waste to throw them out knowing that nobody will ever use them again. There was also an IBM PS/1 in good condition. That would be a very nice thing to own for a retro computer fan today. (It already was back then.) I also had years worth of c't magazines that I had a subscription for for a while. I had my reasons. I didn't have room to store so much stuff. But still. Maybe I could have kept just a few more things.

Even worse is that I've thrown away quite a few floppy disks with very rare software. The things I wrote back then are one thing. Nobody has a copy of these programmes I'm sure. The collection of Prologue OS software is another. Prologue was a French UNIX-like (yes, I said UNIX-like) OS for industrial applications. As far as I know there is no successor in development or still supported. It's a piece of computer history that, due to the relatively small regional spread, is not at the forefront of vintage software archives. In fact I've never seen any software for Prologue nor a version of the OS itself anywhere on the internet. The collection contained multiple versions of the OS from I don't know how long of a time span and a range of applications. The source code for many applications was also there (because of a familial connection to the author). At least some of the floppies likely contained the last copy in existence of software that was once very important in the daily work of some people.

I'm sorry!

Comment via email

Fujitsu Cordant Pentium II Aluminium Case Mod

I always wanted an aluminium case. A friend gave me this Pentium II he finally decided to get rid of last year. Nice PC, but even nicer in black and with newer hardware in it.

I suck at spray painting and I need to get better paint next time. But if the light comes from the right angle it looks like I imagined it.

I replaced the key lock with a large screw, got rid of the drive cages, replaced the PSU and mainboard, added a graphics card with internally pluggable VGA, replaced the external VGA port with a serial port and added a small LCD panel where the drives used to be, connected internally to the unplugged VGA port. Oh, and green LED strips. I also added two 60 mm fans in the back. I didn't want to cut a whole in any of the other sides, so 60 mm was the largest possible size. Still better than none.

And yes, I actually have a use for a RS232 port.

The main reason I put in the LCD is because I can. I liked the idea ever since I saw a build with a two-line character LCD for status messages around 2004. But nowadays there is a lot more space on the front since optical drives and diskette drives have become rare. So why not make it a regular screen that can be addressed by the OS without much custom code? The idea is to have it display CPU load, temps, notifications and stuff. But I may end up using it mainly for art, animations. I'm not sure, yet.

File Attachments (34 files)

Comment via email
Mastodon