I have to interface the Micro Serial with the Tmote Sky wireless mote (sentilla.com/files/pdf/eol/tmote … asheet.pdf) to control servo motors. Is it possible to interface them directly? Tmote has +3V as logical high and in the datasheet for Micro Serial it written that +5V is required. I was trying to use an opamp for this purpose but it seems that I will need to find one with really good slew rate as the ones I tried (LM324 for example) seem to be very slow.
So in simple words, I need to create a circuit which would increase the logical HI to +5V on TX (Tmote to Micro Serial) and decrease it to +3V on RX (Micro Serial to Tmote).
Another question. Is it possible to use Micro Serial to control motor controllers? (I know sounds funny) I mean something like this as I need to control 2 servos and 1 motor on a truck using a single Tmote Sky. I know that there are motor controllers out there but would be nice if I could control all 3 using a single serial controller without any additional equipment.
To be honest I’m not that good in electronics so I would be very thankful for any suggestions. Thanks in advance.
If you want to do something similar to what you’re doing with the op-amps, you should do it with comparators, which are made to be much faster. However, that’s still likely not a good way to go since you can get by with simpler circuits; try looking for some level-shifter or level-translator circuits. For going from 5V to 3V, you just need a voltage divider.
And yes, the servo controller can control speed controls like the one you linked to (assuming that works with regular RC receivers).
Thanks for your reply. Do you think I could use this IC? Not sure if 8ns rise and fall delays are fast enough.
Concerning the speed control, I couldn’t find any information on Internet about the one I bought. Even couldn’t find out who’s the original manufacturer of the device. I emailed the shop I bought it from and waiting for their reply. But I guess it shouldn’t be any different from other RC speed controls.
Yes, that part looks like a viable option. 8ns is pretty fast as far as the servo controller is concerned; why do you think it’s not fast enough?
I said I’m not sure it is, not that I think it is not fast enough As I said I’m not very good at electronics. Sorry if that caused any confusion.
I have designed a simple circuit to interface Tmote Sky to Micro Serial. It’s in the attached PDF. Could you take a look and let me know if I should change anything? Thanks in advance.
Now I’m going to work on Pololu mode serial communication implementation for TinyOS and hopefully will be able to add it to official TinyOS SVN. I ordered 2 Micro Serial controllers yesterday, eager to try everything as soon as possible
SerialAdapter.sch.pdf (5.84 KB)
Sorry, I was being sloppy in my question. My point was to see if there there was anything specific that was making you concerned about the 8ns spec. (in case I wasn’t thinking of something).
A few comments:
It might be too late now, and you might be using it anyway, but the Micro Maestro is our current generation servo controller, so that is what we recommend for new projects (unless you need 7 or 8 channels and the 12-channel Mini Maestro is too big for you).
Your voltage divider resistors are too big by a factor of about 10. 4.7k and 10k, or 10k and 20k would be fine.
You might want to control the reset line on the servo controller, too, especially if you’re going with the older micro serial servo controller.
Thanks for your support.
Well, in fact even 8 channels are too many for my project. My idea is to control an RC truck using the Tmote Sky + Micro Serial servo controller combination. The truck will have 2 servo motors (steering + gearbox) and powertrain motor. I’m currently planning to use 2 channels of Micro Servo: one to control steering servo and another to control the RC speed control I mentioned before. Not sure if I will need to control the gearbox as well.
As for the resistors, I need 0.6 ratio to decrease 5V logic to 3V. So I think I will keep that ratio and go down for 16k and 10k resistors.
Does the reset pin also require 5V logic? I think I could use the same IC to convert Tmote’s 3V logic to 5V.
Yes, the reset pin is also a 5V input.
I’ve been struggling with serial communication between Tmote and Micro Serial until yesterday I attached the oscilloscope to the TX port of Tmote. It turns out that if I send bytes in LSB to MSB bit order the Micro Serial doesn’t recognize that because the red LED start flashing and green LED is not. But if I fake the MSB to LSB bit order by changing start byte 0x80 with 0x01, it works fine…
Do you have any idea why that might be the case? I checked the manuals for both MSP430 (Tmote’s microprocessor) and PIC16F628A and they both send and receive LSB first.
Given that you have the oscilloscope, you should be able to narrow down the problem a lot more. I think you must be looking at something incorrectly if you are seeing MSB first work at all. If you can’t make sense of it after looking at it again, can you post screenshots of the working and non-working serial signals?
Please ignore my previous message. Turns out the neutral message sent was wrong and was screwing up everything. Now it is working fine. I am able to control the servo by Tmote
Do you have any suggestion how to control a motor speed controller using the Micro Serial? Should I be sending the values to the board constantly or one value is enough? How about braking? I will be trying it myself while waiting for your reply.
Thanks again for your support.
The speed control should be the same as servos; you do not need to send new commands if you do not have anything new to send. On our newer units, there is an option to require commands every so often; if you had that kind of feature available, then I would recommend using it and requiring a command at least every second or so so that if your controller crashes, your robot doesn’t keep driving.