go_away

Author Topic: Possibly faulty Syren?  (Read 1323 times)

0 Members and 1 Guest are viewing this topic.

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Possibly faulty Syren?
« on: January 09, 2012, 02:07:21 PM »
I'm working on a self balancing unicycle using this http://www.instructables.com/id/Easy-build-self-balancing-skateboardrobotsegway-/ instructable as a guide and using a Syren 25a motor controller http://www.dimensionengineering.com/SyRen25.htm.

When I finally wired everything up and tested my modified version of his code the motor went crazy and didn't do anything I expected. I tried various stuff to get some decent result out of the motor controller and failed.

So I tried to write a code to check the Syren is functioning properly and the motor was still not behaving as I expected. so I tried to most basic code I can think of to get the Syren to do as it is told.

From the Syren instructions it says

"Simplified serial mode uses TTL level RS-232 serial data to set the speed and direction of the
motor. This is used to interface the SyRen to a PC or microcontroller. If using a PC, a level
converter such as a MAX232 chip must be used. The baud rate is set via DIP switches.
Commands are single-byte, with 0 representing full reverse and 255 representing full forward.
There is also a Slave Select mode which allows the use of multiple motors from a single
microcontroller serial port."

Im using a Seeeduino V2.21 (http://www.seeedstudio.com/depot/seeeduino-v221-atmega-328p-p-669.html?cPath=132_133)

The Syren s1 is connected to TX on the seeeduino
and Syren 0c is connected to Gnd on the Seeeduino

Battery's and motor are connected as instructed and DIP switches have been double triple and quadruple checked.

I'm trying to control the Syren in simplified serial mode.

The seeeduino is not showing any signs of being sick .. it output's to the serial window perfectly and apart from the Syren problem does everything I ask it to do.

Here is my sketch

Ive tried

Code: [Select]
void setup() {
 
   Serial.begin(9600);

}
void loop() {

Serial.print(200); // forward
delay (10000);
Serial.print(127); // idle
delay (10000);
Serial.print(50); //  reverse
delay (10000)
}

and Ive tried

Code: [Select]
void setup() {
 
   Serial.begin(9600);

}

void loop() {

Serial.write(200); // forward
delay (10000);
Serial.write(127); // idle
delay (10000);
Serial.write(50); //  reverse
delay (10000)
}


Neither had the effect I was expecting .. the motor sped up and slowed down (almost but not completely to a stop) but didn't change direction and didn't appear to do whatever it was doing every 10 seconds.

I've distilled the code down to the bare minimum needed to test the hardware. I just need someone to confirm that I'm not doing something basically wrong. or connecting something wrong somewhere.

I'm tearing my hair out here. I'm so close to testing and I feel like either a stupidly simple coding error or a silly hardware problem is holding me back.

If I'm having this much trouble just getting to motor to do as it's told then I dont stand a chance getting everything else working.

I've sent an email to dimension engineering and they sent me a simple test to do involving setting all the DIP switches to the ON position and using a piece of wire to jump s1-5v and s1-0v and I havn't heard anything back since I replied with the results.

Thanks for any help you guys might be able to offer.

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Possibly faulty Syren?
« Reply #1 on: January 10, 2012, 01:44:15 AM »
Try using pot for analog speed control. See if that works. If it doesn't, there's something wrong with a driver.

SyRen25A Manual go to page 5 and set it up as in figure 2.1.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #2 on: January 10, 2012, 03:59:00 AM »
Wont that just tell me whether or not it work's in analogue mode? I need it to to work in serial mode.

I will give it a try regardless.

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Possibly faulty Syren?
« Reply #3 on: January 10, 2012, 04:17:59 AM »
It will tell You if it works at all. And later, if You can't get it to work in serial comm mode, it is possible to use PWM with low pass filter to drive it in analog mode but from digital source.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #4 on: January 10, 2012, 06:27:40 AM »
Doesn't look like I've got any pot in my drawer of bits so Im going to have to buy one.

Does it matter if I go for a 1k ,5k or 10k as recommended in the manual?


Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Possibly faulty Syren?
« Reply #5 on: January 10, 2012, 12:03:25 PM »
If manual recommends 10K pot - go for 10k pot :)

If You have different value resistors, You can setup different voltage outputs and test that way.

Or if You have 1 value resistors (say 10 of them) just connect them in series and in-between each resistor You will get different voltage.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #6 on: January 10, 2012, 12:44:19 PM »
If manual recommends 10K pot - go for 10k pot :)


I meant the manual recommends 1k, 5k OR 10k

but I've ordered a 5k .. figured it wouldn't matter for a quick test.

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Possibly faulty Syren?
« Reply #7 on: January 10, 2012, 01:34:24 PM »
Ah, OK, I didn't get You before. Basically what manual says is that it does not care what pot You are going to use as long as it's in 1k to 10k range  ;)

Good luck with it :)
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #8 on: January 10, 2012, 03:21:25 PM »
I presume If I connect a multimeter in place of the motor, then I should be getting readings along the lines of

(positive)12 v ish   -    0v -    -12v ish (Negative)

From a 24V supply.

Cus I'm not getting that  ???.   In fact the readings don't make any sense at all.

It's hard to get a decent gauge on motor speed when your just watching it spin. Much easier to see what's happening with a multimeter as long as it works like that.

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Possibly faulty Syren?
« Reply #9 on: January 11, 2012, 02:35:15 AM »
Readings don't make any sense because driver outputs PWM and not analog voltage. From 24V supply You will most likely get around 24V output as a square wave with a duty cycle set by serial or analog signal from Your uC.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Possibly faulty Syren?
« Reply #10 on: January 11, 2012, 08:25:43 PM »
Connect your uart to hyperterminal (instead of the motor driver) to verify it's issuing the right commands as you tilt your robot.

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #11 on: January 12, 2012, 06:11:45 AM »
Connect your uart to hyperterminal (instead of the motor driver) to verify it's issuing the right commands as you tilt your robot.

Sorry I don't know what you mean.

You mean connect up the arduino Tx pin to my PC? I did a search for hyper terminal and it brought up some software presumably I need that to "read" the serial data coming from the arduino?

Can I connect it up with the US@B cable or is some more specialist hardware needed?

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #12 on: January 12, 2012, 06:15:35 AM »
I've tested the Syren with a pot ( 5K ) in analogue mode and it seems to be functioning fine like that. it went from I guess full speed forward to full speed backwards and stopped dead at about the midpoint

Ive got an arduino uno on order (it will get used for another project at some point so I figured why the hell not) so I will test with that when it arives.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Possibly faulty Syren?
« Reply #13 on: January 12, 2012, 07:23:15 AM »
You will need a USB to serial adaptor to do this. It's a useful tool to have if you don't already own one. The program is called a terminal program, and there are many. Hyperterminal is just one of them. TeraTerm is the second most popular. Hyperterminal came free with XP and 98, but not with later Windows versions.

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #14 on: January 12, 2012, 12:58:10 PM »
Dimension Eng. have started getting back to me as well .... it has been passed onto there engineering dept. so hopefully they will have some kind of answer for me soon.

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #15 on: January 13, 2012, 08:13:41 AM »
Same results with a new arduino board.

It's got to be either my code or the Syren . I've ruled everything else out.

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #16 on: January 14, 2012, 05:32:20 PM »
I've decided to leave this with Dim. Eng for the time being. I'm finally getting regular (if somewhat slow) communication with them.

I get the feeling they are a hairs breath away from admitting it's a faulty unit and getting me to send it back.  :-\

as I've said I ruled out everything apart from my code and a faulty syren .. and no-body can find a problem with the code.

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #17 on: January 16, 2012, 06:37:57 PM »
Finally they have agreed to sending out a "test unit".

Results after I have arranged the seller to send me out a new unit. Fair play to dimension they offered to send it out themselves but It will be quicker and cheaper (import taxes etc) for me to arrange to get one from the original seller.

Hopefully this will solve the problem .. if not it's back to square one.

Thanks fir al the help.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Possibly faulty Syren?
« Reply #18 on: January 18, 2012, 01:33:46 AM »
Their Sabertooth 2x5 has a serious manufacturing/design flaw that causes occasional random electrical shorts, that I do know. They've probably fixed that in later versions, as mine is pretty old. I don't know about the Syren, but I'll ask a friend of mine who used to work at DE.

But my bet is you've made the mistake, and by checking the serial data we can narrow the problem down :P

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #19 on: January 18, 2012, 08:48:51 AM »
Im pretty sure the serial data is ok.

Without buying that cable and the adaptor to connect it up to the PC I cannot be 100% sure but the arduino is feeding all other serial data back to the PC fine .

I don't see how the code can be wrong there is practically nothing in it and several people (including DE) have said it look's ok.

And I'm getting the same results from two different arduino boards. The only things which has stayed exactly the same is the Syren

When I first came across the problem I would have agreed with you ... that Its fairly obvious I made a mistake ... which is why I wrote the code to do nothing apart from send three bytes to the controller. I was fully expecting DE to reply to my email saying something like "you've connected this up wrong" or "this is the problem in your code, try this code" and I was going to slap myself for not noticing such a simple newb mistake.

But DE (and sevral others) cant find a problem with my code or my set up

Offline fish_manTopic starter

  • Jr. Member
  • **
  • Posts: 21
  • Helpful? 0
Re: Possibly faulty Syren?
« Reply #20 on: January 19, 2012, 11:30:03 AM »
Well that answer's that then . I got the new controller today and it performed beautifully.

Now to start adding bit's in and getting some serious testing done.

Thanks for the help in resolving this matter.

 


Get Your Ad Here