brushed speed controller programe

The bear

Senior Member
Welcome to the forum.
I'm sure you will get lots of help, providing YOU supply plenty of information.

Good luck, bear..
 

Circuit

Senior Member
can anybody help as i am new to this thankyou:
Welcome to the forum and I hope we can all help you.

There are basically two ways to control a brushed motor; you can simply raise the voltage to achieve the required speed or you can pulse the motor using Pulse-Width Modulation (PWM). The latter method is probably the easiest and the PICAXE chip has built-in PWM functionality. Have a look at page 12 in PICAXE Manual 3 for an idea to get started. If you use PWM on Pin1 in the diagram you can vary the speed. If you need forwards and backwards control as well then you will need a circuit called an "H-Bridge" - again this is easily achieved with an add-on chip onto a PICAXE - See Page 13 in Manual 3 for an example.

Now, as "The Bear" said in his post, if you give us all a little more detail of what you are trying to achieve then you will undoubtedly get a lot more help. For example, is this motor for a robot, a model railway or what? What sort of brushed motor is it - that is, what voltage do you expect to run it at? What sort of control do you need - is this just on/off/reverse or do you need to adjust the speed?
 

runnerbean4321

New Member
Thank you all help is good, model r/c boat about 20 to 40 amps forward and reverse using a relay to swop motor connections with a neutral position in the middle pwm is the way to go these picaxe are clever bits of kit and i look forward to slowly understanding them many years ago i was a tv man but i must confess this is all new to me.
 

premelec

Senior Member
Volts? [@20-40 amps] - reversing relay already installed? Relay coil operating volts and amps? may need hefty MOSFET and driver to interface with PICAXE - also how long is the motor running at high current might imply need of heat sink for MOSFET...
 
Last edited:

bgrabowski

Senior Member
Try searching for a 40A Marine waterproof ESC on EBay. They are built for the job and can easily be controlled by a Picaxe using the Servo command.
 

Electlen

New Member
I have just completed a model boat which includes picaxe speed controller. Fwd and Rev control is easy using a 14M2 and the hpwm outputs. For the H Bridge I always buy from China, very good value albeit you have to wait. For this design I have used a 50A module 5v to 15v, part number IBT-4 cost £7.31. Search the internet with this part number. Sheet 2 of the circuit shows the speed controller, program is also attached.
See post on next page for better attachments
 

Attachments

Last edited:

Electlen

New Member
Hi Stefan,
The original files were rejected as being too large, therefore had to compress them . Like you not pleased with the result. I have had another go, hopefully these will be better. Also included Sheet3 which is the rest of the circuit.

Regards Len
 

Attachments

The bear

Senior Member
May I discretely mention that your download circuit is not quite right. Post #11
The 22k resistor should go directly to C.5
Very neat circuits.

Regards, bear.
 
Last edited:

hippy

Technical Support
Staff member
May I discretely mention that your download circuit is not quite right. Post #11
The 22k resistor should go directly to C.5
I think it's right in the circuit, just perhaps not immediately obvious ...

Code:
         ___         ___    .---.
C.5 <---|___|---.---|___|---| O |---.
         22K    |    10K    |   |  _|_ 0V
                `-----------| O |
                            |   |
C.0 >-----------------------| O |
                            `---'
Code:
                     ___    .---.
                .---|___|---| O |---.
         ___    |    10K    |   |  _|_ 0V
C.5 <---|___|---^-----------| O |
         22K                |   |
C.0 >-----------------------| O |
                            `---'
 

The bear

Senior Member
"I think it's right in the circuit, just perhaps not immediately obvious ..." hippy.

Apologies everyone, thank you hippy, for putting me right.

Regards, thick bear..
 

Electlen

New Member
Hi bear, no problem with the confusion. It happens to me as well. The circuits by the way are drawn in ExpressSCH, an excellent free program which comes with ExpressPCB which I also use. Well maintained program with no added nasties.
Now to runnerbean4321:
You started this thread off, the immediate replies were from the bear and circuit (worth reading both of these again). You are still not explaining what it is you want advice about.
Now you say you have a boat speed controller but maybe the problem is that you do not have a program.
Like circuit tried to explain there are different ways to control a motor. You can use a 08M2 to control the speed in one direction with pwm. For proportional speed control in forward and reverse you need a H Bridge circuit. There are two requirements for the signals to the bridge (1) the two signals are the compliment of each other, that is when one is off the other is on and (2) there is a time gap between the signals changing state. It takes a finite time for the transistor which is on to completely turn off. Without the time gap there is the risk that both transistors are momentarily on which will destroy the bridge. The hpwm signals which are present in the 14M2 take care of both of these requirements very nicely, that is why my program attached in a previous post is quite short. I would not have clue how to program the equivalent using just pwm. In any case the 08M2 only has one pwm output so that is a problem straight away.
Please give us more explanation as to what it is you are trying to achieve.
 

runnerbean4321

New Member
Hi i think this will take me some time to understand, but i will stick with it anyway i have ordered out put bridge from china and will order some chips 14m2. I have a 08 chip and 20m2 what i would like is to drive a small motor to start with i have programed 20m2 to light up leds so i have made a start now i would like to drive a small motor by picaxe and mosfet also to operate a relay. a small programe would be good to point me in the right direction cheers runnerbean.
 

runnerbean4321

New Member
brushed speed controller

Ihave just got in post h bridge and have made circuit all ok, thank you. what handy bits of kit picaxes are got a scope coming so it will help me see whats happernig i hope.
look forward to play around thanks again. runnerbean
 
Top