I want to run the motor bidirectionally, from UK 230V 50Hz AC supply.
As far as I can tell, I need to rectify and smooth my AC before the board can use it as Vss, I have the power supply from the original treadmill to do this. Any arduino, etc, should be able to supply logic to control it.
I haven't used this type of driver before, so I'm not getting very far understanding what it does and doesn't do.
The board is controlled by 4 logic inputs to independently switch its internal MOSFETs; uses pins 6, 8 21, 22. Section 6.1 in the PWD13F60 pdf details the logic needed to operate.
I'm having trouble grasping this, but do I need to supply a steady pulse of the correct logic levels to the 4 pins as a sort of PWM input in order to drive the motor at varying speeds (using mark to space ratio)? Would reversing the motor direction involve reversing the Hi and Lo signals, causing current through the driver to reverse, therefore driving the motor in reverse?
If you don't know how dangerous that is then please stop now. Do you understand that your entire circuit, including controller and any PC you us to program it, will be at mains voltage, and if you earth anything it will go bang? Spectacularly.
As far as I can tell, I need to rectify and smooth my AC before the board can use it as Vss
That will produce about 350VDC, which is pretty nasty.
I have the power supply from the original treadmill to do this.
Are you sure it produces 230VDC?
I have only skimmed the datasheet, but if I understand correctly then to spin one way, which I'll call clockwise, you can:
Set Lin1 high
Set Hin1 low
Set Lin 2 low
Feed Hin2 with PWM to control the speed.
For anti-clockwise
Set Lin1 low
Feed Hin1 with PWM to control the speed.
Set Lin2 high
Set Hin2 low
If I were doing this I'd get a 24V motor and power supply and make sure I could control that before I would go anywhere near mains.
A DPTD relay can be used to switch the polarity of a DC motor. It's simple and "foolproof". Of course, make sure the relay appropriately rated to handle the voltage & current.
You can control it with a switch. You shouldn't need a microcontroller. If you have low-voltage handy you can use that for the relay coil. If not, you can get a relay with a 230VAC coil.
Here is a little tutorial... It's pretty obvious if you know what a DPDT relay is.
Usually there is another SPST relay for on/off, but you've already got that and you've already got speed control.
Thanks Doug, I will need a microcontroller for the intended use. I'd originally considered relays, but getting the right spec relays when you don't know the inrush current, or much else about the motor, didn't seem likely to work. The drive IC seems to be designed specifically for what I wanted to do. Also, would need another relay to isolate the 2 switching relays while they switch, etc etc... it all got a bit complicated. Plus still no speed control. It it's a DC motor that's already being done
I'm not sure what you're saying there.
Perry:
The motor runs off 230V AC anyway, via its rectifier; I'd just be putting something between the motor and rectifier to change the speed and direction via logic from a processor. Not inherently more dangerous than just the original treadmill, I would have thought. I think the microcontroller and PC would only share an earth via the mains supply/ring circuit? Correct me if I'm wrong there. PC would only be attached via usb while programming, and I could optoisolate the inputs to the driver, same as the CNC drivers I'm more familiar with. I was intending testing with a 12V motor and bench power supply first.
The motor (GMD1181) is rated as 230V, it runs from the rectifier and speed controller it was supplied with, with a potentiometer to vary the speed (not useful directly). It's in the attic, and I won't be using it until another 2 projects are a bit further on, so I won't be testing the rectifier output any time soon, but it should be correct for the motor. I seem to remember testing it before and seeing max 230V when the potentiometer was turned to 'full speed' position. Maybe misremembering though.
Thanks for reading through the bit about logic for switching, I'd only skimmed it too, I wasn't even sure if it would use pulse width at the driver, or whether I should replace the potentiometer control on the motor's supply board with a separate pwm input for speed control.
This problem will be considerably exacerbated when using electronic controls! Generally by bright flashes of light and unpleasant-smelling smoke.
I hate to discourage people, but from the questions that you're asking, you aren't ready for this project. I suggest starting with a smaller motor to learn what can go wrong. In any case, be careful and good luck.
The motor draws 1A per the data sheet. You can use a simple toggle switch DPDT (Double Pole Double Throw) preferably with a center off. The following sketch shows how to connect the motor.
When changing direction be sure the motor comes to a complete stop. Also be sure your 'treadmill' can run in reverse, there may be a reason it will not operate properly.
There are 2 things here being treated as if they are the same thing:
If you rectify 230VAC mains but do not smooth it then you get very lumpy DC that will behave like 230VDC for things that don't care about it being smooth, such as incandescent light bulbs and most kinds of electric motor.
If you smooth it, which generally means putting a capacitor across the output of the rectifier, then you will get roughly 330VDC, which is a lot more than the 230VAC you started out with and a lot more than a 230VDC motor is designed for. Your response to makes me think you don't understand this.
This is too vague for me to know if you've understood me.
I'll try again: If the micro-controller is controlling the motor controller you linked to (or any other you might later decide to use) then, unless you use isolation circuits, it will be directly connected to the mains live and neutral. The result of this is that if you earth it by any means whatsoever then there will be 'interesting and educational' results. Not to mention expensive. And dangerous. Again, your reply does not give me confidence that you understand this at all.