[OpenTRV-dev] Help getting serial connection to Radbot
Tim Small
tim at buttersideup.com
Fri Feb 19 08:19:11 UTC 2021
There is a comment in the FreeBSD device driver source for the CH340
which says something along the lines of:
"This is a driver for the WinChipHead CH340. The worst USB to serial
converter chip in the world."
Having had roughly the same experience as the person who eventually
designed this:
https://uart-adapter.com/#why
... I eventually gave up and bought one, and it's paid for itself over
the past couple of years in saved time/doubt when debugging stuff.
It uses a genuine (not pirate/clone) chip from Glasgow-based FTDI.
A little on the (very common) fakes here:
https://www.voltlog.com/identifying-replacing-a-fake-ftdi-ft232r-chip-voltlog-314/
If you don't need the galvanic isolation and wide voltage range of the
µart, then you can get basic 3.3v / 5v FTDI based adapters from RS or
Farnell etc.
https://uk.farnell.com/ftdi/lc234x/eval-brd-usb-to-uart-interface/dp/2753006
HTH!
Cheers,
Tim.
On 14/02/2021 23:25, Robert May wrote:
> Regardless of what else changed I can't make it work with my (cheap)
> CH430 USB dongle (similar to this
> one: https://www.ebay.co.uk/itm/3-3V-5V-Serial-Adapter-Module-CH340G-USB-to-TTL-6-Pin-UART-Adapter/192935577926?hash=item2cebdb4946:g:RFsAAOSwyXNZ-mJr
> <https://www.ebay.co.uk/itm/3-3V-5V-Serial-Adapter-Module-CH340G-USB-to-TTL-6-Pin-UART-Adapter/192935577926?hash=item2cebdb4946:g:RFsAAOSwyXNZ-mJr>).
> It works fine with the PI's built in serial port, so no actual dongle
> needed at all.
>
> To use the built in serial port you need to stop the PI using it for
> boot messages and attaching a terminal to it:
> sudo raspi-config; Select option 3 Interface Options, and then Option
> P6 Serial port; Answer 'no' to the question "would you like a login
> shell to be accessible over serial?", and 'yes' to "Would you like the
> serial port hardware to be enabled", and then reboot.
>
> Then connect Physical pin 8 (TxD) to TX pad on Radbot and physical pin
> 10 (RxD) to RX pad on radbot. COnnect one of the ground pins (e.g.
> physical pin 6) to the -ve terminal of the radbot. and start a
> terminal on /dev/ttyAMA0
>
> Either screen (if you have it installed): screen /dev/ttyAMA0 4800.
> (Ctl-A k to kill the session and exit)
> or microcom (installed in base image): busybox microcom -s 4800
> /dev/ttyAMA0 (Ctrl-X to exit)
>
> If it's safe to power the Radbot from 5V then it could be powered from
> the PI, but not from the 3.3V rail if the motor unit's attached
> (usually OK to get at least 300mA from the 5V rail, but only 50mA
> allowed from the 3.3v rail -
> source: https://www.circuits.dk/everything-about-raspberry-gpio/#:~:text=The%20total%20maximum%20recommended%20current,the%20rest%20of%20the%20board
> <https://www.circuits.dk/everything-about-raspberry-gpio/#:~:text=The%20total%20maximum%20recommended%20current,the%20rest%20of%20the%20board>.
> ). If my memory serves me I was seeing about 160mA draw when the
> motor was running.
>
> Rob.
>
> On Sun, 14 Feb 2021 at 23:01, Tristan Keen <tristan.keen at gmail.com
> <mailto:tristan.keen at gmail.com>> wrote:
>
> Glad to hear you got there!
>
> My USB/Serial cable (link in Part List wiki page) was
> outputting 4.9 V open circuit from the "power" connections, so I
> presume it was connected to the USB main power output. Originally
> I tried powering the Radbot via a couple of low value (82 Ohm)
> resistors as I was a bit nervous of driving it at the higher than
> expected voltage, but couldn't connect reliably. After checking
> the Atmel 328P's datasheet, which suggests a 2.7 - 6V range, I
> removed the resistors and tried again - it worked. Voltage
> dropped to 4.4 volts or so when the motor came on during its
> initial valve cycling though.
>
> So far all four appear to be unharmed...
>
> Tristan.
>
> On Sun, 14 Feb 2021 at 22:26, Robert May <rob at themayfamily.me.uk
> <mailto:rob at themayfamily.me.uk>> wrote:
>
> Thanks all. I'm there (or at least I think I am).
>
> I changed a number of things - the voltage I'm driving the
> Radbot (now at 3.3v), I remade my solder connections and
> replaced the wires/connectors as I think one of the dupont
> connectors was loose, and I moved to using the built in serial
> port of the PI (/dev/AMA0). I'll see if I can work out which
> of these was actually the culprit.
>
> Out of interest, what is the max voltage that is safe to run
> the Radbot. If I understand this page
> correctly (https://github.com/tyrken/heatmon/wiki/Reprogramming-Radbot-TRVs
> <https://github.com/tyrken/heatmon/wiki/Reprogramming-Radbot-TRVs>)
> then it is suggesting powering it at 5V (direct from the USB port)
>
> Onwards.
> Rob.
>
> On Sun, 14 Feb 2021 at 21:45, Damon Hart-Davis <dhd at exnet.com
> <mailto:dhd at exnet.com>> wrote:
>
> Hi,
>
> 1) FWIW, when I am powering remotely, eg to reflash, I
> tend to run at 3.6V.
>
> 2) Yes, I think that we label our TX and RX the ‘wrong’
> way round and have confused ourselves from time to time.
> Almost certainly an early error or at least bad choice by
> me, reinforced by my trying to then be consistent across
> schematics.
>
> 3) FWIW I use a FTDI TTL-232R-3V3 to talk to Radbots.
>
> Rgds
>
> Damon
>
>> On 14 Feb 2021, at 20:52, Robert May
>> <rob at themayfamily.me.uk <mailto:rob at themayfamily.me.uk>>
>> wrote:
>>
>> Thanks Damon, Christoph.
>>
>> I already moved to soldering my connections to
>> eliminate that issue.
>>
>> I can see the TX LED flash on my dongle when I hit
>> <return>, and if I swap the tx/rx connections so I have
>> tx on dongle to tx on Radbot and rx on dongle to rx on
>> Radbot then after I hit <return> I see the rx led on the
>> dongle flash approx. every 2 seconds for a while - so I
>> *think* I'm waking it up. This feels wrong, but past
>> experience tells me that there is sometimes confusion
>> over how rx and tx pins are marked.
>>
>> But I see nothing in my terminal. I've shortened the
>> wires as much as I can, and I'm sure that my grounds are OK
>>
>> Can you expand on what you mean by "perhaps one of the
>> devices doesn’t like the 3.0V supply"?
>>
>> Here's a couple of pictures
>> https://www.dropbox.com/s/s8jdv6j9a4covw3/Photo%2014-02-2021%2C%2020%2041%2054.jpg?dl=0
>> <https://www.dropbox.com/s/s8jdv6j9a4covw3/Photo%2014-02-2021%2C%2020%2041%2054.jpg?dl=0>
>> https://www.dropbox.com/s/sp819pw2ds1lf73/Photo%2014-02-2021%2C%2020%2042%2011.jpg?dl=0
>> <https://www.dropbox.com/s/sp819pw2ds1lf73/Photo%2014-02-2021%2C%2020%2042%2011.jpg?dl=0>
>> (not a good shot, but I'm sure the pins and +ve terminals
>> are not touching)
>>
>> Any other ideas? I've been staring at this all day and
>> can't see what's wrong.
>>
>> Rob.
>>
>>
>> On Sun, 14 Feb 2021 at 19:33, Christoph M. Wintersteiger
>> <christoph at winterstiger.at
>> <mailto:christoph at winterstiger.at>> wrote:
>>
>> Hi Rob,
>>
>>
>>
>> That’s great, you’ve got very far in a very short
>> amount of time!
>>
>>
>>
>> It sounds like you’re “holding” the wires on – just
>> solder them on if you have a soldering iron around,
>> it’s easy enough to take them back off after the
>> operation.
>>
>>
>>
>> I can imagine that there’s a ground potential problem
>> and perhaps one of the devices doesn’t like the 3.0V
>> supply. The Radbot takes very little power and I was
>> able to simply power it from my USB-serial adapter,
>> but that depends on the adapter of course.
>> Alternatively, the RPi also has a 3.3V supply (and
>> 5.0V too) and it has a serial port right next to the
>> supply pins too, so if you have a few breadboard
>> wires around, that would be a simple and quick
>> alternative.
>>
>>
>>
>> Cheers,
>>
>> Christoph
>>
>>
>>
>> *From:* OpenTRV-dev
>> <opentrv-dev-bounces at lists.opentrv.org.uk
>> <mailto:opentrv-dev-bounces at lists.opentrv.org.uk>>
>> *On Behalf Of *Robert May
>> *Sent:* Sunday, 14 February, 2021 18:24
>> *To:* Closed list for developer discussions
>> <opentrv-dev at lists.opentrv.org.uk
>> <mailto:opentrv-dev at lists.opentrv.org.uk>>
>> *Subject:* [OpenTRV-dev] Help getting serial
>> connection to Radbot
>>
>>
>>
>> I've finally found time to unbox my Radbots. The
>> plan is to build a combined stats hub and
>> boiler controller based on a RPi.
>>
>>
>>
>> I've successfully compiled the code Christoph shared
>> (https://github.com/wintersteiger/wlmcd
>> <https://github.com/wintersteiger/wlmcd>) and used to
>> to show the one Radbot I've powered up transmits and
>> that I can receive the frames using a CC1101/RPi
>> combination. Of course the decryption fails as I've
>> yet to set a decryption key.
>>
>>
>>
>> I'm struggling to get a connection over the serial
>> port to the Radbot. I'm trying to follow the
>> instructions shared by Tristan
>> (https://github.com/tyrken/heatmon/wiki/Reprogramming-Radbot-TRVs
>> <https://github.com/tyrken/heatmon/wiki/Reprogramming-Radbot-TRVs>)
>> but I can't seem to get any comms over the serial port.
>>
>>
>>
>> I've opened up my radbot to get better access to the
>> pads.
>>
>> I'm powering the Radbot from a bench power supply at 3.0V
>>
>> I've got a USB serial dongle operating at 3.3V logic,
>> grounded to the -ve supply.
>>
>> I think I'm hold the rx/tx lines on the pads (tx from
>> my dongle to rx on the radbot and rx on the dongle
>> to tx on the Radbot), but I get nothing from 'screen'
>> that I'm using for my terminal.
>>
>>
>>
>> As far as I know I'm using 4800baud, 8-N-1 (screen
>> /dev/ttyUSB0 4800), which I believ to be the expected
>> settings?
>>
>>
>>
>> Can anyone see anything that I'm doing wrong or give
>> me a pointer to things that I can try. ?
>>
>>
>>
>> Thanks,
>>
>> Rob.
>>
>>
>>
>>
>>
>> _______________________________________________
>> OpenTRV-dev mailing list
>> OpenTRV-dev at lists.opentrv.org.uk
>> <mailto:OpenTRV-dev at lists.opentrv.org.uk>
>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>> <http://lists.opentrv.org.uk/listinfo/opentrv-dev>
>>
>> _______________________________________________
>> OpenTRV-dev mailing list
>> OpenTRV-dev at lists.opentrv.org.uk
>> <mailto:OpenTRV-dev at lists.opentrv.org.uk>
>> http://lists.opentrv.org.uk/listinfo/opentrv-dev
>> <http://lists.opentrv.org.uk/listinfo/opentrv-dev>
>
> _______________________________________________
> OpenTRV-dev mailing list
> OpenTRV-dev at lists.opentrv.org.uk
> <mailto:OpenTRV-dev at lists.opentrv.org.uk>
> http://lists.opentrv.org.uk/listinfo/opentrv-dev
> <http://lists.opentrv.org.uk/listinfo/opentrv-dev>
>
> _______________________________________________
> OpenTRV-dev mailing list
> OpenTRV-dev at lists.opentrv.org.uk
> <mailto:OpenTRV-dev at lists.opentrv.org.uk>
> http://lists.opentrv.org.uk/listinfo/opentrv-dev
> <http://lists.opentrv.org.uk/listinfo/opentrv-dev>
>
> _______________________________________________
> OpenTRV-dev mailing list
> OpenTRV-dev at lists.opentrv.org.uk
> <mailto:OpenTRV-dev at lists.opentrv.org.uk>
> http://lists.opentrv.org.uk/listinfo/opentrv-dev
> <http://lists.opentrv.org.uk/listinfo/opentrv-dev>
>
>
> _______________________________________________
> OpenTRV-dev mailing list
> OpenTRV-dev at lists.opentrv.org.uk
> http://lists.opentrv.org.uk/listinfo/opentrv-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opentrv.org.uk/pipermail/opentrv-dev/attachments/20210219/70146442/attachment.html>
More information about the OpenTRV-dev
mailing list