Teaching about static electricity

This is a short video from my lesson at the School of Information Technologies and Engineering, ADA university, Azerbaijan.

Published in: on 21/09/2016 at 09:59  Leave a Comment  

Photos from my lessons

I teach Scilab to second year undergraduate students at the department of radio-electronics and telecommunications.

RET14_1
The heart is the graph of the function

y = (√cos(x) cos(200x)+√|x|-0.7) (4-x2)0.001

RET14_2

***

RET14_3

***

teaching141

***

VladWhiteBoard

Published in: on 28/09/2015 at 17:16  Leave a Comment  

For donkeys. No parking

For donkeys. No parking

For donkeys. No parking.

This is the gate of a small computer shop in Almaty, Kazakhstan.

Published in: on 29/08/2015 at 18:29  Leave a Comment  

A simple digital clock implemented in an FPGA

I am learning FPGA together with two of my students.

We started by making different ‘hello world’ projects like blinking LEDs, counters, and playing music with a buzzer.

This is one of our FPGA helloworlds – a digital clock:

chasiki1

Six seven-segment displays show hours (in 24-hour format), minutes and seconds.

The number on each display can be set by a pushbutton switch.

Instead of doing it on a breadboard, as it is customary for electronic helloworlds, we decided that soldering is a more pleasant task than fiddling with innumerous jumper wires.

chasiki2

My student, Aktolkyn Oteuova, soldering

 

This is the circuit diagram (click here to get a PDF):

clock circuit

Actually, there are two independent circuits on the board: one for the displays and the other one for the buttons.

The common anode seven-segment displays, LDD5122­20M, are organized in a multiplexed wiring.

The BC549 transistors are used as switches activating only one digit at a time (see, for example, the following tutorial: http://www.electronics-tutorials.ws/transistor/tran_1.html ).

We programmed the logic for the clock in Verilog on an Altera Cyclone IV (EP4CE6E22C8N).

If you are not familiar with Verilog, you can start here: http://wiki.opengraphics.org/tiki-index.php?page=Introduction+to+Verilog

chasiki3

My student, Alexandr Nigay, programming

 

The code is in three files:

1) SevenSegment_HHMMSS_WithButtons.v (link) contains the top-level module SevenSegment_HHMMSS_WithButtons and the module FrequencyDivider_Mux that takes a 50MHz clock signal of the FPGA and produces a square wave with the frequency of switching between the displays.

In our case it is approximately 1200Hz.

Each of our six seven-segment displays is lit for 1/1200 of a second, and then the signal switches to the next one.

Because of high frequency of multiplexing, it appears to the eye that all displays are lit all the time.

2) BCDto7Seg.v (link) contains the module BCDto7Seg that takes a 4-bit binary input signal corresponding to the numbers 0 – 9, and converts it to an 8-bit binary output signal that turns on LEDs for showing this number on a seven-segment display.

3) PushButtonDebouncer.v (link) contains the module PushButtonDebouncer that generates a pulse when a button is pressed.

As the raw input signal that you get by simply pressing a button is noisy, it should be cleaned before being used by the rest of the circuit.

The push-button output created by the PushButtonDebouncer module is glitch free and synchronous to the clock.

You can read more about this issue here: http://www.fpga4fun.com/Debouncer.html

This is a screenshot of the pin planner in Altera Quartus II, where you can see the pin assignments.

SevenSegment_HHMMSS_Pin_planner

***

Connecting the wires, compiling the code, programming the FPGA… and finally, it works!

chasiki4

 

chasiki5

Celebrating our success by eating oranges

 

So we had fun. Now we want to move from helloworlds to something more serious (or funnier, I don’t know)

chasiki6

Happy kids enjoying their electronic toys

 

Future plans for playing with the FPGA (tentative):

a) To do some cool digital signal processing.

b) To make a software-defined radio receiver and transmitter.

c) To run some scientific computations on an FPGA 1000 times faster than on a laptop.

d) To write some cool parallel algorithms for cellular automata and see their beautiful animations on a computer screen.

e) Maybe some neural network… maybe to predict something… maybe the next global crisis…

….

z) To conquer the World 🙂

Published in: on 07/01/2015 at 22:10  Leave a Comment