Wawa:
I have to find the time to properly analyse this module.
A quick measure of the RX pin (pin3) showed ~3.3volt (3.3volt logic).
The TX pin however has full supply voltage on it.
Both measured unloaded.
Leo..
Hi Leo, here two pictures: one showing the receiving HC12 pin with the incoming data, pin not connected, the second with the pin connected to the Arduino RX input.
Just measured the RX pin(0) of an Uno, and there is about 8mA pull up current there (that has to be pulled down by the HC-12). Measured about 7.5mA on the RX pin of a Nano.
Not possible with the internal 1k series protection resistor of the HC-12.
I think you can forget about using the RX/TX pins.
Leo..
Wawa:
Just measured the RX pin(0) of an Uno, and there is about 8mA pull up current there (that has to be pulled down by the HC-12). Measured about 7.5mA on the RX pin of a Nano.
Not possible with the internal 1k series protection resistor of the HC-12.
I think you can forget about using the RX/TX pins.
Leo..
It does work with a Pro Mini, which has the same hardware architecture as a Uno.
Wawa:
Just measured the RX pin(0) of an Uno, and there is about 8mA pull up current there (that has to be pulled down by the HC-12). Measured about 7.5mA on the RX pin of a Nano.
Not possible with the internal 1k series protection resistor of the HC-12.
I think you can forget about using the RX/TX pins.
Leo..
I justed tested it with the UNO too, and it works as well, using the programs included.
When connecting the HC12 TX pin at the receiver end to the Arduino RX pin 0, with the RX program loaded, it works.
EDIT: and at 115200 baud!
So there must be an issue with my program from post #36. But what?
Wawa:
Just measured the RX pin(0) of an Uno, and there is about 8mA pull up current there (that has to be pulled down by the HC-12). Measured about 7.5mA on the RX pin of a Nano.
Not possible with the internal 1k series protection resistor of the HC-12.
I think you can forget about using the RX/TX pins.
Leo..
SOLVED!!
I did use Arduino clones with CH340 serial USB driver for my trials. My final trick up my sleeve, after a full day sweating on this (changing HC12's, reprogramming,...), was to change the clones with actual UNO's that use the Mega16U2 USB driver. BINGO.
For a reason unknown to me it is impossible to use the hardware serial pins 0 (RX) and 1 (TX) of these clones, at least for my application here.
When using UNO's, I can simply swap the wire between the transmitter TX pin1 and receiver RX pin0 by two HC12's, one per side.
Maybe the HC340 uses stronger internal pull up.
You can measure pull up current with a DMM set to 200mA.
Measure current from TX to ground and from RX to ground.
No serial trafic (bare sketch), and everything removed (just USB power).
Post values. It might help others.
My Uno clone (CH340):
pin 0: 7.9mA
pin 1: 3.2mA
Leo..
Wawa:
Maybe the HC340 uses stronger internal pull up.
You can measure pull up current with a DMM set to 200mA.
Measure current from TX to ground and from RX to ground.
No serial trafic (bare sketch), and everything removed (just USB power).
Post values. It might help others.
My Uno clone (CH340):
pin 0: 7.9mA
pin 1: 3.2mA
Leo..
Hi Leo, I checked the actual CH340 pcb and R8 and R9 are not present, meaning both the CH340 and Atmega328 chips have their TX and RX pins straight to the connector.
When I apply no load on the RX pin 0 (where the serial commuications from the HC12 arrive) its voltage is 4.60V.
When a 1k resistor is connected from the RX connector (pin 0 on the pcb connector, this is the receiving input) to GND, the voltage drops to 4.36V.
When the CH12 is connected the "LOW" voltage drops to 3.62V.
This means that the output impedance of the HC12 is lower than 1k, yet still unable to pull the TX line (which is connected to the RX pin 0) to below TTL "LOW" threshold.
The issue is not with the HC-12: I substituted several HC12's, and tested same HC12' on other Arduino's (where ok).
I tried with a spare CH340 and I have the same issue.
I do not see sense in what you propose to measure because my measurements are decisive: the serial hardware TX connection (pin 0) on Arduino's equipped with 16U2 do work when used with HC12's as wireless serial link.
This same link set up with Arduino's equipped with CH340 do not work.
A fairly simple conclusion is to avoid CH340 equipped Arduino's on serial links with hardware serial.