<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>There is a comment in the FreeBSD device driver source for the
      CH340 which says something along the lines of:</p>
    <p>"This is a driver for the WinChipHead CH340.  The worst USB to
      serial converter chip in the world."</p>
    <p>Having had roughly the same experience as the person who
      eventually designed this:</p>
    <p><a class="moz-txt-link-freetext" href="https://uart-adapter.com/#why">https://uart-adapter.com/#why</a></p>
    <p>... 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.</p>
    <p>It uses a genuine (not pirate/clone) chip from Glasgow-based
      FTDI.</p>
    <p>A little on the (very common) fakes here:</p>
    <p><a class="moz-txt-link-freetext" href="https://www.voltlog.com/identifying-replacing-a-fake-ftdi-ft232r-chip-voltlog-314/">https://www.voltlog.com/identifying-replacing-a-fake-ftdi-ft232r-chip-voltlog-314/</a></p>
    <p>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.<br>
    </p>
    <p><a class="moz-txt-link-freetext" href="https://uk.farnell.com/ftdi/lc234x/eval-brd-usb-to-uart-interface/dp/2753006">https://uk.farnell.com/ftdi/lc234x/eval-brd-usb-to-uart-interface/dp/2753006</a></p>
    <p>HTH!<br>
    </p>
    <p>Cheers,</p>
    <p>Tim.<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 14/02/2021 23:25, Robert May wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAK=sgrvsZod0SO10LdZ7dQnfYb8vhgu798sa7yWHqakWrZBjSA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Regardless of what else changed I can't make it
        work with my (cheap) CH430 USB dongle (similar to this one: <a
href="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"
          moz-do-not-send="true">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</a>). 
        It works fine with the PI's built in serial port, so no
        actual dongle needed at all.
        <div><br>
        </div>
        <div>To use the built in serial port you need to stop the PI
          using it for boot messages and attaching a terminal to it:</div>
        <div>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.</div>
        <div><br>
        </div>
        <div>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</div>
        <div><br>
        </div>
        <div>Either screen (if you have it installed): screen
          /dev/ttyAMA0 4800. (Ctl-A k to kill the session and exit)</div>
        <div>or microcom (installed in base image):  busybox microcom -s
          4800 /dev/ttyAMA0 (Ctrl-X to exit)</div>
        <div>
          <div><br>
          </div>
          <div>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: <a
href="https://www.circuits.dk/everything-about-raspberry-gpio/#:~:text=The%20total%20maximum%20recommended%20current,the%20rest%20of%20the%20board"
              moz-do-not-send="true">https://www.circuits.dk/everything-about-raspberry-gpio/#:~:text=The%20total%20maximum%20recommended%20current,the%20rest%20of%20the%20board</a>.
            ).  If my memory serves me I was seeing about 160mA draw
            when the motor was running.</div>
        </div>
        <div><br>
        </div>
        <div>Rob.</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Sun, 14 Feb 2021 at 23:01,
          Tristan Keen <<a href="mailto:tristan.keen@gmail.com"
            target="_blank" moz-do-not-send="true">tristan.keen@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">Glad to hear you got there!
            <div><br>
            </div>
            <div>  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.</div>
            <div>
              <div><br>
              </div>
              <div>So far all four appear to be unharmed...</div>
            </div>
            <div><br>
            </div>
            <div>Tristan.</div>
          </div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Sun, 14 Feb 2021 at
              22:26, Robert May <<a
                href="mailto:rob@themayfamily.me.uk" target="_blank"
                moz-do-not-send="true">rob@themayfamily.me.uk</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div dir="ltr">
                <div dir="ltr">Thanks all.  I'm there (or at least I
                  think I am).
                  <div><br>
                    <div>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.</div>
                  </div>
                  <div><br>
                  </div>
                  <div>Out of interest, what is the max voltage that is
                    safe to run the Radbot.  If I understand this page
                    correctly (<a
                      href="https://github.com/tyrken/heatmon/wiki/Reprogramming-Radbot-TRVs"
                      target="_blank" moz-do-not-send="true">https://github.com/tyrken/heatmon/wiki/Reprogramming-Radbot-TRVs</a>)
                    then it is suggesting powering it at 5V (direct from
                    the USB port)</div>
                  <div><br>
                  </div>
                  <div>Onwards.</div>
                  <div>Rob.</div>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">On Sun, 14 Feb 2021
                    at 21:45, Damon Hart-Davis <<a
                      href="mailto:dhd@exnet.com" target="_blank"
                      moz-do-not-send="true">dhd@exnet.com</a>>
                    wrote:<br>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0px 0px
                    0px 0.8ex;border-left:1px solid
                    rgb(204,204,204);padding-left:1ex">
                    <div>Hi,
                      <div><br>
                      </div>
                      <div>1) FWIW, when I am powering remotely, eg to
                        reflash, I tend to run at 3.6V.</div>
                      <div><br>
                      </div>
                      <div>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.</div>
                      <div><br>
                      </div>
                      <div>3) FWIW I use a FTDI TTL-232R-3V3 to talk to
                        Radbots.</div>
                      <div><br>
                      </div>
                      <div>Rgds</div>
                      <div><br>
                      </div>
                      <div>Damon<br>
                        <div><br>
                          <blockquote type="cite">
                            <div>On 14 Feb 2021, at 20:52, Robert May
                              <<a
                                href="mailto:rob@themayfamily.me.uk"
                                target="_blank" moz-do-not-send="true">rob@themayfamily.me.uk</a>>
                              wrote:</div>
                            <br>
                            <div>
                              <div dir="ltr">Thanks Damon, Christoph.
                                <div><br>
                                </div>
                                <div>I already moved to soldering my
                                  connections to eliminate that issue.</div>
                                <div><br>
                                </div>
                                <div>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.</div>
                                <div><br>
                                </div>
                                <div>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</div>
                                <div><br>
                                </div>
                                <div>Can you expand on what you mean by
                                  "perhaps one of the devices doesn’t
                                  like the 3.0V supply"?</div>
                                <div><br>
                                </div>
                                <div>Here's a couple of pictures</div>
                                <div><a
href="https://www.dropbox.com/s/s8jdv6j9a4covw3/Photo%2014-02-2021%2C%2020%2041%2054.jpg?dl=0"
                                    target="_blank"
                                    moz-do-not-send="true">https://www.dropbox.com/s/s8jdv6j9a4covw3/Photo%2014-02-2021%2C%2020%2041%2054.jpg?dl=0</a><br>
                                </div>
                                <div><a
href="https://www.dropbox.com/s/sp819pw2ds1lf73/Photo%2014-02-2021%2C%2020%2042%2011.jpg?dl=0"
                                    target="_blank"
                                    moz-do-not-send="true">https://www.dropbox.com/s/sp819pw2ds1lf73/Photo%2014-02-2021%2C%2020%2042%2011.jpg?dl=0</a>
                                  (not a good shot, but I'm sure the
                                  pins and +ve terminals are not
                                  touching)<br>
                                </div>
                                <div><br>
                                </div>
                                <div>Any other ideas?  I've been staring
                                  at this all day and can't see what's
                                  wrong.</div>
                                <div><br>
                                </div>
                                <div>Rob.</div>
                                <div><br>
                                </div>
                              </div>
                              <br>
                              <div class="gmail_quote">
                                <div dir="ltr" class="gmail_attr">On
                                  Sun, 14 Feb 2021 at 19:33, Christoph
                                  M. Wintersteiger <<a
                                    href="mailto:christoph@winterstiger.at"
                                    target="_blank"
                                    moz-do-not-send="true">christoph@winterstiger.at</a>>
                                  wrote:<br>
                                </div>
                                <blockquote class="gmail_quote"
                                  style="margin:0px 0px 0px
                                  0.8ex;border-left:1px solid
                                  rgb(204,204,204);padding-left:1ex">
                                  <div lang="EN-US">
                                    <div>
                                      <p class="MsoNormal">Hi Rob,</p>
                                      <p class="MsoNormal"> </p>
                                      <p class="MsoNormal">That’s great,
                                        you’ve got very far in a very
                                        short amount of time! </p>
                                      <p class="MsoNormal"> </p>
                                      <p class="MsoNormal">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.</p>
                                      <p class="MsoNormal"> </p>
                                      <p class="MsoNormal">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.</p>
                                      <p class="MsoNormal"> </p>
                                      <p class="MsoNormal">Cheers,</p>
                                      <p class="MsoNormal">Christoph</p>
                                      <p class="MsoNormal"> </p>
                                      <div
style="border-right:none;border-bottom:none;border-left:none;border-top:1pt
                                        solid
                                        rgb(225,225,225);padding:3pt 0in
                                        0in">
                                        <p class="MsoNormal"><b>From:</b>
                                          OpenTRV-dev <<a
                                            href="mailto:opentrv-dev-bounces@lists.opentrv.org.uk"
                                            target="_blank"
                                            moz-do-not-send="true">opentrv-dev-bounces@lists.opentrv.org.uk</a>>
                                          <b>On Behalf Of </b>Robert
                                          May<br>
                                          <b>Sent:</b> Sunday, 14
                                          February, 2021 18:24<br>
                                          <b>To:</b> Closed list for
                                          developer discussions <<a
                                            href="mailto:opentrv-dev@lists.opentrv.org.uk"
                                            target="_blank"
                                            moz-do-not-send="true">opentrv-dev@lists.opentrv.org.uk</a>><br>
                                          <b>Subject:</b> [OpenTRV-dev]
                                          Help getting serial connection
                                          to Radbot</p>
                                      </div>
                                      <p class="MsoNormal"> </p>
                                      <div>
                                        <p class="MsoNormal">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.</p>
                                        <div>
                                          <p class="MsoNormal"> </p>
                                        </div>
                                        <div>
                                          <p class="MsoNormal">I've
                                            successfully compiled the
                                            code Christoph shared (<a
                                              href="https://github.com/wintersteiger/wlmcd"
                                              target="_blank"
                                              moz-do-not-send="true">https://github.com/wintersteiger/wlmcd</a>)
                                            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.</p>
                                        </div>
                                        <div>
                                          <p class="MsoNormal"> </p>
                                        </div>
                                        <div>
                                          <p class="MsoNormal">I'm
                                            struggling to get a
                                            connection over the serial
                                            port to the Radbot.  I'm
                                            trying to follow the
                                            instructions shared by
                                            Tristan (<a
                                              href="https://github.com/tyrken/heatmon/wiki/Reprogramming-Radbot-TRVs"
                                              target="_blank"
                                              moz-do-not-send="true">https://github.com/tyrken/heatmon/wiki/Reprogramming-Radbot-TRVs</a>)
                                            but I can't seem to get any
                                            comms over the serial port.</p>
                                        </div>
                                        <div>
                                          <p class="MsoNormal"> </p>
                                        </div>
                                        <div>
                                          <p class="MsoNormal">I've
                                            opened up my radbot to get
                                            better access to the pads.</p>
                                        </div>
                                        <div>
                                          <p class="MsoNormal">I'm
                                            powering the Radbot from a
                                            bench power supply at 3.0V</p>
                                        </div>
                                        <div>
                                          <p class="MsoNormal">I've got
                                            a USB serial dongle
                                            operating at 3.3V logic,
                                            grounded to the -ve supply.</p>
                                          <div>
                                            <p class="MsoNormal">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.</p>
                                          </div>
                                          <div>
                                            <p class="MsoNormal"> </p>
                                          </div>
                                          <div>
                                            <p class="MsoNormal">As far
                                              as I know I'm using
                                              4800baud, 8-N-1 (screen
                                              /dev/ttyUSB0 4800), which
                                              I believ to be the
                                              expected settings?</p>
                                          </div>
                                          <div>
                                            <p class="MsoNormal"> </p>
                                          </div>
                                          <div>
                                            <p class="MsoNormal">Can
                                              anyone see anything that
                                              I'm doing wrong or give me
                                              a pointer to things that I
                                              can try. ?</p>
                                          </div>
                                          <div>
                                            <p class="MsoNormal"> </p>
                                          </div>
                                          <div>
                                            <p class="MsoNormal">Thanks,</p>
                                          </div>
                                          <div>
                                            <p class="MsoNormal">Rob.</p>
                                          </div>
                                          <div>
                                            <p class="MsoNormal"> </p>
                                          </div>
                                          <div>
                                            <p class="MsoNormal"> </p>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
_______________________________________________<br>
                                  OpenTRV-dev mailing list<br>
                                  <a
                                    href="mailto:OpenTRV-dev@lists.opentrv.org.uk"
                                    target="_blank"
                                    moz-do-not-send="true">OpenTRV-dev@lists.opentrv.org.uk</a><br>
                                  <a
                                    href="http://lists.opentrv.org.uk/listinfo/opentrv-dev"
                                    rel="noreferrer" target="_blank"
                                    moz-do-not-send="true">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a><br>
                                </blockquote>
                              </div>
_______________________________________________<br>
                              OpenTRV-dev mailing list<br>
                              <a
                                href="mailto:OpenTRV-dev@lists.opentrv.org.uk"
                                target="_blank" moz-do-not-send="true">OpenTRV-dev@lists.opentrv.org.uk</a><br>
                              <a
                                href="http://lists.opentrv.org.uk/listinfo/opentrv-dev"
                                target="_blank" moz-do-not-send="true">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a><br>
                            </div>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                    </div>
                    _______________________________________________<br>
                    OpenTRV-dev mailing list<br>
                    <a href="mailto:OpenTRV-dev@lists.opentrv.org.uk"
                      target="_blank" moz-do-not-send="true">OpenTRV-dev@lists.opentrv.org.uk</a><br>
                    <a
                      href="http://lists.opentrv.org.uk/listinfo/opentrv-dev"
                      rel="noreferrer" target="_blank"
                      moz-do-not-send="true">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a><br>
                  </blockquote>
                </div>
              </div>
              _______________________________________________<br>
              OpenTRV-dev mailing list<br>
              <a href="mailto:OpenTRV-dev@lists.opentrv.org.uk"
                target="_blank" moz-do-not-send="true">OpenTRV-dev@lists.opentrv.org.uk</a><br>
              <a href="http://lists.opentrv.org.uk/listinfo/opentrv-dev"
                rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a><br>
            </blockquote>
          </div>
          _______________________________________________<br>
          OpenTRV-dev mailing list<br>
          <a href="mailto:OpenTRV-dev@lists.opentrv.org.uk"
            target="_blank" moz-do-not-send="true">OpenTRV-dev@lists.opentrv.org.uk</a><br>
          <a href="http://lists.opentrv.org.uk/listinfo/opentrv-dev"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
OpenTRV-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenTRV-dev@lists.opentrv.org.uk">OpenTRV-dev@lists.opentrv.org.uk</a>
<a class="moz-txt-link-freetext" href="http://lists.opentrv.org.uk/listinfo/opentrv-dev">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a>
</pre>
    </blockquote>
  </body>
</html>