Sunday, August 11, 2019

Controlador para a DW745: partida suave e além!



A DW745 é uma ótima serra circular de bancada. No entanto, tinha algo nela que me incomodava muito, que era a partida do motor: muito brusca. Tão violenta que constatei que alguns discos de corte chegam a se distorcer durante a aceleração inicial (sem falar no surto que ela ocasiona na rede elétrica). Isso fazia o disco arrancar um pedacinho dos meus gabaritos com "zero clearence" (como o gabarito para cortes transversais) na partida, o que me obrigava a partir a serra e só então colocar o gabarito, nada prático nem seguro! Sendo assim dei início a esse projeto.

Já que eu ia precisar fazer algum tipo de controlador eletrônico, resolvi então adicionar mais funcionalidades, já que não iria custar nada. O sistema tem então as seguintes características:

  • Partida suave do motor da serra;
  • Acionamento automático do coletor de pó quando a serra é ligada (aspirador);
  • Acionamento do motor da serra em corrente contínua;
  • Acionamento manual do aspirador;
  • Medição da tensão, corrente da serra e corrente do aspirador;
  • Interface gráfica de monitoramento;
  • Proteção de sobrecorrente do motor da serra e do aspirador;

Friday, February 1, 2019

Overarm dust collector for table saw

I made this overarm dust collector for my table saw based on the great design from Justin Depew's.


Side view. I used PETG plastic material.
The dust collector can be raised up to match the thickness of
the wood or to not getting in the way if it is not necessary.

The upper knob disengages the support and the lower knob
 is to adjust the dust collector distance from the table top.
The performance of this dust collector is very good and it is very convenient.
For more detail check the Justin's website or his youtube channel.

Sunday, December 7, 2014

BRTOS with Nucleo F401RE

I creaded a small demo for testing the BRTOS (Brazilian Real-Time Operating System) in my Nucleo board with Coocox COIDE and ARM GCC.

BRTOS is a  lightweight preemptive real time operating system designed for low end microcontrollers.

More info about BRTOS:

https://code.google.com/p/brtos/

https://brtosblog.wordpress.com/

In this demo, clock is configured as:

External 8MHz from STLINK V2.

  • Main clock: 84MHz
  • AHB clock: 84MHz
  • APB1 clock: 42MHz
  • APB2 clcok: 84MHz
  • Timers clock: 84MHz
  • SDIO clock: 48MHz


Check more info about clock config for NucleoF401 in this post.
Flash Prefetch enabled and 2 wait states (minimum for 84MHz and 3.3V).

This demo uses two tasks. One of them flashes the LED and prints a string with a counter in serial every second.
The second task is used to handle the user button switch press event. When the user press the button a string is printed in serial.
Using a mutex to avoid conflicts with two tasks sharing the serial.
Serial used is USART2 that is connected in STLINK V2-1 and becomes a Virtual Serial Com port when STLINK is connected.

The demo code is hosted at my GitHub account:

https://github.com/miguelmoreto/NucleoF401-COIDE-BRTOS

Wednesday, December 3, 2014

STM32F4 USB HOST AND DEVICE

This post is a result of several hours of hard work, thinking, planning, trial-and-error, debugging, and searching the internet for working code in order to make the USB peripheral of a STM32 act as an USB device (mass storage) and HOST (mass storage too). I believe that (at least these days) you will not find another internet site with all the stuff I'm posting here in one place. Most of the codes you will find spread in other examples and libraries.

So, this post is about of programming a Nucleo-F401RE board to use the STM32F401RE USB peripheral as a DEVICE Mass Storage Class with SDCARD (connected with 4bit SDIO interface) as the media. That is, in DEVICE mode, your Nucleo will become a generic USB storage device when connected to the USB port of your computer.
The code also works as a HOST for Mass Storage Devices. That is, if you connect a USB flash drive, you can access its contents using the FATFS library.
You can also use the FATFS to access the SD card.

Overview of the breakout board with USB connector. Beneath the Nucleo board is the SD card socket.

Saturday, November 22, 2014

Configuring COIDE for NUCLEO-F401RE

I managed to configure the free IDE from Coocox, COIDE, for programing my  ST NUCLEO-F401RE board with ARM-GCC.


The current version of COIDE (1.7.7) does not support the microcontroller of this board (STM32F401RE). However it support the STM32F401RC. The only difference between them is the amount of RAM and FLASH. Therefore, I created a project in COIDE for STM32F401RC and changed it for the STM32F401RE. I present here a description of what you have to do in order to configure the project correctly.

Tuesday, January 14, 2014

DHT22 Blocking Library for AVR

Some time ago a updated a DHT22 library posted at AVRFreaks forum. That lib returned float values which inplies that the AVR-GCC added a very large library. The code size was above 2kB.
With this update, float number is not needed anymore and the lib returns the integral and decimal parts of the values in a defined struct format. Is needed, the user can configure the lib to return raw values from the sensor. Code size now is only around 300 bytes.

DHT22 Interrupt Driven library for AVR

This lib can read temperature and humidity of a DHT22 sensor without blocking the microcontroller with unnecessary delay functions. The lib is interrupt driven, all the timing measurements of sensor signal is done with a timer and a external interrupt using a state machine.

This way, you can use this lib with multiplexed displays without flicker the display during the measurement of the sensor data.
I hope this lib can be useful to someone.