Using Mini to connect to Serial Components
#1
Posted 16 March 2012 - 03:36 AM
I am assuming that the only way is to use the RS232 Com2 pins. Thats fine but all the USB breakouts are showing pins like the pic posted (no DTR pin?)
Since my component uses ground, voltage, TX and RX I am probable going to have to use Com1 to connect to it. That leaves my with connecting Visual Studio to Com2. The instructions say to cut an RS232 cable but I only have USB. Can the breakout board below work? If so how? If not, what is the alternative to using RS232 with USB and the mine to connect to the PC?
Also, since my mini is set to communicate through serial with Visual Studio, do I need to reset it to get the serial port prompt?
#2
Posted 16 March 2012 - 07:04 AM
Without the spec for the board it is difficult to say if you can use the board you mentioned but looking at the connections I would guess you could not use it directly. This is a guess and is based upon the fact that the board has breakouts for 5V and 3.3V so I'm guessing that it is working on TTL levels.Since my component uses ground, voltage, TX and RX I am probable going to have to use Com1 to connect to it. That leaves my with connecting Visual Studio to Com2. The instructions say to cut an RS232 cable but I only have USB. Can the breakout board below work? If so how? If not, what is the alternative to using RS232 with USB and the mine to connect to the PC?
Also, since my mini is set to communicate through serial with Visual Studio, do I need to reset it to get the serial port prompt?
RS232 works using positive and negative voltages to represent the data where as TTL uses 0 and some positive voltage (usually 3.3 or 5V - i.e. TTL - in our case). Check the data sheet for the board in question.
If the board is indeed TTL then you can use it but you need additional circuitry. The MAX232 chips allow you to convert TTL to RS232 and requires the chip and four additional capacitors. It's simple to use and the datasheet I have for the chip has the circuit diagram in the datasheet. I did this with a Bluetooth board to connect a PC to the Mini via the MAX232. It took about 15 minutes to setup on breadboard and test. Of course, the other option is to but a USB to RS232 convertor.
When I did this I decided to leave VS talking to the Mini on the configured com port and just used the other one for communication with the PC. i.e. VS on COM1 and Bluetooth on COM2.
Hope this helps,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#3
Posted 16 March 2012 - 04:11 PM
Based on what you are saying it appears that the component I have will only connect via TTL... the current way I am connecting to VS.
If I am to use the above adapters to connect the mini to VS, how do I bring the prompt up on the mini again to change the way VS connects to it?
#4
Posted 16 March 2012 - 04:23 PM
#5
Posted 16 March 2012 - 07:22 PM
As I mentioned in my reply, without a data sheet for the part I am guessing. I'd like to recommend that if you need advice regarding a part you please submit links to the parts data sheet or to the components web page. The original post had what looked like a link but it did not take me to a web page with information about the part.Based on what you are saying it appears that the component I have will only connect via TTL... the current way I am connecting to VS.
Have a look at this link.If I am to use the above adapters to connect the mini to VS, how do I bring the prompt up on the mini again to change the way VS connects to it?
Regards,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#6
Posted 16 March 2012 - 09:30 PM
#7
Posted 17 March 2012 - 07:45 AM
Thank you. I have looked at that link. I think the component type is irrelevant at this point since I have deducted by your feedback is does in fact require the mini COM1.
I would not deduce that as I really don't understand whay you need to switch the deployment method to COM2. If you have deployment via COM1 working then I would leave that alone. I would then use COM2 to connect to a serial device. If that serial device was a PC then a USB to RS232 adapter would do the job. Alternatively, a USB to TTL would work with the MAX232 sitting between the TTL signals of the adapter and the COM2 port on the Mini.
The only advantage I can see from switching is reduced cost if you are going to make a large number of boards.
In order to switch the Mini to use a different COM port you need the Mini Transport Selector which is one of the attachments to the firt post in this thread. You need to compile this application and deploy it to the MIni.What needs to be done to reset the board to prompt me which COM port VS will use like it does out of the box?
Alternatively, I guess all you really need is the following line of code:
Transport.SetInterface(TransportInterface.Com1); // Change to Com2 if required.with the appropriate usings etc.
Regards,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#8
Posted 17 April 2012 - 02:49 PM
The mini has 2 com ports, one is rs232 and one is TTL, neither of these is (or will work directly with) USB. To connect to USB you will need a fdti chip that usually comes with the mini usb plug. The best (and smallest) one I have been able to find is this one:
http://www.mouser.co...j6TUmuUKXOEIg==
It allows me to connect my Neduino Mini TTL pins to USB for deploying and debugging. While this alone is great, what do you do if you need some other serial connection to something like Xbee or Wifi? After doing some research, I found that the MAX232 chip would allow me to convert the COM2 port from rs232 to TTL so that I could use it to connect to the Xbee or something else that required TTL levels. The MAX232IN is what I used and it is available here:
http://www.mouser.co...PHXgRUYuZ8BsA==
It needs 4 additional caps (1uF available at any radio shack) and your xbee will need a voltage regulator to convert the 5v power source to a 3.3v power source (just need to covert the power, not the signal levels).
What does this give you? It basically gives you a Netduino Mini with USB for power and debugging PLUS an additional usable COM port that can be used to connect to another micro serial device (which I think is what most of you are looking for). I am designing a special Netduino Mini board that will have all of this and the Xbee that you can make on a standard protoboard from radioshack (basically one layer pcb). Ill post the full plans with pictures and instructions as soon as I have it all soldered out (maybe next week). Should be simple enough for anyone reading these boards to be able to understand and do at home.
here is the basic idea worked out on a breadboard:
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users