Skip to main content

Posts

Showing posts from April, 2007

How to setup 2FA On Linux SSH Login

  This is a simple setup guide to enabling Two Factor Authentication (2FA) on Linux SSH login. I this article I wont go deep into setup and issues that I have faced when implementing this. First thing is first Update your system first. I have used Ubuntu 20.04 and it is always up to date. To enable 2FA you need to install google authenticator modules sudo apt install libpam-google-authenticator Configuration for PAM and SSHD Add the the following line to /etc/pam.d/sshd and After adding this line please restart the sshd services.  auth required pam_google_authenticator.so Go to /etc/ssh/sshd_config and check if the following line exist. Default value will be "no" so change it to "yes" to activate.  ChallengeResponseAuthentication yes Configuration for Authenticator In the terminal run google authenticator command It will ask few things to acknowledge by user. Details you can see from the below video. Once this part is done you are ready to use the 2FA in ubuntu. T

Propeller Clock...cont

I almost spend two days on this experiment and just found that the new concept in this experiment works well. But the problem comes when we think of current. The current that i get is two low to power on electronics. The moving transformer concept is cool one to experiment. ;) (this message is for electronics dudes out there). I wound coil on the moving part(150 Turns) of the fan and wound another coil that will be fixed around the moving part(200 Turns). Then i gave PWM signal to the GATE of FET which is connected to the fixed coil, at the frequency of 20KHz. I used FET because it is capable of high speed switching then transistors. Finally i got an AC voltage across the the moving coil(7.8 V) and then i connected an LED just to check the performance. Actually the concept works (Transfer voltage to an moving coil). Bad part is the current is too low and if i want to increase the current i need to wound think gage coil and this will become expensive for this kinda small projects. If yo

Propeller clock begins

Today i will start the propeller clock project. It was hold for several months and after some new ideas plus researches i finally changed the propeller clock's electronics. Its bit changed with new tech and exciting things. So hold on for few days..i will upload pics and much more from the project.

Writing an library to shiftregister...continued

Now the code has been cut down to less that 30 lines. here is a part of the code... do{ if(input(pin_a0)) { test = 0b11011011; } else if(input(pin_a1)) { test = 0b10011001; } for(i=0;i<8;i++) { value = bit_test(test,i); output_low(S_CLK); output_low(L_CLK); if(value==1) { output_bit(Data,1); output_bit(S_CLK,value); output_bit(Data,0); } else if(value==0) { output_bit(S_CLK,1); output_bit(S_CLK,0); }

Writing an library to shiftregister.

It seems stupid cause there are many cool libraries for shift registers, but for me i just need to try from my own one. It dosent' matter if the code is long or messy.. when i first trying to write this i separated all the parts. Which means a separate part for shift clock, latch clock and data, this way i wrote the code and it was more than 80 lines but later it was cut down to 30 something lines. Now i have reach to my destination, it was to make an own library to operate a shift register. I think this way will make you understand how it works. I hope this will be a great idea for electronics hobbyists out there. If you are new to shift register i can just give an hint. Its basically D-type Flip Flops, when serial data is inserted to it. it will out put the parallel data. Normally used to expand I/O lines. Datasheet for 74LS595

RPM

Last week i was too busy with office projects and i did not have any time for my micro controllers..But now i am free from office work so i continued my projects. I am designing a small circuit to operate a stepper motor and the circuit will detect the rotation/minute to get the RPM and send to PC. So from hyper terminal you will able to see the RPM. I am planning to get the direction it move. Soon i will upload some more description of it.

RS232- Serial communication.

I tested the communication between PC and Micro controller and finally my tests was perfect. I send an "Hello World" message to PC and from hyper terminal i am able to see the message. Bingo this is another way we can view data other than an LCD. Later code for the temperature sensor and now the temperature is monitored using PC. So this way we can monitor remotely. I think i should by some wireless modules to interface the micro controller to send data. hope soonnnn..

Hot n Cold....

I did some tests with LM35DZ, which is a temperature sensor with analog out put. I connected it to micro controller's ADC (Analog to Digital Converter). The out put of the sensor is 10mV/°C After some calculations, ADC value was converted to centigrade. Finally it works, i am able to monitor the room temperature from my LCD Display. At beginning i used an my multimeter to differentiate the sensor value and actual room temperature, the meter reading and LCD reading was perfect. After a while i got an idea to detect temperature and give alarm or warning. I modified the code and little bit and tadaaaaa i can verify the temperature variation. Actually i did was if the temperature is greater than 40°c, give an warning, lit an LED or drive a buzzer. I think this is a cool one for these days. Cause its hot..