Spot welder Control Board : Demo Video / pulse width


 Small  youtube video of the replacement control board.


There's a tiny bug where the rotary encoder button sometimes stops working, apart from that it works  really fine.

It is safer than the original one thanks to the LEDs/behaviour of the unit :

  • The state by default is "Off" and the unit can be safely manipulated. When it  is armed , the green LED is On. You can switch between Off and Armed easily.
  • The red light is a good indicator of a blown mosfet. If the red LED is on without contact => mostfets are blown. Similarily if the LED does not get lit when contact is made there is an issue.


How do we simply do a pulse of the right duration  ?

We program the PWM to have a total period of 100 ms and set the duty ratio to the pulse duration.

5 ms becomes 5% duty ratio.

We then stop the PWM after 75 ms. Since we have 25 ms to stop it, so it's not an issue to gurarantee it will be stopped in time.

That enables us to have accurate, hardware driven pulse without having to program the timer manually, by just using the PWM API.

The thing to be careful of is to do the PWM setup with interrupt disabled so that it's not in "not fully initialized state" ifever an interrupt happens right during in the middle.

Comments

Popular posts from this blog

Component tester with STM32 : Part 1 ADC, Resistor

Fixing the INA3221

INA3221, weird wiring