help serout

Gereon

New Member
Hi Guys,



I am absolutely new to this stuff, I know a bit about the basics in electronics, a lot about logic circuits, and even more about programming.... but as you can read, there is a shortcoming when it comes to the more advanced stuff in electronics, that's why I do need your help.

I recently purchased the Picaxe Microbot starter kit (as I thought that this would be an ideal platform to learn the basics, and to grow further from there). In combination with an SRF005 a servo a brandnew Picaxe 18x, and two Sharp GP2D12 infrared range sensors. Nice little toys and they all do work perfectly. But I have a problem since the very beginning that I have received the board. One of the two DC motors didn't do anything at all. I first blamed myself, by claiming it would have been a result of sloppy coding. But that didn't really seemed to be the case.

As I went through all possible options (broken DC motor, etc), I started by taking my trusty multimeter into my hands, and messured through all the ports that are going out to the L293D Motor driver. And I see something really strange:



picboard.jpg

To give you a raw idea about the deltas between the original board and my modified setup:




*Position R-2 carries a 330Ohm resistor.
*The V+ and GND of Out 2 are connected to a small servo
*Out 2 is directly connected to the control of this servo (so there is a 330Ohm resistor between them) and the servo works fine
*The SRF005 is directly hooked up to the SRF004 terminal, and works fine.
*the V+ and GND of Out 1 and 0 are hooked to the Sharp sensors in order to feed them.
*the In 1 and 2 terminals are hooked up to the output of both sharp sensors for ADC, and seem to work without any problems.

That's about it. But now to my problem:

One of the two DC motors (as a drive) is not working. If I messure Out 1 and Out 2 of the LD293D I get a steady current of approx 4.2 volts and that seems to do the job driving the little motor when active.

The other end of the LD293D doesn't seem to do that much, if active, it only gets to approx. 0.11 volt..


If I go further down the chain the PWM Out6 offers me the desired 4.2volt the Out 4, again only something between 0.11-0.5 volts.

On the Picaxe 18x itself out 5 is showing the same symptoms!!!.... Then my new 18x became my suspect, and I replaced it with the included Picaxe 18... but still the same issue. (which makes me beleive that my PIC is ok). Please also do remember the followin: The problem did occur way before I started to solder my own material onto the board.

Can this be caused by a broken capacitor (not charging correctly), or do you guys think that either the PWM, or the LD293D are busted... and if, how can I test / troubleshoot this?



Many thanks!! All help will be really appreciated!



With kind regards,



Gereon

-Amsterdam
 

slurp

Senior Member
If I've hit a problem and haven't built up the board and function testing as I when I'd step back and consider what I test and how.

Popping all the ICs out, testing for continuity point to point on the sockets, then with power for expected voltages.

If this is ok, then I'd add the PICaxe and try programming a simple test rountine with basic I/O. It sounds like you've done this but it may be worth programming Out4-7 and testing against the sockets for PWM and L293D.

If all is still ok, I'd insert the PWM chip and test it's output. I presume that you have read the manual, understand how the PWM chip operates and how you vary it's output. It may be difficult to see if you don't have access to a scope.

Finally we're getting to re-inserting the the motor driver chip.

I hope this helps you track down a little further.

Regards,
Colin
 

Gereon

New Member
If I've hit a problem and haven't built up the board and function testing as I when I'd step back and consider what I test and how.

Popping all the ICs out, testing for continuity point to point on the sockets, then with power for expected voltages.

If this is ok, then I'd add the PICaxe and try programming a simple test rountine with basic I/O. It sounds like you've done this but it may be worth programming Out4-7 and testing against the sockets for PWM and L293D.

If all is still ok, I'd insert the PWM chip and test it's output. I presume that you have read the manual, understand how the PWM chip operates and how you vary it's output. It may be difficult to see if you don't have access to a scope.

Finally we're getting to re-inserting the the motor driver chip.

I hope this helps you track down a little further.

Regards,
Colin
Thanks Colin,

I've figured out the problem, it's the PWM (Pulse Width Modulator). The problem is, it's a rev-ed custom. So I hope that they will send an replacement.

The good news is: I can run the bot without it (Both DC motors seem to work) but can't reverse, make any fast turns or set the speed of both the DC motors...

Hopefully Rev-Ed will be friendly enough to replace the broken IC.

Thanks again,

Kind regards,

Gereon
 

rub89

New Member
hello
I am French, excuse me for my English
here my problem
I control a lcd (serial/i2c lcd and clock v2) with a picaxe14m

I want to have two variable b1 and b2 to put an alarm.
example

let b1=22
let b2=11
pauses: 500
serout 7, n2400, (253.8 " 00/00/00 b1: b2 )
1000 pause

doesn't that function, why?

thank you to answer me
 

Attachments

hippy

Ex-Staff (retired)
Welcome to the PICAXE forum.

You need to use the "#" directive within SEROUT to convert the variable into the digits to send ...

serout 7, n2400, (253,8, "00/00/00 ",#b1,":",#b2 )

or something similar.

You may also need to handle the cases when b1 or b2 are less than 10 as "#" will only send single digits, no leading zeroes ...

serout 7, n2400, (253,8, "00/00/00 " )
if b1 < 10 then : serout 7, n2400, ("0") : end if
serout 7, n2400, (#b1,":")
if b2 < 10 then : serout 7, n2400, ("0") : end if
serout 7, n2400, (#b2)

Check you are sending the correct number of characters as required by the AXE033.
 

rub89

New Member
thank you for your answer, hippy

I will test your method

thank you still

rub89


I have test the order serout 7, n2400, (253,8, "00/00/00 ",#b1,":",#b2 )
that does not function

after several tests, I have find the right formula is:
serout 0, n2400, (253,8,"00/00/00"," ",#b1,":",#b2," ") :D
 

westaust55

Moderator
Hi rub89,

The syntax for both the answer hippy gave and what you have presented are correct. You have added a separate space after printing/sendfing the two variable in your example.

When you say the example given by hippy did not work, is this only because the PICAXE pin number (7) which is the one you had in the first post was not the right pin number?

You should find that this also works properly for you:
SEROUT 0, n2400, (253,8,"00/00/00 ",#b1,":",#b2," ")
 
Top