« first day (2 days earlier)      last day (18 days later) » 

1:30 AM
Now I am going to power up MX05V, and test with FS1000S at the same time. The test program is listed below:
# picoVirtualWireV07.py tlfong01  2021oct25hkt0918
# Pico GP Pin Assignment
#   GP0 = UART0 TxD = FS1000S
#   GP1 = UART0 RxD = MX05V
# Setup
#   1. To loop back, short TxD pin to RxD pin
#   2. To test Xmit/Recv, connect GP0 pin to FS1000S, GP1 pin to MX05V

from machine import UART, Pin
import utime

uart0 = UART(0, baudrate = 9600, tx=Pin(0), rx=Pin(1))

def testUartLoopBackV01():
    print('Begin testUartLoopBackV01(), ...')
    testMsg = 'Hello World'
    print('  writeTestMsg =', testMsg)
 
 
1 hour later…
2:34 AM
Now I am testing both FS1000S and MX5V at the same time. Test cases: (1) If GP1 is not connected, it reads 'None', (2) If MX5V is not powered, GP1 reads None, (3) If GP1 connected to MX05V which is powered, GP1 read rubbish, such as b'\x00\xff\xb3~\x10\xdd', b'\xbe\xfc\x16\xf0\xf1', b'\x10\x8b\xf0\xfe\xfe\xff', etc.
An update of my program:
# picoVirtualWireV07.py tlfong01  2021oct25hkt1009
# Pico GP Pin Assignment
#   GP0 = UART0 TxD = FS1000S
#   GP1 = UART0 RxD = MX05V
# Setup
#   1. To loop back, short TxD pin to RxD pin
#   2. To test Xmit/Recv, connect GP0 pin to FS1000S (Note 1), GP1 pin to MX05V
# Note 1
#   Pico 3V3 Gp0 direct connect to 5V FS1000S, might cause "latching up", and fry Pico.
# Note 2
#   Suggestions
#   1.  Use HCT125 or HC03 to shift 3V3 logical level to 5V.
#   2.  Use 12V to power FS1000S to increae xmit power and therefore effective distance
 
 
5 hours later…
7:35 AM
PicoVirtualWire program debugging notes: I think I might have forgotten to flush the serial port input and output buffers. However, Rpi4B python's "uart0.flushInput()" and "uart0.flushOutput()" do not work, so my workaround is to instead first write something and read everything. But still no luck.
# picoVirtualWireV08.py tlfong01  2021oct25hkt1526
# Pico GP Pin Assignment
#   GP0 = UART0 TxD = FS1000S
#   GP1 = UART0 RxD = MX05V
# Setup
#   1. To loop back, short TxD pin to RxD pin
#   2. To test Xmit/Recv, connect GP0 pin to FS1000S (Note 1), GP1 pin to MX05V
# Note 1
#   Warning: Pico 3V3 Gp0 pin direct connecting to 5V FS1000S data pin, might cause "latching up", and fry Pico (5% chance).
# Note 2
#   Suggestions
#   1. Use HCT125 or HC03 to shift 3V3 logical level to 5V.
#   2. Use 12V to power FS1000S to increae xmit power and therefore longer effective distance
Update
# picoVirtualWireV08.py tlfong01  2021oct25hkt1526
# Pico GP Pin Assignment
#   GP0 = UART0 TxD = FS1000S
#   GP1 = UART0 RxD = MX05V
# Setup
#   1. To loop back, short TxD pin to RxD pin
#   2. To test Xmit/Recv, connect GP0 pin to FS1000S (Note 1), GP1 pin to MX05V
# Note 1
#   Warning: Pico 3V3 Gp0 pin direct connecting to 5V FS1000S data pin, might cause "latching up", and fry Pico (5% chance).
# Note 2
#   Suggestions
#   1. Use HCT125 or HC03 to shift 3V3 logical level to 5V.
#   2. Use 12V to power FS1000S to increae xmit power and therefore longer effective distance
 
 
2 hours later…
9:45 AM
PicoVirtualWire debugging notes 2. I found the following reference very useful for debugging and developing VirtualWire software. It explains why UART is not used. So I think I need to pay attention to this limitation. I hope that for my very simple application of extremely short message passing, using Pico UART with limited reliability is acceptable. For more reliable applications, I think we need to develop our own protocol, or use a more advanced device.
VirtualWire library for Arduino and other boards - AirSpayce
https://www.airspayce.com/mikem/arduino/VirtualWire/
 
 
2 hours later…
12:01 PM
I am not too sure if 3V3 Pico GP0 direct connect to FS1000A would make it crazy and stop working. So I am thinking of doing some circuit analysis, to see if I really should step up Pico GP0 from 3V to 5V. Or if I am going to power FS1000A to 12V power, should I also need to step up GP0 to 12V. First thing first, the schematic.
I found that circuit very simple. The input is just the base of a simple NPN BJT 8050. So I think perhaps I can use 5V or 12V powered HC03 Quad NAND gate with open drain output to drive this transistor.
 
12:51 PM
 
 
9 hours later…

« first day (2 days earlier)      last day (18 days later) »