This compactly designed power supply uses STM32 microcontroller to compute the power supply output voltage and load current, and display these parameters on a RGB OLED display. The input to this power supply is a 24V DC , and the output can be varied from 0V to 24V at 0A to 3A.
Miniature power supply
The old resistor decade boxes consisted of a bunch of rotary switches which make them little bulky and expensive. Stynus has built this microcontroller-based resistor decade box that uses one rotary encoder and 16 relay switches to switch on the various resistances. The microcontroller used in this project is PIC16F84A.
Resistor decade box
Never forget to feed your fish again with this DIY fish feeder, which is Arduino controlled and can be programmed to automatically feed the fish at a fixed interval of time. It uses a servo motor to release the food from a container into the aquarium when it’s time to feed the fishes.
Automatic fish feeder
In my earlier post on STM32 GPIOs I showed how to flash a LED with variable delay times. That example was based on polling method where the code continuously monitored the logic state of a GPIO input pin attached to a push button to determine the delay amount. Obviously that won’t be an efficient technique when a program will be of a considerable size and complexity. This is simply so because the CPU will have to check the GPIO’s logic state every time the super-loop (while (1) loop in the main function) repeats and the push button will also not be responsive during the software delay function calls. Thus the overall performance is poor and not real-time. To get rid of these issues, we’ll need to use external interrupts – a vital feature in every common microcontroller.
STM32F1xx series are ARM Cortex M3 based MCUs. The Cortex M3 based MCUs have a sophisticated and yet easy to use interrupt system called the Nested Vectored Interrupt Controller (NVIC). It ensures low latency and high performance. There are several features of the NVIC and these are handled by the compiler. Our job is simply to enjoy the lightning fast interrupt responses owing to the NVIC. In many MCUs’ interrupt system, interrupt priority can be set and Reset has the highest interrupt priority over anything else. The same things go for STM32s too. However at present I’m not going to go that deep as that’s not needed for now. In some upcoming post may be I’ll discuss the NVIC in details. As per STM32’s reference manuals for more information on exceptions and NVIC programming read Chapter 5 Exceptions and Chapter 8 Nested Vectored Interrupt Controller of the ARM Cortex-M3 Technical Reference Manual. There are other interrupts that are related to RTC, timer, etc. We won’t also look into them in this post. We will learn about them when we learn about the related hardware with them.
This DIY tachometer uses optical sensing to compute the rotational speed of a rotating object and displays the speed on an LCD display. It is Arduino-based project and can measure RPM over 20K.