Can the flashing serial signal LED be disabled?

hi,
I’m using the micro maestro’s ADC to read a freescale mpx4115 pressure sensor. I have noticed a spike in the data on one second intervals, which correlates with the flash of the status led. Can the led be disabled to improve the ADC accuracy? I had a look through the control centre and couldn’t see anything. If not, can it be removed without ill effect? I realise this little device isn’t really meant to be a precision ADC, but other than the spike the data are quite good, and it’s so easy to use!

thanks

Hello, johnm545.

There is no way to disable the status LED on the Maestro, but you should be able to remove it without any bad consequences other than the loss of the visual feedback. I am glad to hear that you are otherwise having a positive experience using the Maestro.

- Kevin

Hi Johnm545,
I am also using a couple of channels on a Maestro 12channel servo controller as ADCs which seem to be quite stable. I get a bit of jitter with the least significant bits of input but not unexpected. The only time I see any apparent bad readings are those moments when my servos are heavily loaded and the supply rail is dragged down a bit. This leads me to suggest maybe your supply rail to the Maestro board is near it’s current limit. Try using a Vin supply rather than USB to see if that inproves it.

Thanks for the input. I’ve now connected the sensor’s power to the Maestro’s 5v output rather than my main 5v bus, and it works much better. The 1hz spike is gone and the remaining noise is +/-2LSB with an approximately normal distribution. Perfect for oversampling, which leads me to another question…

I’m using a bluetooth to serial module to interface the Maestro with an Android phone, which limits the sample rate to about 90hz because the bluetooth doesn’t like handling lots of small packets. This gives about 3 meter resolution at 1hz, which is ok, but ideally i’d like higher speed. So I have been thinking about writing a script for the Maestro to sample the 10-bit analogue input as fast as possible, accumulate and decimate 64 samples, and store the 13-bit result on a spare channel (configured as output with nothing connected). Then I can use the get position command to retrieve the averaged value from the dummy output channel at a more leasurely pace. Or just buy the 12-channel version which can be programmed to output serial data instead of using the above hack. Either way, approximately how fast can the Maestro sample its ADC, and will a script running flat out interfere with normal 50hz servo operation?

Thanks!

I use LabView code via Virtual COM ports to control my Maestros (a 12 and a 24 channel) so I have no experience of the script language but I note that it does have a stack, so can’t you save that “13bit result” on the stack instead of in one of the channels?
I should imagine that the PIC controlling the maestro board uses a timed interrupt routine to ensure it always maintains the 50Hz outputs to the servos so I’m pretty sure a flat out script repeatedly sampling the ADC wouldn’t interfere with servo outputs but “The men from Pololu” would know for sure.

Hello, John.

If you just have one input channel enabled, the Maestro can sample it approximately every 100 us. Your script will not interfere with the operation of the servos.

–David

David:

You wrote that "If you just have one input channel enabled, the Maestro can sample it approximately every 100 us."
Would you please provide example script that samples the input every 100 us.

I am using a mini-Maestro and have one input channel enabled (channel 6) and 6 other channels (channels 0 - 5) are enabled as outputs. An external signal with 100 us pulses occurring every 50 ms is connected to the input channel. I need to count every 10 input pulses then change the levels of two outputs. However, this is not working reliably. If I increase the pulse width from 100 us to 800 us, then it works.

Can I overclock the maestro to speed up the sampling of the input or is there an interrupt that I could use instead of the input pin (pin 6)?

Thanks for your help

Hello.

The Maestro will read your ADC input approximately every 100 us if you have just one enabled because that is approximately how long it takes to read an ADC input and the Maestro is constantly reading its inputs. If you actually want to program the Maestro to do something every 100 us with an ADC reading, that is a different issue. Sorry for the confusion my comment caused; I am sure I could have worded it better.

The Maestro scripting language is not suited for processing quickly changing signals, such as your 100 microsecond pulses. The execution speed of the script depends on too many factors for it to be easily predictable.

If you really want to measure 100us pulses then your best bet might be to write something like this:

0
6 get_position max
6 get_position max
6 get_position max
6 get_position max
6 get_position max
6 get_position max
6 get_position max
# check the value at the top of the stack

That way, you are spending more time checking the ADC value and less time doing comparisons. It’s something to try but I don’t expect it will work very well.

If you have the option of changing the signal, then I recommend making it toggle every 50 ms; the Maestro script should have no trouble counting the number of times that signal toggles.

There are no Maestro interrupts you can use and overclocking is not possible.

–David

David:

Thank you for the suggested code and for letting me know that overclocking and interrupts are not options. I was hoping to handle this with software but you have confirmed that is not possible. A pulse stretcher circuit (comparator with RC network) should stretch my 100 us pulses to 800 us or greater as you suggest.

Though not the answer I was hoping for, it helps me move forward. Thanks for providing good customer support!