General

About Arduino & Python

Today I want to share a bit about the good synergy that can exist between Arduino and Python. Python is something I use a lot to talk to my Arduino, just because it is so simple. For now I have been doing very simple stuff via the serial interface of the Arduino. You can simply play with it via the pySerial module than you can find here. For example, I was able to control a DC motor via Python or to visualize the activity of a simple neural network.

This is cool, but I have more complex projects, for example visualizing a more advanced neural network, which will require more discipline in my serial interface. I recently find this video which is very good about the subject :



In this video, Peter Kropf extensively talks about his experiments using Python and the Arduino platform. In particular, he explains how he is using a simple serial protocol to talk between Python and Arduino (near 5:30 in the video). This is definitely something I have to use in the future to build more exciting projects mixing Python and Arduino !

Tutorials

Visualizing a simple neural network with Arduino

The aim of this blog is mainly to make the link between simple electronics and neural networks, so here we are. I have to admit, the title of this article is a bit catchy : I do not intend to simulate any neural network on an Arduino board, as there is of course not enough power to simulate such a thing on the tiny micro controller of my Arduino board. Instead, what I did is simulated a neural network on my computer, store the output, and then send the resulting input and output spikes to my Arduino board which is connected to some LEDs that will blink when a spike is received.

read more »

Tutorials

Tutorial : Controlling a DC motor via Arduino & Python [Part 3 of 3]

This is the last part of the tutorial to command a DC motor and read it’s rotational speed via Python. If you missed the first two parts, you can find part 1 here and part 2 here. In this part, we will not touch the Arduino code anymore, but simply build a nice Graphical User Interface (GUI) to encapsulate everything.
The GUI will be built is based on the very popular framework Qt which was initially developed by Nokia. Qt is free for non-commercial uses, easy to use, and can run on many different platforms. Because we want to stay with Python here, we will use the Python interface for Qt named PyQt which you can download here. Although PyQt is supposed to run on all platforms, I highly recommend using a Linux distribution to complete this tutorial.
To show you what we want to achieve, here is a screenshot from the final software running on my computer (I used Mac OS X 10.7) :
General

What is neuromorphic engineering and why we need it

I said in the first post on this blog that I wanted to share about electronics, but also about the domain I am currently working in, neuromorphic engineering. But what on earth is neuromorphic engineering ? This post will give you a short introduction to the field. Neuromorphic engineering is the art of getting inspiration from the realm of neuroscience in order to build better electronic systems. It is an highly interdisciplinary field, mixing electrical engineering, computer science, neuroscience and mathematics.

Indeed, it is well known that Moore’s law, which says that the number of transistors that can be placed in an integrated circuit doubles approximately every two years, will soon become just impossible to follow. Of course, one solution is to move away from the traditional CMOS fabrication processes and to go for new technologies like CMOL or memristors, which I will also talk about in this blog. But still, even with these new technologies, fabrications processes will become more and more unreliable, which means the yield of integrated circuits will drop drastically.
A revolution is therefore also needed at the architecture level. We need new architectures that can cope with the inherent yield problem of these new fabrication processes. And also which are low-power, because we love putting these things into our smartphones and tablets. This is where neuromorphic engineering kicks in. Indeed, we already know a system that is massively parallel, low-power, and defects tolerant : the brain. Neuromorphic engineering proposes to replicate the architecture of the human brain on silicon chips, emulating neurons and synaptic connections between them. The result will be a new class of integrated circuits that works in a massively parallel way, are defect tolerant, and consumes much less power than the current integrated circuits.
Of course, there are challenges, and these will also be discussed intensively on the blog. Configuring and using these kind of neuromorphic chips is probably the most difficult part, even more than actually making the chips. But if we can go beyond these challenges, neuromorphic engineering can really create a revolution in our daily life. Think about possible applications like systems that can learn from their mistakes, virtual agents that can act as personal assistant, completely autonomous robots … the list is long. These possible future applications, as well as already existing neuromorphic systems, will also be discussed on the blog.
General

Future plans

Some people (including myself) have been wondering what will be the next steps for the website. Well, here are some ideas :

- Finish the tutorial about Arduino & Python

- Extensively test my Raspberry Pi which should arrive in the next weeks

- Play around with interfacing neural networks simulations and my Arduino board (like it is done on this website : http://blog.davidsingleton.org/nnrccar)

- Be more active on Twitter !

Tutorials

Tutorial : Controlling a DC motor via Arduino & Python [Part 2 of 3]

In part 1 of the tutorial, we saw how to make the basic operations of our DC motor via the Arduino. In this part, we will see how to control the motor from your computer via Python. Let’s start with the Arduino code. Basically, these are the commands we want to execute :
- make the motor start and stop
- make the motor go faster or slower
- measure the motor speed
First of all, we need to initialize the interface that will allow us to send commands to the Arduino board from the computer. For this, we will use the serial interface of the Arduino. The serial interface allows us to send some simple messages to the Arduino board. We can just initialize this interface by these two lines of code :
Serial.begin(9600);
The next step is to control the DC motor.
Tutorials

Tutorial : Controlling a DC motor via Arduino & Python [Part 1 of 3]

For the first tutorial on this blog, I want to introduce a project based on a wonderful piece of open hardware that I discovered last year : the Arduino platform. The goal of the tutorial is actually to control the speed of a DC motor, and measure it’s speed, all from your computer. And we will enclose all of this in a nice Graphical User Interface (GUI) created with Python and QT. Part 1 will be about the hardware setup and the basic operation of the DC motor. Part 2 will be about interfacing the Arduino board with your computer by using serial commands. Finally, part 3 will be about creating the GUI and interfacing it with the hardware system.

Let’s first talk about the Arduino. Arduino is an open source electronics platform, based on C, that aims to simplify the use of microcontrollers. The company that develops Arduino also sells boards that are compatible with the Arduino platform, but all of this is open source so many different boards can actually be used as part of Arduino.

read more »

General

First post

Welcome to my blog ! Let me first introduce myself : I am an electrical engineer, and I am really passioned about everything that relates to electrical engineering and technology. I am currently preparing a PhD in microelectronics, and more precisely, in neuromorphic engineering), which will be an important topic on this blog. But aside from that I love to just play around with simple electronics. For example, I recently discovered the Arduino platform which is a great tool to play with simple electronic circuits.

On this blog I want to speak about neuromorphic engineering, share some circuits that I built in the form of tutorials, also shares some ideas that I am currently exploring, and in general share thoughts about electrical engineering. I also like programming a lot, especially in Python, C++ and HTML 5, so there will also be some tutorials about these subjects. Hope you will enjoy it, and don’t hesitate to drop some comments !