Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:21 23 Nov 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 : Electronics : A new PicLog is born!

Author Message
SparWeb

Senior Member

Joined: 17/04/2008
Location: Canada
Posts: 196
Posted: 05:42am 23 Apr 2008
Copy link to clipboard 
Print this post

Here it is and I'm way proud! I've never built anything as complex as this, but after correcting a few crossed connections IT'S ALIVE.





You can sort-of see the separate boards on the little picture. I separated partly because I could use veroboard that I already had - but was too small to hold it all, and partly because these opto-isolator circuits are going to be handy elsewhere, so figuring out how to make a "portable" one may be of use in the future.



Yeah it's pretty crammed. If I was to do it all over again, I would use a board twice as big! There's certainly enough room in the box!

One thing that I'm still fixing: I can't get a response from the "Wind speed" data. Everything else seems to work, as far as my bench test goes:



I'm "tickling" the input with a telecom power supply, which can produce low-voltage AC at 60Hz and 20Hz. Both opto-isolator boards work just as well, but only when feeding data to the "RPM", which is on Pin 3 of the PicAxe. Since I have little modules, I've switched them back and forth and the problem is obviously somewhere between the board, the chip and the software.

I've confirmed that the signal is getting through - you can see in the calibration screen that 20 Hz is visible under "RPM". If I switch the connectors, the 20 Hz cannot be seen under "windspeed".

I looked at the BASIC code and I'm wondering why line 4 of Main reads:

"Count 5, 1000, WSpeed"

... when the 08 PicAXE doesn't have a pin 5 input?
I tried changing that to "Count 2..." but it didn't work.

Still working on it... Still very pleased, and this problem will sort itself out one way or another.

Thanks again!

Steven T. Fahey
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 06:52am 23 Apr 2008
Copy link to clipboard 
Print this post

And thats a big Well Done from me.

Your right, I think, Line 4 should read

Count 2,1000,WSpeed

Its pin 5 on the IC, but its refered to as input 2 in the chip. I cant belive its not been picked up on before. Anyway, I better fix that. Fixed it.

Now I dont know why its not reading the wind speed. Do you have a CRO that could check to see if the pulses are actually getting to pin 5? Also try changing that line to
Count 2,2000,WSpeed
, double the sample time as a test.

Good work.
GlennEdited by Gizmo 2008-04-24
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Gill

Senior Member

Joined: 11/11/2006
Location: Australia
Posts: 669
Posted: 11:08am 23 Apr 2008
Copy link to clipboard 
Print this post

G'day Steve,
Firstly let me say it's good to see your little project purring. I think it's a great little project and the software suits perfectly too. Simple and by building it yourself it means you'v got a better understanding of how it all works than an 'OFF the Shelf' purchase. Well done mate.

Unfortunately it can be the result of shorting that causes a pin to go faulty I have a PICAXE 28X that has an input pin with this problem. It is permanently closed circuit on that pin only. Every other pin functions perfectly. No matter how many times I think I've checked that all is OK before appling power a little slip is all that is needed.

To check if something like this has happened connect an LED with a 330 ohm resistor between pin 5(PICAXE08M pin2)and 0v. Then run the following:

do
high 2: pause 1000
low 2: pause 1000
loop

If this does not flash the LED then pin 2 if faulty. (A voltmeter could check the output alternates hi & low with a little less work.)

Hope that helps

was working fine... til the smoke got out.
Cheers Gill _Cairns, FNQ
 
SparWeb

Senior Member

Joined: 17/04/2008
Location: Canada
Posts: 196
Posted: 02:41pm 23 Apr 2008
Copy link to clipboard 
Print this post

Cheers to you, too, mate - You make it look easy.
My DMM picked up the signal all the way to the pin, so that's when I looked at the code.

I have spare PicAXEs (I really splurged!) so failing the software fix I will simply pull the chip out and try another one.

Gizmo, don't feel bad about the typo in your software. Have you read the PicAXE manual? It's atrocious for useless diagrams and errors. The pom who wrote that sure don't use no queen's english, either.
Steven T. Fahey
 
Footy

Newbie

Joined: 24/12/2006
Location: Australia
Posts: 2
Posted: 10:16pm 23 Apr 2008
Copy link to clipboard 
Print this post

Well done, a good project. Try putting a hatch symbol before the WSpeed variable in Line 5 of the code.
You'll never know if you dont have a go.
 
Gill

Senior Member

Joined: 11/11/2006
Location: Australia
Posts: 669
Posted: 03:15am 24 Apr 2008
Copy link to clipboard 
Print this post

Steve,
Footy has got it. There is a hash missing from in front of WSpeed in the line sending data to the PC.

The code should be:

Start:
SYMBOL WSpeed = W3
SYMBOL RPM = W2
SYMBOL Amp = W1
SYMBOL Volt = W0

Main:
readadc10 4,Volt 
readadc10 1, Amp 
Count 3, 1000, RPM
Count 2, 1000, WSpeed
sertxd("[<V>", #volt, "</V><I>", #Amp, "</I><R>", #RPM, "</R><S>", #WSpeed, "</S>]")
goto main


Two little code errors that no one noticed over the years, Amazing. Good thing we're not brain surgeons. At least there's nothing broken.
was working fine... til the smoke got out.
Cheers Gill _Cairns, FNQ
 
SparWeb

Senior Member

Joined: 17/04/2008
Location: Canada
Posts: 196
Posted: 04:36am 24 Apr 2008
Copy link to clipboard 
Print this post

It's going now. I just discovered the same thing and well, you found the missing #, too. To be extreeemely picky, I would change the "volts" to "Volts" on that line, while I was at it. PicAXE doesn't seem to care, but I expect everything to be case-sensitive, these days.

I haven't put a shunt on the Amps input, yet, but what is interesting is how it "floats" round when not connected. Sometimes positive, sometimes negative, heehee.

I ran a debug on all the pins to make sure, and they're all fine. No magic smoke lost.


Steven T. Fahey
 
Print this page


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

© JAQ Software 2024