Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Mini-maestro12 USB Dualport - TTL problem


#1

Hello,
I use mini-maestro12 and I want to control mini-maestro12 and Atmega328p-au by Raspberrypi (ttyACM0, ttyACM1)

[Configuration]
mini-maestro: USB Dualport mode
Raspberrypi <----USB----> mini-mastro12 <----TTL---->Atmega328p-au

[Problem]
yellow led blink and red led turns on (error is Serial buffer full)

KakaoTalk_20180706_105157289KakaoTalk_20180706_105158503KakaoTalk_20180706_105158702


#2

Hello.

Can you clarify what it is you are trying to do with Arduino Nano and Rasbperry Pi boards and how you are communicating between the boards? How did you determine that the Maestro detected a “Serial buffer full” error?

- Amanda


#3

First of all, what I want is to control mini-maestro and Atmega328 with Raspberry pi.
I connect Raspberry pi and mini-maestro via USB, mini-maestro and Atmega328 connected tx, rx, gnd.

Raspberrypi ttyACM0 (COMMAND PORT) – mini-maestro12
ttyACM1(TTL PORT)-- Atmega328

Of course, it would be through ttyACM0, ttyACM1, and for that I set the mini-maestro to USB dual port mode.

Upload the source to the Atmega328 with a “Hello” sentence at 0.5 second intervals, and connect each device to the mini-maestro with the red LED on.

There is source of Atmega328.

atmega328 source code is.

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("Hello");
  delay(500);
}

============================================================

The reason why the error is “serial buffer full” is that the situation is the same on a Windows PC.
This is true when you connect mini-maestro to a Windows PC.

In addition, mini-maestro can be checked at the Maestro Control Center by disconnecting the USB while the external power is connected and the red led on the Raspberry pi.

If I connect mini-maestro to Raspberry pi with USB and connect mini-maestro and Atmege328 to tx rx gnd, I can control mini-maestro with ttyACM0 and Atmega328 with ttyACM1. I want to know if there is.

We are a Korean start-up called Circulus (http://pibo.circul.us) which is making small robots using mini-maestro12. It is now in mass production. I am using mini-maestro well and it seems to be able to use a lot in the future.

Please answer as soon as possible.

Have a nice day.


#4

From your pictures in your first post, it looks like you only connected the Maestro’s RX, TX, and GND pins to the AVR board, which looks like it is drawing power possibly through the Maestro’s TX line. You should make sure the AVR board is powered from an appropriate power source (e.g. USB cable).

I cannot see which wires are connected between the AVR board and Maestro. Can you post a picture clearly showing all your connections between the two boards again, so I can verify that the RX and TX lines are connected correctly?

- Amanda


#5

Okay,
This is Configuration.
image

image
image
image
image


#6

Your connections look fine now.

Regarding your original issue, when does your Raspberry Pi start reading the data from the Maestro’s virtual serial port and how often are you reading the data? If there is a period of time (e.g a few seconds) where you are not reading data from the virtual serial port, while the AVR is sending data, then it would cause Maestro’s buffers to fill up, resulting in a Serial Buffer Full error.

- Amanda


#7

AVR sent “Hello World” once every 0.5 seconds. In Raspberry Pi, the code that keeps receiving data is activated, but the RED LED is still on.
I am wondering if there are any other restrictions on using ttyACM1. I want to control the motor from raspberry pi through maestro to ttyACM0 and send data to ttyACM1. Is this difficult with maestro function now?


#8

Can you post the entire code that you have running on the Raspberry Pi here? The red LED on the Maestro turns off when the error flags have been cleared using the “Get Errors” serial command. You can find details on that serial command under the “Serial Servo Commands” section in the Maestro user’s guide.

As for your question, your plan to use both of the Maestro’s serial ports in USB Dual Port mode is fine. If you want to avoid getting a Serial Buffer Full error, I suggest you design your system so that the AVR only sends serial data in response to commands from the Raspberry Pi. So the Raspberry Pi would send a serial command to the AVR via the Maestro. Then the AVR would send a response. The Raspberry Pi code would read the response, and the Maestro’s serial buffers would not fill up.

- Amanda