Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Option Serial Console (PicoMite)
Author | Message | ||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2870 |
Hi All, I have been playing around with using a serial console for use in my (and AndrewG's) weather station project we are working on with a means to be able to remotely access the PM (for code updates) that will be used to talk to the sensors that will be `up the pole'. It works very well indeed, my tests showed that I could talk over Cat5 @115200 baud on 11m of cable (that was all I tested it may go further)with just the standard TX/RX/GND connections at 3v3 levels, we may even use HC-12 modules for this job. I have noticed that the USB console ceases working when the serial console is active. Is it possible to configure for BOTH USB and Serial consoles to be active at the same time? This isn't mission critical but it would be a useful feature IMHO. Kind Regards, Mick Edited 2022-10-28 13:14 by bigmik Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
led-bloon Senior Member Joined: 21/12/2014 Location: AustraliaPosts: 202 |
Mick Have you considered 'bitbang'ing a serial console alongside USB? There are a number of threads on this subject (including a csub) led Miss you George |
||||
DaveJacko Regular Member Joined: 25/07/2019 Location: United KingdomPosts: 52 |
I must say that I didn't think that 3v3 at 115200 would go anyway near that far, so I have learnt something. I do like the HC-12, so easy to use, good for a Km if you put the antenna on the roof! However, it's 'one-way-at-a-time-(simplex) I believe it takes a while to switch from rx to tx, and an extra wire. any work-arounds anyone? but let's keep it simple. Good work Guys ! |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 1781 |
TTL Serial can go a long way, as long as Tx and Rx are not beside each other. For twisted pair cables use two pairs, Tx & Gnd. on one, Rx & Gnd. (or Vdd) on the other. With 40m of cheap 2 pair phone cable I got reliable two way comms at 57k, some errors at 115k. With Cat 5 it should be possible to go much further. Edit Tested a 60 metre circuit - 30m of CAT-5e cable with 2 pairs as above in series with the other 2 pairs - and it works reliably at 115200 baud between a MM2 (PIC32MX170) and Geoff's ASCII Video Terminal (PIC32MX270). At 11m it should be possible to go much faster. . Edited 2022-10-29 15:52 by phil99 |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2870 |
Hi All, @Led-Bloon, I will check it out but as I said it isn’t mission critical for me. TBH it is really that in 10years time when I pull it down from the pole I will forget that it is a serial console (let alone the baudrate) and not be able to regain control of the module so have to re-flash. Of course I could leave a note inside the weatherproof box. It was mainly an observation as I can’t see why, (there no doubt is a logical reason) we can’t have both serial console and usb console. We have vga/ps2 as well as usb console. It was more a query than a request and I don’t want Peter or anyone else busting their boilers trying to implement something that is all of moot point in the first place. @Dave Jacko, Whilst I am thinking of that I will have an HC12 sender as part of the outdoor sensor box and having a second could cause clashes. Of course I could run a switch down the pole and toggle the HC12 between com ports (1 being for serial console the other for general use) @Phill99, That is interesting. I have used cat5 for years for Ethernet (has fixed pinout standards) as well as RS485 so I naturally used the same pair for TX and RX (is 485 it would be TX+ and TX- and another pair for RX+ and RX-) Of course the principle is to have the same ‘spikes’ in both lines so the differential is the same so it would make sense to use TX and GND in one pair and RX and GND in another. Still I am gobsmacked that you can get 40m (albeit at 56k) from phone cable and 60m from cat 5 at 115k. I will probably wire an RJ45 to the wall directly under the pole that holds the weather station sensor units. And then uncurl a 25m lead to my Inside PC when I need to update it. It makes life so simple. BTW I have thought to keep spiders and other bugs out of the external unit to put the cut off end of an old cat 5 patch lead into the socket. Unless there are better ideas for protecting the connector. Take care All Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9060 |
Some observations: As far as I know, there is no way to run the USB console if you switch it to a COM port on the PicoMite port. I am sure Peter will chime in here if there is a way and I have that wrong. Basically, I understood it as one or the other, but not both, with the default being the USB, naturally. Agreed. I have one setup in place that uses CAT5 cable between the roof node, and the base station, and it never misses a byte. Further to what Phil says, in my case I made all traces in the CAT5 cable ground, and the solid colour wires were TXD, RXD, an ACK/IRQ line and 12v power. I too was surprised at how far I could push plain old "Three-wire serial" without any handshaking lines at all. In my case I slowed the serial down to 2400 baud, as I thought a slower baud-rate would be more reliable, and I don't need really fast comms anyway for sporadic 21-byte packets. But yeah - CAT5 or CAT6 cables make an excellent plain old serial link for lengths much longer then you would think you can get away with. My tests maxed out at about 80 meters of CAT5 cable, when I started to get corrupted data, but I fully expect you could blow the data further yet with a MAX3232 etc on both ends of the link, but I never tried that myself. EDIT: I have also use CAT5/CAT6 as a balanced audio line too, and it works beautifully for that also! Not shielded, but a balanced line does not generally need to be, cos by its very nature, any noise is self-cancelling. I have used CAT5/CAT6 network cables for balanced line audio a few times now, and it has always worked flawlessly. You can send balanced stereo down one single CAT5/CAT6 cable. I mainly have used these ideas in FM radio station STT(Studio To Transmitter) cable links, cos CAT5/CAT6 cable is very cheap, but very effective here also. Edited 2022-10-31 10:52 by Grogster Smoke makes things work. When the smoke gets out, it stops! |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 5714 |
I've used cat5 for unbalanced audio over short distances. You shouldn't be able to, but it seems fine to me. just twist signal/gnd for each channel and gnd anything you aren't using. :) I just didn't have any screened at the time. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9060 |
That's exactly how I did it. L-/L GND Blue pair L+/L GND Orange pair R-/R GND Green pair R+/R GND Brown pair I was really surprised and impressed with how well it worked, so much so, that I started using it in installs when helping people get their low-power FM stations up and running. CAT5 or 6 cable is much cheaper then four-core screened or two lengths of two-core screened and XLR connectors, but there was no noticeable problem with the audio result. LPFM stations run to a very tight budget, and the install is normally the expensive bit, so if you and they can save money on the STT cable run, then it is win-win. 30M or so no problems. I used high-quality audio transformers as a passive link rather then an active op-amp based balanced-to-unbalanced arrangement, again, cos it was cheaper then an electronic balanced line driver circuit(at the time), but seemed to work just as well - so long as you use decent audio transformers. I used these Altronics ones, although I don't remember them being that pricey when I got mine - they have probably gone up in price. Those ones have a very respectable(for an audio transformer) frequency range of 30Hz - 20kHz, which most cheap audio transformers simply can't do. These days, I would not use these transformers, as you need four for both ends of the line, and that would be $120 in transformers alone. Balanced line driver and receiver chipsets like DRV134PA/INA134A that are designed specifically for this task would be the way to go and much cheaper then transformers these days. But I digress just a little from the original thread topic - sorry Mick. Smoke makes things work. When the smoke gets out, it stops! |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8578 |
Will implement an additional parameter on OPTION SERIAL CONSOLE i.e. OPTION SERIAL CONSOLE TXpin, RXpin [,B] adding the "B" parameter means output will go to "B"oth the serial port and the USB |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2870 |
Thank you Peter, It was a moot point but I think it is better with the BOTH option. Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Print this page |