Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 12:05 05 May 2024 Privacy Policy
Jump to

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 : Odd serial data for micromite

     Page 3 of 3    
Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 06:21pm 01 Jul 2017
Copy link to clipboard 
Print this post

Yes, Jim I do have some 4016's in the drawer but I am afraid that the draw is in the shed and the shed is currently 2500 Km away. There is a Jaycar outlet in the nearest town, I might have to see if I can get one and put it in the Tx line. Would you think that I may have to set up two of the 4016's switches as a changeover between the TX and Rx lines?
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5913
Posted: 06:42pm 01 Jul 2017
Copy link to clipboard 
Print this post

I would try with the RX line connected full time. You can easily strip of the commands (once you start getting replies).

There is sure to be a better line driver that does have tri-state (74LS240 74LS244?) but I usually reach for the 4016 in these cases.

I hate one wire comms...

Jim

VK7JH
MMedit   MMBasic Help
 
GoodToGo!

Senior Member

Joined: 23/04/2017
Location: Australia
Posts: 188
Posted: 12:05am 02 Jul 2017
Copy link to clipboard 
Print this post

I would've thought one of the 5v pins on the MM could drive the sensor direct?
Also, it's one thing the probe waking up, but the command issued may be lost between when the probe wakes up from the break to when it's ready to accept commands, hence the retries.....

Where did you get the probe from? Would be good to get a proper SDI12 routine for the MM working....

Cheers,
GTG!
...... Don't worry mate, it'll be GoodToGo!
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 08:09pm 03 Jul 2017
Copy link to clipboard 
Print this post

  Quote  I would've thought one of the 5v pins on the MM could drive the sensor direct?

@GTG I can only get 0-3V3 out of the 5V pins so OK for Rx need some sort of voltage amplifier for the Tx and the PCB's that are being used currently have a 2803 on board so I used that instead of a simple transistor cct.

  Quote  Where did you get the probe from?

@GTG. I am looking at these probes for my brother-in-law as he has them from another project. A couple of years ago I built up some solar powered radio controlled water valve actuators using the PIC150 chips and MMBasic. He has asked me if I can integrate these soil moisture probes into the system. I said that it could be possible and I would look into it(famous last words). I have replaced the 150 chip with a 170 and did some minor mods to the pcb to suit the probe but as you can see I am still in trouble.

As there was no room to add another IC like the 4016 I decided to put together something simple with just the PIC, 2803 and the 4016. The problem I now have is that the output of the 2803 still swings between 0.5v and 4.92v which I think is satisfactory but the 4016 drops this swing to 0.65v to 3.78v which I don't think is enough for the probe to recognise. I have had the very occasional response to the "?!" command with a zero.
Graeme
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5913
Posted: 08:17pm 03 Jul 2017
Copy link to clipboard 
Print this post

  OA47 said  The problem I now have is that the output of the 2803 still swings between 0.5v and 4.92v which I think is satisfactory but the 4016 drops this swing to 0.65v to 3.78v which I don't think is enough for the probe to recognise. I have had the very occasional response to the "?!" command with a zero.
Graeme


Getting a zero response is good. That should be the probe telling you that it's address is '0'

The voltages you are seeing ire 'just' within specs so a bit too close to be reliable once the cable length comes into play.

Does paralleling up all 4 switches in the 4016 and reducing the pullup resistor to 1k help any?

Jim
VK7JH
MMedit   MMBasic Help
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 12:47am 04 Jul 2017
Copy link to clipboard 
Print this post

Thanks Jim, paralleling up all 4 switches didn't make a great deal of difference but reading com1 from the right pin made the world of difference....

> run
ENTER COMMAND ?!
8 BIT SERIAL MONITOR ?!0

CHR# 8BIT ASC 7BIT ASC
1 63 ? 63 ?
2 33 ! 33 !
3 48 0 48 0
4 141 13
5 10
10

_____________________________________________________
>


> RUN
ENTER COMMAND 0C5!
8 BIT SERIAL MONITOR 0Ã5!000±0´

CHR# 8BIT ASC 7BIT ASC
1 0 0
2 48 0 48 0
3 195 Ã 67 C
4 53 5 53 5
5 33 ! 33 !
6 48 0 48 0
7 48 0 48 0
8 48 0 48 0
9 177 ± 49 1
10 48 0 48 0
11 180 ´ 52 4
12 141 13
13 10
10

_____________________________________________________
>


> RUN
ENTER COMMAND 0I!
8 BIT SERIAL MONITOR 0É!0±²ÅP±00D-0´ 0±±´06±·±3
CHR# 8BIT ASC 7BIT ASC
1 48 0 48 0
2 201 É 73 I
3 33 ! 33 !
4 48 0 48 0
5 177 ± 49 1
6 178 ² 50 2
7 197 Å 69 E
8 80 P 80 P
9 177 ± 49 1
10 48 0 48 0
11 48 0 48 0
12 68 D 68 D
13 45 - 45 -
14 48 0 48 0
15 180 ´ 52 4
16 160   32
17 48 0 48 0
18 177 ± 49 1
19 177 ± 49 1
20 180 ´ 52 4
21 48 0 48 0
22 54 6 54 6
23 177 ± 49 1
24 183 · 55 7
25 177 ± 49 1
26 51 3 51 3
_____________________________________________________
>


So we have communication by dropping off the transmit line with the 4016 straight after the command is sent. This is a great leap forward and I now have the dilemma of wether to go through the process of redesigning the PCB's with the additional chip or thinking of a smart way of obtaining the same result with a smaller component and retrofit the existing PCB's. I would be open for suggestions from any readers.
Graeme
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5913
Posted: 12:00pm 04 Jul 2017
Copy link to clipboard 
Print this post

That is good news!
VK7JH
MMedit   MMBasic Help
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 12:28pm 04 Jul 2017
Copy link to clipboard 
Print this post

TassyJim, thanks for your assistance once again. I was pondering my next step last night and thought about other replacements for the ULN2803 and if there was a higher impedance version available or using a single transistor or fet cct to achieve the voltage amplification and removal of the transmit loading from the data line.....
In the meantime I will see if I can optimise the MMBasic code to get all of the information that is available.

Graeme
 
     Page 3 of 3    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024