18m2 with pulsin and servo problem

davecarter

New Member
I am reading a pulse width from a hall sensor. The idea is that i will recieve two pulses form two motors and control two servos. Which will follow a further pulsin from a rc reciever.
I am using a 18m2. The problem is when the pulse from the hall sensor slows and stops the servo does not hold. It seems that i can not have pulsin with a slow pulse ,with servo. I have read that the best way to do this is to have multiple picaxes. Has any one solved the issue with the "servo" pulsin" or can any one give advise about how best to send data from one picaxe to another and which picaxes are best suited for this. By the way i have also tried "count" in place of pulsin which resulted in the same problem
 

srnet

Senior Member
And its just possible that the speed of the motors has a bearing on the the issue. You dont say but does the panel need to assume you are using the hall effect sensors to read the speed of the motor somehow ?

If so how fast are the motors 1 RPM or 20,000 RPM or .......
 

davecarter

New Member
The speed of each engine will be read by a hall sensor and magnet fixed to the hub. The sensor is connected to a pin with pulsin to read pulse time.
 

hippy

Ex-Staff (retired)
can any one give advise about how best to send data from one picaxe to another and which picaxes are best suited for this.
Serial is probably the easiest way and all PICAXE these days support high-speed serial and some form of background receive which would be suitable for 8-bit data transfer, such as for setting a servo position.

The difficulty in giving any suggestion for how that would all be done as a whole is in not knowing exactly what the nature of the pulses are, their frequencies, their timing, correlation and what you want to do with those pulses. Is the servo frame timing synchronised to any of these pulses or is it independent based on what the pulses are ?

If the servo synchronises to the RC pulse that makes it somewhat easier; wait for the pulse ( which gives the frame rate timing ), take a byte received for the servo position and go to it. The other PICAXE has to simply determine what value to send to the servo controller.

There will however be difficulty in creating that data if there are no pulses and you end up waiting for a pulse which will never come. It could be quite a challenge. Some more info on what the application is may help.
 

davecarter

New Member
The project is to make a system that will control and sync two RC plane engines.
My thought process thus far.
The circuit will:
1. take a 1 -2 ms pulse fropm a rc receiver. I don this on oither projects before.
2. detect the speed of each engine.
3. control 2 servos to to bring each engine to the speed set by the receiver input.
4. if one engine cut out the other will go to idle.
5. lcd read out of eash engine RPM
 

davecarter

New Member
The problem seems to be that the Pulsin command waits to get a clean time between the pulses. so when the pulses are slow then the "servo" command is disrupted.
So how about i have a 8m2 to read the pulse of the engine (one 8m2 per engine) The engine at idle will be at say 2000rpm = 33 pulses per second or 0.033 seconds per pulse. the engine at full could be at say 10,000 rpm giving 166 pulses per second or 0.006 seconds per pulse.
However at the start the engines will not be turning thus no signal. and if one engine stops in flight then the pulse will stop.
 

davecarter

New Member
How about i set up a routine at start up (the engines are not running) to count the number of on's/off/s in a 1/2 second period. if the number > 10 then the routine could shift to read a pulsin, giving an accurate rpm. all the time this is happening the 8m2 could be sending a serial value to the main picaxe (i dont know how that is done). when engines are runnigng then the syc routine in the main picaxe will start.
 
Top