Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:11 06 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 : Electronics : I must be stupid

Author Message
Downwind

Guru

Joined: 09/09/2009
Location: Australia
Posts: 2333
Posted: 05:08am 20 Dec 2009
Copy link to clipboard 
Print this post

I spent half of last night trying to get a circuit working using a 339 quad comparator with no results.
On closer inspection today i find i had reached into the draw and pulled out a 393 dual 4bit bin counter instead of the 339 comparator.
Doh!! no wonder the logic made no sense.

I had checked and double checked the wiring and checked it again all was correct but nothing would work.
No wonder when dopey here used the wrong chip.
Either i have too much junk or need a break, if not both.
Am i the only one who do dumb things like this???

As i go off grumbling to myself how stupid that was and blindingly oblivious ......Grumble,grumble, growl, growl......

Pete.
Grumble, grumble.......$%#@..........&*#!%....................Bugger. !

Sometimes it just works
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5024
Posted: 05:52am 20 Dec 2009
Copy link to clipboard 
Print this post

I do stuff like that all the time, only I dont tell anyone
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
oztules

Guru

Joined: 26/07/2007
Location: Australia
Posts: 1686
Posted: 09:05am 20 Dec 2009
Copy link to clipboard 
Print this post

If that were the dumbest thing I did for the day, I'd be pleased

oztules
Village idiot...or... just another hack out of his depth
 
Downwind

Guru

Joined: 09/09/2009
Location: Australia
Posts: 2333
Posted: 09:42am 20 Dec 2009
Copy link to clipboard 
Print this post

Feeling better now, as with the right chip all worked as intended.
Just a day later and a lot of bad words in between.
Think the problem got worst with the odd ale during problem solving. (well it is the festive season)

Pete.
Sometimes it just works
 
Dinges
Senior Member

Joined: 04/01/2008
Location: Albania
Posts: 510
Posted: 10:27am 20 Dec 2009
Copy link to clipboard 
Print this post

Glad to say that such things never happen to me.

For example, I never happened to absentmindedly replace a 7805 by a 7812 (despite the fact that they've each got their own bin) and then wonder how I suddenly kept blowing digital logic ICs and tantalum elcos on a board that happened to work fine previously. The scary part is how long it took me to realize what had happened, as I was about to replace the 3rd IC and 2nd tantalum cap....

And I never happened to measure the ripple voltage on the elcos of a large powersupply last week and be pleasantly surprized that ripple was only 400mV, far less than the 5V that I originally dimensioned the capacitors for.... only to realize much later that the little switch on the scope probe was set to 1:10....

It's good to see that such things only happen to others, not me.

Peter. (<-- points to sig line)
 
MacGyver

Guru

Joined: 12/05/2009
Location: United States
Posts: 1329
Posted: 02:31am 21 Dec 2009
Copy link to clipboard 
Print this post

[Quote]Glad to say that such things never happen to me.

Ditto! But you must realize Im 50% Dutch, so it's no wonder!



Nothing difficult is ever easy!
Perhaps better stated in the words of Morgan Freeman,
"Where there is no struggle, there is no progress!"
Copeville, Texas
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1211
Posted: 10:25am 21 Dec 2009
Copy link to clipboard 
Print this post

Haven't you guys heard of 'Murphy" just blame him, I do and it works for me......

Like spend 5 hours machining a precision acme shaft after spending ages making a nut using an acme tap so the internal thread was spot on. When there's noway the nut will start on the thread ya realize 'Murphy' put the wrong change gear on the gear train and it's 1 tpi out.
 
Downwind

Guru

Joined: 09/09/2009
Location: Australia
Posts: 2333
Posted: 08:44am 27 Dec 2009
Copy link to clipboard 
Print this post

I spent most of the day playing a game called "spot the error"
I was a game i created (not by choice)

I had rewritten Gizmo's code for his pump controller using symbols and labels so it would read a little clearer.

With running it as a program test it would function on the first pass through and then loose the plot.
With the sleep delays it makes it hard to work out what was wrong.
It was an error i had created in program.

I will post the code with error, should anyone else like to play this silly bloody game of " Spot the error"



'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

'GIZMO'S GADGET

symbol battery = b1
symbol float = b2
symbol pump_timer = b3
symbol time_out = b4

symbol led = 0
symbol mosfet = 2
symbol delay = 500

symbol V_cutin = 90
symbol V_cutout = 80
symbol time_set = 50

low mosfet
low led
pump_timer = 0
float = pin3


main:

readadc 4, battery
if battery < V_cutout then batt_low
if pump_timer > time_set then pump_on_to_long
sleep 1
if float = 0 then pump_on
if float = 1 then pump_off

goto main


pump_on:

high mosfet
high led
sleep 12
inc pump_timer

goto main

pump_off:

low mosfet
low led
pump_timer = 0

goto main

pump_on_to_long:

low mosfet
high led
pause delay
low led
sleep 1

goto pump_on_to_long

batt_low:

low mosfet
for time_out = 1 to 200
high led
pause delay
toggle led
pause delay
toggle led
pause delay
toggle led
sleep 1
next time_out

readadc 4, battery

if battery > V_cutin then main
goto batt_low

goto main


I have found the error but can you spot it??

Happy hunting.

Pete.













Sometimes it just works
 
RossW
Guru

Joined: 25/02/2006
Location: Australia
Posts: 495
Posted: 08:38pm 27 Dec 2009
Copy link to clipboard 
Print this post

I'm guessing from a quick once-off read through it, that it would be spending rather a lot of time in "pump_on_too_long"

(I stopped looking for any other problems when I found that one)

So... what do I win? :)
 
Downwind

Guru

Joined: 09/09/2009
Location: Australia
Posts: 2333
Posted: 03:12am 28 Dec 2009
Copy link to clipboard 
Print this post

Ross,

No cigar!!!!!! The pump_on_to_long, was a intended locked loop done by Gizmo, in case the float got stuck.
( i did comment that bit out for testing)

Back to the message board sorry to say and try again!!

Pete.

Sometimes it just works
 
RossW
Guru

Joined: 25/02/2006
Location: Australia
Posts: 495
Posted: 04:04am 28 Dec 2009
Copy link to clipboard 
Print this post

ok, well the only other things that stand out are that you're reading the value of "float" from pin3 only on initialisation - which isn't necessarily WRONG, but in the context of your code would seem counter-intuitive. It also fits within the broad spec of "works first time".
 
Downwind

Guru

Joined: 09/09/2009
Location: Australia
Posts: 2333
Posted: 04:41am 28 Dec 2009
Copy link to clipboard 
Print this post

Ross,

You have won the booby prise of a half eaten candy bar. (more than likely the other half to the one oztules is waiting on )

Obviously you like silly bloody games.

Talk about Code Red!! i had read the code over and over and you think i could spot the error.

Symbol float = B2.

should have read

Symbol float = pin3

(and delete float = pin3)

O-well it gave you a half hour of fun. (clever bugger)

Pete.
Sometimes it just works
 
Print this page


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

© JAQ Software 2024