2015. április 30., csütörtök

Freescale training

There was an MCU training organized by Freescale here in Budapest. This was the third one I attended in the last two years.
It looks like I was the favorite of one of the instructors (had answers to the questions raised to the audience, and had on spot questions):

2015. április 24., péntek

CNC Motor Driver 4. - MOSFET Driver revised

I was thinking, looking around a lot before I designed and built the current motor driver circuit. I wanted to use something cheep, something I can learn from.
The current one is working, but I was thinking, how can I make it a little bit faster. When I designed the current one, experimented lot on the breadboard, but not used ltspice to simulate the circuit. When it was finished, I needed to tweak it, here and there, to be able to reduce the noise for the clear measurement signal.
Now I'm trying to get faster switching, to reduce the heat generated by the MOSFET.
First of all I run a simulation of the original circuit.

The circuit:
And the result:
As you can see the the timing results:
Switch on time: ~500ns
Switch off time: ~500ns

After 2-3 weeks of continuous (in my spare time, what I not really have to much) simulation, changing components, pursuing different ideas, finally I created a little bit better one.

The circuit:

And the result:
And the timing:

Switch on time: ~30ns
Switch off time: ~100ns

Much better.
Based on the things above, I designed a little bit different circuit. The reason: I use mostly trough hole components for the home made PCB and switch to SMD when I order the final one.

The schematic
And the PCB design:
Hopefully I'll be to build it during the weekend.

2015. április 6., hétfő

CNC Motor Driver 3.

Since the last post regarding my CNC Motor Driver, in my spare time I was continuously working on the MCU board and the software for it.
Two days ago I connected the digital part to the power electronics. It started to work immediately, but unfortunately the rpm measurement was messy.
After some thinking and trying, I realized, that the source square wave has some narrow pulses around the edges, what are messing up my measurement.
The Nuvoton MCU I'm using is able to add some de-bouncing delay to the timer's capture input. Adding this feature looks like solving my problems.

Today finally I see the end of this project's. I'm trying to collect the thing still need to be finished:
  • Test and tune the PID controller
  • Try out additional filtering on the power input side
  • Try out additional filtering at the motor
  • Try out the 5th order filter I designed for the measurement
  • Test and write code for the current measurement
  • Add voltage measurement solution (circuit and code)
  • Add code for power display
  • Add code for measuring the control signal from the Linux CNC (this allows the control of the rotational speed from g-code)
  • Design a high voltage input 3.3V power supply (actually the 48V input is to much for the regular buck converter chips)
  • Design and order (hopefully) the final panel for the whole electronics
  • Correct the code for the rotary encoder (it is a little bit problematic today)
  • Clean up the code (not modularized enough, many comments missing)

2015. április 5., vasárnap

Dev Env - LightUp

The story starts almost two years ago.
As my son gets older (8 years old now), I was thinking to teach electronics, programing or both to him somehow. As I looking around just pop up something called LightUp on the Kickstarter.


I immediately jumped in to it, hoping that I'll get it to Christmas of 2013.
It didn't happened. After long waiting I got the kit sometime in Autumn 2014. It became a Christmas present for 2014.
My son started to play with the electronics part of the kit but not touched the MCU module included. As he reached the point making all of the tasks was included in the iOS app (what is unfortunately not too much), I tried to setup the MCU.
It was something like two month ago, and it was a major failure. I had two problem with it. The first is theoretical. I don't believe that is the best language to teach an 8 year old to program is the C++ even it is the simpler arduino's one. The second is the driver.
LightUp partnered with codebender to provide programing environment to the kit. Codebender is nothing else just an online Arduino IDE. They provide a driver pack, what is able to connect to virtually every Arduino compatible board. But the driver pack was not working with the LightUp MCU on my desk.
The story was put aside in this point.
A few days ago I seen, that my son started to play with the LightUp kit. This was a good indication to put some further work into the setup.
Went to codebender, downloaded the driver installed it, and the result was the same as two month ago:
This time I wasn't stopped here:
After installing it the result:
Finally I went to the CodeBender side to try it. When I started the IDE for the LightUp a LED blinking project was showing up:
Just downloaded it to the board, and started to work:
What I see about the LightUp: This is an unfinished something. After a good start they lost their tempo. The idea to check the circuit with a camera is exciting, but they got nothing more. A large amount of example circuits and a kid friendly programing environment is missing.
In addition tons of far better kits are exists on the market (for example littlebits), what is kid friendly and gives the possibility to grow further. This one not.