Category Archives: Uncategorized

Hyper-V Access Denied

After reinstalling windows (now running 8.1) on my main machine and connecting to a Hyper-V server running on my server machine (Hosting Win Server 2012, etc) I encountered a problem. For some  reason it said “Access Denied. Unable to establish communication between […]”. Googling around resulted in a find of this blog post by Philip Elder. These are the steps to solve the issue:

  • Go to Component Services (%windir% -> search for  “dcomcnfg” and launch dcomcnfg.exe)
  • Go to Console Root -> Component Services -> Computers -> My Computer
  • Right click on My Computer and go to COM Security tab
  • Click on “Edit Limits…” in Access Permissions area
  • Select ANONYMOUS LOGON group and enable Remote Access permission
  • Launch Hyper-V Manager and select required VM. It should connect without any issues

Component Services

 

The information here is based on Philip Elder’s article. I recreated the set of steps in this blog post to make it easier for me to find this information when needed.

Readiness For Change test

ReadinessForChange

 

My workplace wanted an HTML + JS implementation of a questionnaire that their users could perform and test their clinical practice. I was given an overall design of the page and had to implement it.

Everything is handled by the JavaScript that’s running client-side.

You can check it out here.

And please take a look at the Change Guide here (requires registration).

Epic Re:load v2 modifications

IMG_9017TITLE_small

I have decided to upgrade the radiator for the FET to a bit larger one. I’ve also made some mountings form L shaped brackets for the potentiometer and have changed the original one to a 10 turn one.

Also, I managed to a really awesome knob for the 10 turn pot. The cool thing is that it calculates the turns and always shows the position that the potentiometer is at.

The original radiator resulted in the FET’s thermal protection kicking in when running larger loads. That’s the main reason for this “upgrade”. The radiator I used is probably a bit too large for what I want to achieve, but it can definitely dissipate the heat that the FET produces.

I could not find any box laying around that the dummy load could be mounted in, so I opted out for mounting everything on the radiator itself. In the final version I moved the control knob and the banana connectors (can be seen in the title photo) to the other side of the radiator so that it’s way more compact.

I do really like the final result. Of course, I should at least file the L brackets to make it look nicer, but the dummy load does what it’s supposed to do.

Please see a video overview of the whole process on my YouTube channel here:

Scams online

Several days ago I received the message below from John Kashani (jkashani1) as a Skype message. It makes quite an interesting read… It’s clearly a scam! Be careful.

[21/06/2012 04:06:22] John Kashani:

Dear Sirtautas,

I have been in search of someone with this last name “Sirtautas”, so when I saw your name I was pushed to contact you and see how best we can assist each other. I am Mr. John Kashani, regional manager in one of the leading bank here in Acrra Ghana. I believe it is the wish of God for me to come across you on search now. I am having an important business discussion I wish to share with you which I believe will interest you because, it is in connection with your last name and you are going to benefit from it.

One Late Mr. George Sirtautas, a citizen of your country had a fixed deposit with my bank in 2004 for 36 calendar months, valued at US$6,000,000.00 (Six Million United State Dollars) the due date for this deposit contract was this 16 of January 2007. Sadly GEORGE was among the death victims in Tuesday, May 02, 2006 fatal accident in the Ashanti Region road, Ghana that killed 14 people. He was on a business trip and that was how he met his end.

My bank management is yet to know about his death, I knew about it because he was my friend and I am his account officer. Mr. GEORGE did not mention any Next of Kin/ Heir when the account was opened, and GEORGE was not married and no children. Last week my Bank Management requested that i should give instructions on what to do about his funds, if to renew the contract.

I know this will happen and that is why I have been looking for a means to handle the situation, because if my Bank Directors happens to know that GEORGE is dead and do not have any Heir, they will take the funds for their personal use, so I don’t want such to happen. That was why when I saw your last name I was happy and I am now seeking your co-operation to present you as Next of Kin/ Heir to the account, since you have the same last name with him and my bank head quarters will release the account to you. There is no risk involved; the transaction will be executed under a legitimate arrangement that will protect you from any breach of law.

It is better that we claim the money, than allowing the Bank Directors to take it, they are rich already. I am not a greedy person, at the conclusion of this business, you will be given 40% of the total amount, 50% will be for me and 10% will be for orphanage homes, my share will assist me to start my own company which has been my dream. Let me know your mind on this and please do treat this information as TOP SECRET.

Please reply as soon as possible to my private email account below so that i will give you full details on how the business will be executed: gjkashani@gmail.com

I look forward to hear from you as soon as possible.

Best Regard,
Mr. John Kashani.

gjkashani@gmail.com

Project LIBMS: Li-Ion Battery Monitoring System

Creative Commons LicenseLIBMS by Vaidas Sirtautas is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
 Permissions beyond the scope of this license may be available
at https://sadiav.wordpress.com

Video

or you can watch in HD on Youtube.

Problem

Let’s start with a problem…

In order to have my phone as well as my BlueTooth audio headset working I had to carry two different chargers to workplace.  Moreover, I needed to find an unused socket to plug them in. And that’s really annoying…

Idea

I could see two possible solutions:

  • Buy a charger that uses batteries and provides 5V to charge my devices
  • Build one of my own

And, of course, I went with choice #2. I had some Lithium Ion batteries lying around. And this was the starting point of LIBMS.

LIBMS

It would be crazy to just power devices through some voltage regulator. LiIon cells do not like to be discharged below 3V and without some additional circuitry it was impossible to check whether they were OK to continue providing power to the devices. (Well, I could carry a multimeter and measure each of them from time to time, but that would be crazy :))

I found some IC’s that are capable of monitoring LiIon batteries, but where’s the fun in that…

I had some Atmega328 chips laying around. They have a 6 channel 10-bit ADC (there is actually only one ADC, but built-in multiplexer expands the inputs to 6). Awesome.

Batteries

I connected 3 of the batteries in series and then that block with another block of three batteries in parallel. V1..V6 show my tap points that are used to measure each cells voltage. E.g.

  • V(G2) = V2 – V1
  • V(G3) = V6 – V(G2)
  • V(G6) = V6 – V(G5)

Batteries are connected this way

Voltage regulators

At the beginning of this project I had some problems with voltage regulation. I powered the microcontroller (uC) directly from the main voltage regulator (LM338), but when a device was connected that requires a lot of current the voltage suddenly dropped and uC restarted. Not good…

I solved this problem by introducing secondary LM7805 voltage regulator that is used to power the uC and LM338 takes care of the USB ports. Using this structure provided me with a cool way for controlling the USB ports from uC.

Browsing through the LM338’s data-sheet I found an example where the regulator can be controller using a TTL signal. Perfect. Even though it does not shut down completely (there is still ~1.25V on the output), it does the job.

Sensing part

Because Atmega328 can measure up to 5V max, I had to scale down the voltages of the cells. To do that I used voltage dividers. There are 5 of them, connected to ports A0..A4. Resistors (with values specified) are R1..R10 in the schematic.

Schematic & PCB layout

*Click on the images for hi-res version.

There is a 10K pull-up resistor (not shown in schematic) connected from BC337 base to Vcc to ensure that Voltage regulator stays off while uC is starting up.

Code

This code was written using Arduino IDE (www.arduino.cc)

int analogValues [5];
int voltages[6];

unsigned char i; // Loop variable
byte LEDs = 0;
byte tempLEDs = 0;
boolean turnOn = true;
boolean updated = false;
boolean firstrun = true;
byte portVal;

byte LEDstates[] = {
0xFF, 0xDF, 0x9F, 0x1F, 0x0F, 0x07, 0x03, 0x01, 0x00};

void setup()
{
// Set Transistor's pin to output
pinMode(8, OUTPUT);
digitalWrite(8, HIGH);

// Set LED pins to outputs
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);

// Set analog inputs
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(A3, INPUT);
pinMode(A4, INPUT);

// Disable Pull-up resistors on analog pins
digitalWrite(A0, LOW);
digitalWrite(A1, LOW);
digitalWrite(A2, LOW);
digitalWrite(A3, LOW);
digitalWrite(A4, LOW);

for (i = 0; i < 9; i++)
{
tempLEDs = LEDstates[i];
updateLEDs();
delay(500);
}
delay(1000);
}

void updateLEDs()
{
PORTD = (PORTD & 0x1F) | (tempLEDs & 0xE0);
PORTB = (PORTB & 0xC1) | ((tempLEDs & 0x1F) << 1);
}

// Scale because of voltage divider by 2.624
void loop()
{
if (turnOn && updated)
{
digitalWrite(8, LOW);
updated = false;
}
if (!turnOn && updated)
{
// Serial.println("turn OFF");
digitalWrite(8, HIGH);
updated = false;
}

// Read status of all batteries
for (i = 0; i < 5; i++)
{
analogValues[i] = analogRead(i);
delay(10);
}

voltages[0] = analogValues[4];
voltages[1] = analogValues[3] - voltages[0];
voltages[2] = analogValues[2] - voltages[1] - voltages[0];
voltages[3] = analogValues[1];
voltages[4] = analogValues[0] - voltages[3];
voltages[5] = analogValues[2] - voltages[4] - voltages [3];

// Take care of low voltage per cell situations
//  Minimum threshold for a cell is 3.0V.
// Minimum value is 3/(5/1024) = 614.4
// Scaled because of voltage divider by 2.624,
//   so 3V = 614/2.624 = 234 units
boolean stopLoop = false;
i = 0;
while ( i < 6 && !stopLoop)
{
if (voltages[i] < 234)
{
stopLoop = true;
turnOn = false;
updated = true;
digitalWrite(8, LOW);
// Enter infinite
loop while (1) { };
}
i++;
}
//Serial.println(analogValues[2], DEC);
// Take care of LED's
if (analogValues[2] > 920) // 11.8V
tempLEDs = LEDstates[0];
else
if (analogValues[2] > 889) // 11.4V
tempLEDs = LEDstates[1];
else
if (analogValues[2] > 858) // 11.0V
tempLEDs = LEDstates[2];
else
if (analogValues[2] > 827) // 10.6V
tempLEDs = LEDstates[3];
else
if (analogValues[2] > 796) // 10.2V
tempLEDs = LEDstates[4];
else
if (analogValues[2] > 765) // 9.8V
tempLEDs = LEDstates[5];
else
if (analogValues[2] > 734) // 9.4V
tempLEDs = LEDstates[6];
else
tempLEDs = LEDstates[7];

// Something changed in total battery voltage
if (LEDs != tempLEDs)
{
LEDs = tempLEDs;
updateLEDs();

/* My old idea...

// First three LED's
tempLEDs = tempLEDs >> 5; // Right shift by 5 to get first three bits
tempLEDs = tempLEDs << 5;

portVal = PORTD;
portVal = portVal << 3; // Right shift to get rid of last three bits; portVal = portVal >> 3; // Left shift to restore first 5 bits to their positions
PORTD = portVal | tempLEDs;

// Restore temp value that changed because of all the shifting
tempLEDs = LEDs;

// Last five LED's
portVal = PORTB;
tempLEDs = tempLEDs << 3; // get rid of first three bits tempLEDs = tempLEDs >> 2; // position temp byte correctly

if (turnOn) tempLEDs = tempLEDs | 1;
PORTB = tempLEDs;

// Restore temp value that changed because of all the shifting
tempLEDs = LEDs;
*/

}

if (firstrun)
{
updated = true;
turnOn = true;
firstrun=false;
}

// Delay before next run
delay(1000);
}

 

Eagle files

Will be uploaded later

KatMouse issues

I’ve set up a new system at home to use as my primary PC. That, of course, required reinstalling all of the programs I use daily.

Firstly it was Firefox and then KatMouse. (KatMouse is an amazing little app that does not require you to have window activated in order to scroll it. You just have to keep your mouse cursor over it.)

I got myself in a huge problem. My Logitech Anywhere MX mouse could not close tabs or open links via middle button click.

By default in Logitech’s Set Point software it’s set as “Application Switcher”. I, of course, changed it to “Middle Button”.

Everything should be fine, but no… It was still switching between windows as previously. That got me mad… I even created post on Logitech support forums. After a while playing with KatMouse‘s settings I finally figured out where the problem is.

In the settings in the Wheel Button tab None of the buttons should be selected “as push button”.

Then everything works like a charm :).

Nitro tutorials (video)

After playing with my HPI Trophy 3.5 I stared on looking for more info about the way to take care of the engine and the car itself. Today I found an amazing series with tutorials related to Nitro engines.

Series was created by Squirrelod. Tutorials really helped me to understand the inner parts of a nitro engines. Please take a look 😉

Complete list of the videos in the series:

Unfortunately videos are not in high quality, but everything is quite viewable…

Hello

Hello to everyone, it’s time to start blogging.

Mostly this blog will consist of info about the projects I’m working on.

You can find more info about me on

hopefully it’s going to be fun for both you, my reader, and me.