Power RGB LED

“It’s hard to be a bright light in a dim world.” 
 – Gary Starta

A common 5mm LED isn’t the best in every situation, often a bit more power is required. That’s why I’ve connected a 3W power RGB LED to an STM32F0-Discovery board.

RGB

rgb_main

Continue reading

HC-SR04 Ultrasonic Range Finder

The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package, from about 3cm to 300cm. Its operation is not affected by sunlight or black material like other kind of sensor, although acoustically soft materials like cloth can be difficult to detect – at least in the far range. It comes complete with ultrasonic transmitter and receiver module.

hc-sr04_module

Continue reading

Interfacing DHT22 sensor

The DHT22 (also known as AM2302) is a cheap temperature and humidity sensor with an impressive performance! It uses a capacitive humidity sensor and a thermistor to measure the air, and send out a digital signal on the data pin (no analog input pins needed). Its fairly simple to use, but requires careful timing to grab data. The only real CON of this sensor is that you can only get new data from it once every 2 seconds. It is provided with a single wire digital interface. The sensor is calibrated and only requires a single pull-up resistor (any value between 3.6k and 10k should work fine) on the dataline to communicate correctly. Compared to the cheaper (and wider diffused) DHT11, this module is much more precise, more accurate and works in a bigger range of temperature/humidity.

dht22_pinout

Continue reading

Set up Keil for STM32-Discovery boards

After some troubles (not so few), I’ve finally created a skeleton project with Keil uVision to easy develop programs for the STM32-Discovery boards. STMicroelectronics released a library for each Discovery series board to speed up the “time to market”, called “Standard Peripheral Library”. This library include a lot of high level function and peripheral support so that developing a program is MUCH more simple and fast.

I’m using Windows 7 and the following is referred to STM32F0-Discovery board, but with few modifications (trust me, really few), can be used with any STM32-Discovery board.

In this tutorial we’ll create a “skeleton” folder in which there is everything needed to take advantages from “standard peripheral library” with Keil. Anytime you need to develop a new program, simply copy this folder and open the Keil project inside.

So, let’s start!

Continue reading

STM32F0-Discovery first look

For years I’ve only used Microchip PIC and recently Arduino, but today I’ve received my first ARM board, exactly a STM32F0-Discovery board, equipped with an ARM Cortex-M0 32-bit. Surely isn’t the most powerful and complete example of ARM architecture but for less than 10€ is a nice deal!

STMicroelectronics STM32F0-Discovery Board

Continue reading