Arduino pro mini serial output problem

Hello,
Im having an issue with writing to the serial port using an 16MHz 5V Pro Mini Arduino. If I set the baud rate for serial communication to 9600, I receive garbage on the serial monitor at the same rate. Only when I set the serial monitor to half of the set baud rate i.e. 4800, do I get the right data. Has anyone had this problem before that could offer assistance or general advice.
Thanks

1 Like

There are two versions : a 8MHz 3.3V version and a 16MHz 5V version.
Sometimes a wrong crystal or resonator is on the board.
Could you measure the VCC pin ? It is really 5V or 3.3V ?

Are you sure that you have selected the 16MHz 5V Pro Mini board ?
When you compile a sketch for 16MHz and it runs at half speed, that means that the Pro Mini is actually running at 8MHz.

You can select the 8MHz 3.3V Pro Mini version in the Arduino IDE, and just ignore the voltage.

Stick a label on it, that it is running at 8MHz :wink: That might be useful later, when you have a few more Arduino boards.

I had the same problem a few days ago. I believe what happened was I was using my 3.3V 8Mhz 328p Pro Mini board and flashed it at the default processor option "ATmega328p 5V, 16Mhz" and got garbage at 9600 baud. But if i went to 4800 baud, the messages came through fine.

So what happened, I'm pretty sure, is that I forgot to set the "Arduino Pro or Pro Mini" board processor option to the "ATmega328p 3.3V, 8Mhz" option (which is NOT the default). The default is "ATmega328p 5V, 16Mhz".

So the code that is calculating the baud rate (presumably based on the processor clock speed) is assuming a clock speed of 16Mhz but it is actually only 8Mhz so the actual baud rate is half of expected!

That really got me panicked that I had blown out my board, LOL!! But it was fun to figure this out!

Hello,

I measured the voltage and get 5V, but I have the same problem. At 9600 baud, I receive junk; at 4800 baud, I can see all the data I expect.

It sounds like you have an Arduino running at 8MHz. Are you able to see any of the writing on the resonator?

Sigh... measuring the vcc pin tells you nothing about the pro mini when it's powered through the 6-pin header!

On the pro mini, the Vcc pin of the serial adapter is connected directly to the power rail. The pro mini will run on whatever voltage is supplied to the Vcc pin (assuming it's high enough for the chip to run at all), and will run at 8MHz or 16MHz depending on which resonator is used.

Only the (crappy, underpowered) regulator is 3.3v, and that is only used for power coming in through the RAW pin (and is only suitable for very low current)

It sounds to me like you are using an 8MHz pro mini, but a 5v serial adapter, so the whole thing is running at 5v and 8MHz.

Unfortunately, the upload speed is the same for the two versions (as opposed to the common strategy of using the same bootloader image, and just halving the baud rate for upload at 8MHz), so you don't get stopped at upload if you selected the wrong speed.

The model of serial adapter I use and recommend - search ebay for "ch340g 6pin" (without the quotes), and go for the ones where the picture shows a black serial adapter with a little switch (this sets voltage) and a mysterious button (i don't know what it does, heh), or green pcb with micro usb connector and voltage switch (the latter is IMO better, since you can put it on the end of a common usb cable, which we all have boatloads of, instead of a bulky A-type extension cable, but they are scarce for reasons I don't understand, while the black ones are easy to find). They will set you back about two bucks and change (buy a few, as it's only a matter of time before you need two at once or lose one).

Be sure to avoid the (usually $1.xx) black ones without the switch, and any adapter where the picture shows a jumper between two pins on the 6-pin header - those don't break out the DTR pin, which is needed for programming an arduino.