Author Topic: Robot Kit  (Read 19874 times)

Blitzfx

  • Newbie
  • *
  • Posts: 31
Robot Kit
« on: February 19, 2016, 11:02:07 pm »
Hi,

Sorry if this is answered somewhere or if an email was already sent out but, is there a manual for getting started for the robot kit? (pledged $43 or more)

Everything came in the mail and I'm not really sure where to start :P

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Robot Kit
« Reply #1 on: February 20, 2016, 12:58:51 am »
digistump.com/wiki/oak - click on Robot Kit near the bottom, it still has some specifics more for the Digispark Pro then the Oak but it is mostly universal for both

Blitzfx

  • Newbie
  • *
  • Posts: 31
Re: Robot Kit
« Reply #2 on: February 21, 2016, 05:20:33 am »
In your robot tutorial: http://digistump.com/wiki/digispark/tutorials/robot

where do these go?

emardee

  • Full Member
  • ***
  • Posts: 135
Re: Robot Kit
« Reply #3 on: February 21, 2016, 12:43:33 pm »
I've not got the kit, so only guessing.

They look like encoder wheels to use with optical sensors so the oak could be set to analyse the speed and position of each wheel. Since they are not in the main instructions (although they can be seen in the bag in instructions photo), they must be optional parts for advanced play and experimentation. They look from photos that they attach on the opposite side of motor to the wheel... on the axle that sticks out with nothing attached. These axles line up with slots in the base which the encoder wheels presumably pass through. Not sure where the optical sensors mount, but hopefully that will become apparent if you get the encoder wheels in place (they sit round the wheels and trigger when the slots pass). Did you get optical sensors in the kit too?

Blitzfx

  • Newbie
  • *
  • Posts: 31
Re: Robot Kit
« Reply #4 on: February 22, 2016, 12:57:07 am »
I think you're right about the encoder but I wasn't 100% sure.
There's a weird extrusion from the motor chassis (facing outwards) but it's fully enclosed which makes me think maybe there's some capacitive sensor in there or something. I don't know.

This is what I have left basically:







No idea which motor goes to A and which goes to B. Instructions didn't say whether the left or right went to A / B

Now I have to go learn and find out how to program it. Not looking forward to it since I keep seeing all these firmware issues mentioned in the kickstarter updates and forums here.
« Last Edit: February 22, 2016, 01:00:30 am by Blitzfx »

emardee

  • Full Member
  • ***
  • Posts: 135
Re: Robot Kit
« Reply #5 on: February 22, 2016, 02:02:36 am »
So you have no optical sensors? Presumably that is why the encoder wheels aren't mentioned. Suspect the base, motors, wheels, encoders etc, are a pre-bought kit from elsewhere, and the electronics are supplied by Digistump and added to the base to make a robot kit. The reason the encoders are there is because they were part of the hardware kit Erik bought. Looks like Erik chose not to add optical sensors to the electronics parts he added, but you could always add those yourself.

Suspect the bulge on the motor casing is just the axle or part of the motor. Wouldn't expect capacitive sensor in there.

I did wonder if the little cut outs on either side of the encoder wheel slot where designed for the optical sensor to slip down over the encoder wheel from the top. Clearly in the Digistump tutorial, they put a cable tie across there instead to tidy up the cables. However this is just guessing since I can't see where the encoder wheels come to in relation to the slots in the base. Maybe try adding the encoders to the motor, then take a photo for us to see how that looks. maybe we can then work out between us how it should look.

Blitzfx

  • Newbie
  • *
  • Posts: 31
Re: Robot Kit
« Reply #6 on: February 23, 2016, 12:33:58 am »
The encoders aren't an interference fit so I'm not going to bother mounting them.




digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Robot Kit
« Reply #7 on: February 23, 2016, 01:11:11 am »
Yes encoders are included because they came with the robot kit parts from the factory, and we figure some people may want to make use of them, even though we didn't order them and don't use them in our build. Sorry for any confusion.

emardee

  • Full Member
  • ***
  • Posts: 135
Re: Robot Kit
« Reply #8 on: February 23, 2016, 02:22:18 am »
Yeah from the photos, I'm pretty sure the sensors would be designed to drop in from the top of the baseboard over either side of the encoder wheels.

Could be a nice upgrade at a later date assuming you can find sensors with the right dimensions to push into the slots.

Mike

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: Robot Kit
« Reply #9 on: February 23, 2016, 03:12:12 am »
No, there won't be any capacitive sensors in there - they are just plain DC motor shoved into a small gearbox (which probably slows them down) and which also changes one shaft into two - one sticking out each side. Do they turn in opposite directions by any chance? Or both the same way?

You could possibly make your own sensor for that out of a led and a light sensor - stick the LED on the middle side, and the light sensor on the side of the motor casing. You'd want to drop some glue on motor shaft then to make sure that encoder wheel doesn't move! lol

Pete

driffster

  • Newbie
  • *
  • Posts: 42
Re: Robot Kit
« Reply #10 on: February 23, 2016, 09:26:25 pm »
Have you been able to make it work using the example code? (basicrobot or the code from http://digistump.com/wiki/digispark/tutorials/robot)

I have found that the original code used 255 as max analog value, which is actually 1023 on the Oak. Quickly noticed that by measuring the voltage at the pin was 25 % of what was expected.

I will have to tweak the values a bit for forward and reverse, the motors are not going on at the same speed.

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: Robot Kit
« Reply #11 on: February 23, 2016, 10:02:44 pm »
That doesn't sound right - range for analogWrite is supposed to be 0 - 255, with 0 being always off, and 255 being always on, and anything in between being the on/off duty cycle. So in other words, analogWrite(0,255) should be no different whatsoever to digitalWrite(0,HIGH). If you're getting different responses, then that is a bug that needs to be reported.

EDIT: Checked it out with a multimeter and 'scope - and you are spot on... it is not fully on when 255, but instead at 1023. A quick search of why points to a define statement in the ESP8266 core, so it was a deliberate choice (and annoyance to all documentation and code that uses the standard 255 as full on). https://github.com/esp8266/Arduino/issues/295

Tweaking the values is normal - the motors are never perfectly matched. That's where the encoders can come in handly, as they give you the feedback as to how fast the motors are turning, so given the right code, you can get the motors to basically 'sync themselves'.
« Last Edit: February 23, 2016, 11:36:45 pm by pfeerick »

driffster

  • Newbie
  • *
  • Posts: 42
Re: Robot Kit
« Reply #12 on: February 24, 2016, 06:19:04 pm »
I been working mostly with Teensy and Arduino so 256 was actually strange for me  ;)

Actually got some nice sensor for the encoder, a perfect match for the cavity, would only need screw hole to make it perfect. It's from an old spectrometer from the university, I will have to scavenge a few more.

The neat thing is I actually need to do a custom encoder for my work so doing it for the robot will be a useful exercice.

emardee

  • Full Member
  • ***
  • Posts: 135
Re: Robot Kit
« Reply #13 on: February 25, 2016, 03:16:30 am »
thanks for confirming that. Looks good. Just need to get some suitable part numbers options for a sensor upgrade, and then some code samples for everyone...

Blitzfx

  • Newbie
  • *
  • Posts: 31
Re: Robot Kit
« Reply #14 on: February 25, 2016, 11:07:59 pm »
That's unfortunate. We have boxes of optos of various sizes we throw out from old projects that no-one needs anymore.
At this rate, why not just go all out and use stepper motors.