Hope this msg finds you in good health. I have a question regarding the connection of the MKR board to FDTI232. I have connected the FDTI to UNO and flashed a sketch but I couldn't flash the same sketch on the MKR boards i.e. 1310 and 1400. MKR boards should be given 3.3V to the pins so the jumper is sitting over 3.3V pins.
I tried to connect DTR to reset and CTS to GND but still nothing. There is no communication at all. I tried to write a simple program and flashed it on the Arduino to print HELLO and wanted to see it on the serial monitor via FDTI but couldn't see anything. For the port to open I did Serial1.begin(9600). Can someone suggest what else can I do to make it work, please?
what are you trying to do? upload a code without using the USB port of your MKR 1310 and 1400 boards?
(on a MKR 1310 or 1400 Opening and closing the USB Serial port at a baud rate other than 1200bps will not reset the board - so you won't get a chance to talk to the boot loader)
what are you trying to do? upload a code without using the USB port of your MKR 1310 and 1400 boards?
(on a MKR 1310 or 1400 Opening and closing the USB Serial port at a baud rate other than 1200bps will not reset the board - so you won't get a chance to talk to the boot loader)
Thank you for the input. Exactly, I am using this device and want to flash a program without using the USB port on the MKR board.
Ok, you mean to say I need to change the baud rate on both Arduino and this device to 1200bps? And the connection that I made, is it ok?
what are you trying to do? upload a code without using the USB port of your MKR 1310 and 1400 boards?
(on a MKR 1310 or 1400 Opening and closing the USB Serial port at a baud rate other than 1200bps will not reset the board - so you won't get a chance to talk to the boot loader)
void setup() {
// put your setup code here, to run once:
Serial1.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello");
}
Ok, I uploaded this to MKR 1310 using a USB port. But now I want to see the output on the the serial monitor without using the USB port but rather the FT232RL device. How can I make it? I connected the 5V, TX, RX, GND from FT232 to the Vin, RX, TX, GND, respectively on Arduino but I don't see anything on serial monitor. Where is the issue?
1/ flashing your custom code into the MKR 1310 NOT using the USB port.
I've never tried given that there is an easy to use USB port, not sure what's your use case for bypassing it.
I would think there is a special dance that needs to happen so that the MKR gets into boot loader mode. may be double clicking on the reset button and then you probably would need to study what's done in the standard IDE to push the bin files into flash memory
2/ see the output on the the serial monitor without using the USB port but rather the FT232RL device
You just need to cross connect rx and tx (ensuring the unit operates at 3.3V) and join GND and plug the other end of the FT232 into a USB cable going to your Mac/PC. (assuming your MKR device is powered separately)
Then on the PC open a Serial monitor, set it to 9600 bauds and select the FT232 Serial port.
1/ flashing your custom code into the MKR 1310 NOT using the USB port.
I've never tried given that there is an easy to use USB port, not sure what's your use case for bypassing it.
Actually, flashing is not that important for me, but I have an MKR 1310 used in a project. That is powered by a 5V source on Vin and GND. I am having some issues with the code there so I want to debug it by putting some prints in the code and seeing them on the serial monitor. But as the Arduino and the connected sensors and buttons are all powered by that 5V source on Vin, so, I think I can't connect the Arduino to my PC through a USB. Because then I will be connecting two power sources to the Arduino. Therefore, I want to make that Serial1.begin() communication so that I can see the prints on the serial monitor by using the FTDI device.
J-M-L: 2/ see the output on the the serial monitor without using the USB port but rather the FT232RL device
You just need to cross connect rx and tx (ensuring the unit operates at 3.3V) and join GND and plug the other end of the FT232 into a USB cable going to your Mac/PC. (assuming your MKR device is powered separately)
Then on the PC open a Serial monitor, set it to 9600 bauds and select the FT232 Serial port.
the Arduino and the connected sensors and buttons are all powered by that 5V source on Vin
The Vin pin can be used to power the board with a regulated 5V source (range is 5V to maximum 6V). If the power is fed through this pin, the USB power source is disconnected. This is the only way you can supply 5v to the board not using USB. So I don't think there is an issue plugging in the USB cable.
If I remember correctly, the 5V pin outputs 5V from the board when powered from the USB connector (because USB will kinda deliver 5V) but when powered from the VIN pin of the board, it outputs an unregulated voltage that is taken directly from the input. So if you supply 6V through Vin then your 5V pin will likely send 6V to the sensors.
J-M-L:
The Vin pin can be used to power the board with a regulated 5V source (range is 5V to maximum 6V). If the power is fed through this pin, the USB power source is disconnected. This is the only way you can supply 5v to the board not using USB. So I don't think there is an issue plugging in the USB cable.
Cool, if it is like that then I can try it first thing tomorrow and will try to see my prints on the serial monitor.
J-M-L:
If I remember correctly, the 5V pin outputs 5V from the board when powered from the USB connector (because USB will kinda deliver 5V) but when powered from the VIN pin of the board, it outputs an unregulated voltage that is taken directly from the input. So if you supply 6V through Vin then your 5V pin will likely send 6V to the sensors.
Wait, this is important for me. Right now as I said I am supplying a constant 5.08 V to VIN of Arduino.
So, is it ok to power the Arduino on VIN pin or should I switch this to a 5V pin on the Arduino? And all my sensors, buttons, and Arduino are connected to the same voltage source. I am going to attach the schematic with my next comment.
Yes, I am sure that FDTI is working OK. I could use it to program the Arduino UNO.
@J-M-L attached to this is the schematic of the wiring that I am using currently. I have 3 sensors, 2 buttons, and 2 module relay. Sensors are connected to 3 analog pins, buttons are connected to 2 digital pins and 2 relays are connected to 2 digital pins. My power supply is AC, which gives a 24 VDC, and I am giving 230 V to a converter that gives me 5 VDC and could give current up to 2 Amps.
Does this look ok to you? Or should I do some modification to it? Thank you very much for your kind assistance.