czwartek, 27 czerwca 2019

RedPitaya authentication with 802.1x in wired networks via eth0

I searched Internet for a solution but I haven't found it, so I share it here. There is a simple way of configuring RedPitaya to connect it to a wired network which requires authentication by 802.1x. It is enough to add wired.conf file into: /etc/wpa_supplicant/ with the parameters provided by the network administrator and run a command as follows:
wpa_supplicant -i eth0 -D wired -c /etc/wpa_supplicant/wired.conf -B
An example of wired.conf file:
ctrl_interface=/run/wpa_supplicant

ap_scan=0

network={
        eapol_flags=0
        key_mgmt=IEEE8021X
        eap=TTLS
        phase2="auth=PAP"
        identity="MyUserId"
        anonymous_identity="MyUserId"
        password="MyPassword"
        priority=80
}  

środa, 7 listopada 2018

Red Pitaya output noise

Recently I've found very interesting post Adding voltage regulators for the RedPitaya output stage. As I'm using Red Pitaya I decided to analyse the problem with my 14bit Red Pitaya. I performed measurements similar to the one published by lneuhaus. Result you can see below.

Pitaya was supplied by a lab power supply as the switching adapter introduces relevant noise components to the generated signal. Noise was measured during generation of a weak note (10mVpp) at 1MHz. Output noise in the low frequency region decreased substantially after removing resistors. Exact procedure of the mod and the problem analysis are in the original post.

czwartek, 12 stycznia 2017

RARP batch script

This is my batch script with functionality of reversed arp protocol. It is useful for finding IP address of computers with dynamic IP address like Raspberry Pi.
@ECHO OFF
REM "find" command error codes: 
REM  0 – The string you were searching for was found.
REM  1 – The string you were searching for was not found.
REM  2 – This means you had a bad switch or your parameters were incorrect.
 
REM To test: "arp -d [IP]" cancels entry from arp table. Root privilages are required.

setlocal enabledelayedexpansion

set IPclass=%1
set MACaddress=%2

set "result="

IF "%MACaddress%"=="" (
 ECHO Ver. 3.0
 ECHO Usage: rarp [IP class] [MAC address]
 ECHO My popular MAC addresses:
 ECHO Raspberry B = "b8-27-eb-xx-xx-xx"
 GOTO break
) ELSE (
 FOR /l %%i IN (1,1,254) DO (
  CALL :searchMAC
  
  IF ERRORLEVEL 1 GOTO break
  
  ping -n 1 -w 1 %IPclass%.%%i | find "Reply" > NUL
 )
)

REM There will be a for cycle if 'arp -a ^| findstr %MACaddress%' gives a reult of at least one line!!
:searchMAC
SET ERR=0
FOR /f "tokens=*" %%j IN ('arp -a ^| findstr %MACaddress%') DO (
 ECHO Found: %%j
 
 SET ERR=1
)
IF %ERR% == 0 ECHO|set /p="."
EXIT /b %ERR%

:break

wtorek, 27 września 2016

*.TRC file visualizer

Yesterday I published my MATLAB script for visualisation of data acquired from Siglent SSA spectrum analyser. The code can be found on github. Below you can find a screenshot of its GUI.


Pic. 1 - Screenshot.

wtorek, 26 maja 2015

Fitting Ethernet based LAN

This time something strictly connected to my education profile. We are transferring the laboratory of cryogenics. In the new rooms we need LAN based on Ethernet standard. I've spent some hours clamping and marking all these lines. There are four rooms in total intended for the new laboratory: cryogenic lab, office, dark-room and workshop.


Pic. 1 - 24 port switch.


Pic. 2 - Cables.

wtorek, 25 listopada 2014

3D printed box for RaspFPGA

This is my first printout using the fused deposition modelling technique. I've made an enclosure for the RaspFPGA board. Preparing CAD files I took the measurements of the second version of the RaspFPGA board but the first version of the RaspFPGA should also fit inside. It has been printed out on the Leapfrog creatr. For the final result look at the pictures below.


Pic. 1 - Enclosure.


Pic. 2 - RaspFPGA v2 board inside the box.

piątek, 11 lipca 2014

The second RaspFPGA mezzanine board for Raspberry Pi

This is the second version of the extension card for Raspberry Pi. As the previous one, this circuit connects all GPIO pins of Raspberry Pi to the FPGA chip. I've made a few modifications. Version 2 uses Spartan6 instead of Spartan3, it has 64MB of SDRAM and a small flash memory to store FPPGA configuration. It still leaves all remaining inputs/outputs pins of FPGA for the final user. Now the pin available are less than before because SDRAM occupies many of them. To do not loose this feature one can choose between having SDRAM or having all GPIO available. The choice is done by soldering jumpers in the appropriate places.


Pic. 1 - RaspFPGA v2 board.
The circuit is mechanically and electrically compatible with LCD TFTDisp 4 RaspPAR design published on my blog in March. It contains 25MHz clock source for FPGA, USB to RS232 converter and real time module.

czwartek, 5 czerwca 2014

4th Scientific Day of the School of Science and Technology

On the 11th of June I will present a poster about optomechanics during poster session in Palazzo Ducale of University of Camerino. The session starts at 10am. Details of the event one can find at 14th Scientific Day Official Poster.

Pic. 1 - Scientific poster - optomechanics.

wtorek, 25 lutego 2014

Brushless DC motor of HDD with Arduino

I present a driver for hard drive disk motor based on Arduino and three discreet half H-bridges mounted on proto PCB. Power supply voltage is 12V and current consumption is around 500mA.


Rys. 1 - Theory of driving three phase motor if you use a driver with high-Z output state.

During my first attempt I used L289 chip and I achieved maximal rotary speed around 2900RPM. Using the circuit presented on Rys. 2. I reached the same speed until I was using a simple driving scheme. It means with one phase which breaks the motor. After an upgrade to the scheme from Rys. 1. the rotary speed increased to 7500RPM. Theory, hardware and software are described very well one the website http://elabz.com/.

Rys. 2 - Electric scheme of half H-bridge I used.

Arduino libraries:

BLDC motor Arduino library v0.2

piątek, 13 września 2013

RaspFPGA mezzanine board for Raspberry Pi

I present to you an extension card for Raspberry Pi. This circuit connects all GPIO pins of Raspberry Pi to Spartan3 FPGA chip and leaves all remaining inputs/outputs pins of FPGA for the final user. I used Spartan3AN chip which can be configured from internal flash memory at start up or by SPI from Raspberry Pi.


The circuit is mechanically and electrically compatible with LCD TFTDisp 4 RaspPAR design published on my blog in March. It contains 25MHz clock source for FPGA, USB to RS232 converter and real time module. I share this piece of hardware with community as OpenHardware.

RaspFPGA-E6 v1.1_4MBEcho.zip

czwartek, 25 lipca 2013

Milling models gallery

Below I paste all elements I've done at PCNC-1100 milling machine during three years at the University of Nicolaus Copernicus.

Rys. 1 - Breadboard for BEC group

Rys. 2 - CB radio holder for my car

Rys. 3 - CB radio holder for my car (folded)

Rys. 4 - Heatsink gasket

Rys. 5 - Optical bench for Coherent laser

Rys. 6 - Heat sink for laser chiller

Rys. 7 - Cover complementary to the previous heat sink

Rys. 8 - Laser chiller (assembly)

Rys. 9 - Optical breadboard

Rys. 10 - Precise optical holder

Rys. 11 - Front panel of an audio amplifier (front)

Rys. 12 - Front panel of an audio amplifier (section)

Rys. 13 - Front panel of an audio amplifier (back)

Rys. 14 - Doughnut shaped PBC

Rys. 15 - Radio frequency amplifier case

Rys. 16 - Half/quarter waveplate rotary motorized mount (assembly)

Rys. 17 - Half/quarter waveplate rotary motorized mount (body)

Rys. 18 - Half/quarter waveplate rotary motorized mount (pattern for milling)

Rys. 19 - Half/quarter waveplate rotary motorized mount (cover)

Rys. 20 - Stepper motor driver front panel

Rys. 21 - Water tank walls

Rys. 22 - Laser holder for HP pen plotter

Rys. 23 - Laser holder for HP pen plotter

piątek, 29 marca 2013

LCD TFTDisp 4 RaspPAR

Here it is! An LCD display for Raspberry Pi (v2). Lately I play with Raspberry Pi micro-computer. I've found bothering lack of small display and real-time clock (RTC) on-board. Necessity is the mother of invention, so I bought a TFT display, designed a mezzanine PCB and wrote patch for Linux Raspbian "Wheezy". In this post I would like to share it with you my work in few steps.

1. I bought an LCD module, with SSD1298 controller.

 2. I prepared a mezzanine PCB to fix the screen and RTC.


3. I manufactured the PCB.

4. Finally I present you the display working with Raspberry Pi.




At the beginning of this post it's written that the screen and kernel patch works with Raspberry board version 2 but it is possible to modify either the patch and PCB to make it works with version 1.

If you want to have the screen functional at the boot remember to remove default frame buffer form config files before kernel compilation.

Special thanks to Jeroen Domburg from SpritesMods for help in code development and to my wife who supports my hobby.

ssd1298_kern3.6.11_rasp_v2.patch

UPDATE:
I've prepared the patch for revision 1.0 of Raspberry Pi. The display connection to the board rev. 1.0 requires some soldering skills. Below there is a list of resistors which one has to remove in order to connect missing IO pins.
  • GPIO28 - R8 & R10
  • GPIO29 - R7 & R9
  • GPIO30 - R4 & R6
  • GPIO31 - R3 & R5
This is the patch file:
ssd1298_kern3.6.11_rasp_v1.patch

niedziela, 18 listopada 2012

Raspberry Pi Rev1 & 2 EAGLE PCB library

Pod adresem: Raspberry Pi udostępniam bibliotekę PBC w formacie EAGLE 5 zawierającą obie wersje płytki Raspberry Rev1 oraz Rev2. Plik jest to zmodyfikowaną wersją biblioteki udostępnionej przez użytkownika jaclag na oficjalnym forum Raspberry Pi. Informacje o lokalizacji złącz i ich wyprowadzeniach pobrałem z:
http://elinux.org/RPi_Low-level_peripherals#Graphical_User_Interfaces
http://www.raspberrypi-spy.co.uk/2012/09/raspberry-pi-p5-header/
Poprawność elementów w tej bibliotece nie została sprawdzona w rzeczywistości. Proszę o komentarz kogoś kto posiada wersję Rev2 płytki i skorzystał z tej biblioteki.

wtorek, 15 listopada 2011

Playing with cryostat
Zabawa kriostatem

Today I help at the one of laboratories at the university in preparing a cryostat for measurements. On Thursday a delivery of three hundreds litres of liquid helium is coming. At the beginning we have cooled down the cryostat with cold nitrogen vapour. I attach the effect of our work :) In the clip you can see rotating taps which cover gas exhausting tubes. We had a lot of fun in preparing the cryostat this time.
Dzisiaj pomagam w jednym z wydziałowych laboratoriów przy przygotowywaniu kriostatu do pracy. W czwartek przyjeżdża dostawa trzystu litrów ciekłego helu do chłodzenia urządzenia. Wstępnie schładzaliśmy kriostat parami ciekłego azotu. Oto efekt naszej pracy :) Na filmie widać wirujące nieustannie korki, przykrywające wyloty gazu. Dobra atmosfera zawsze sprzyja komfortowi pracy.


wtorek, 1 listopada 2011

Naprawa GEM WK3

Wczoraj postanowiłem uruchomić bardzo dawno nieużywany keyboard, który kilka lat temu kosztował całkiem sporo. Model WK3 został wyprodukowany przez General music w 1996 roku. Pomimo zaawansowanego wieku instrument posiada wiele funkcji. Niestety po włączeniu zasilania spotkała mnie przykra niespodzianka. Poza normalnym dźwiękiem usłyszałem trzaski i szumy o zmiennym natężeniu. Co jakiś czas występowały też problemy z kontrastem wyświetlacza. Pierwszym krokiem było przejrzenie instrukcji obsługi i zresetowanie systemu operacyjnego. Następnie zaktualizowałem system operacyjny. Po próbach softwarowego rozwiązania problemu natychmiast zabrałem się do testowania hardware. Po otwarciu obudowy ukazał mi się bardzo ładny widok dobrze separowanych bloków funkcyjnych. Najbardziej widocznym problemem był duży wyciek z akumulatora podtrzymującego stan pamięci ustawień. Powiedzmy, że na razie mogę pozwolić sobie na pracę bez tej użytecznej funkcji. Niestety wylutowanie uszkodzonego akumulatora rozwiązało tylko problem z wyświetlaczem. Podejrzewam, że po odłączeniu akumulatora zmniejszył się pobór mocy pobieranej z zasilacza. Po oczyszczeniu płytki drukowanej z kropli elektrolitu znalazłem drugi problem, rozpuszczony układ scalony (Rys. 4). Rozpuszczeniu uległy oczywiście tylko wyprowadzenia. Uszkodzony układ okazał się być wzmacniaczem operacyjnym w torze audio. Po zamianie na sprawny instrument działa prawidłowo. Podczas kilkugodzinnego testu nie zaobserwowałem wysokiej temperatury żadnego z elementów dlatego uznaję naprawę za skuteczną.

Rys. 1 - GEM WK3 (zdjęcie własność General music)



Rys. 2 - Akumulator niklowo-kadmowy po wielu latach użytkowania i magazynowania



Rys. 3 - Zniszczenia spowodowane wyciekiem elektrolitu



Rys. 4 - Wyprowadzenia układu scalonego rozpuszczone przez elektrolit

poniedziałek, 10 października 2011

Konferencja QCrypt 2011 w Zurychu

W dniach od dwunastego do szesnastego września wziąłem udział w konferencji QCrypt 2011 zorganizowanej przez ETH w Zurychu i poświęconej tematowi kryptografii kwantowej. Na konferencji przedstawiłem poster pod tytułem "Application of Field Programmable Gate Array in Quantum Key Distribution".

Rys. 1 - Plakat informacyjny


Rys. 2 - Ja z prezentowanym posterem

System akwizycji danych z detektorów pojedynczych fotonów

Dzisiaj pierwsza publikacja, której jestem współautorem, została złożona w serwisie arXiv. Opisuje ona pomysł na sprzętową implementację systemu akwizycji danych z detektorów pojedynczych fotonów (Single-photon Detector SPD). Idea zawarta w tym artykule jest bardzo ogólna, jednak dla nas ma zastosowanie w układzie kwantowej dystrybucji klucza (Quantum Key Distribution QKD). Artykuł zawiera zwięzły opis zasady działania techniki oraz obszerne rozważania na temat bezpieczeństwa układu QKD w przypadku wykorzystania w nim SPD. Poza najważniejszymi korzyściami związanymi z bezpieczeństwem technika umożliwia bardziej optymalne wykorzystanie pamięci oraz skraca niezbędny czas przetwarzania danych po akwizycji. Zachęcam do zapoznania się ze szczegółami pod adresem http://arxiv.org/abs/1110.5565