Asked
Resolved Resolved by Dunning-Kruger!

Connecting EZ-B Or Iotiny To Arduino

Are there any Tutorials on how to connect EZ-B or IoTiny to Arduino uno or Mega ?

I'm not finding any results that make sense to me on Google or on Synthiam forum.

Thanks Steve


Related Hardware EZ-B v4

ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

#1   — Edited

Are you asking how to connect them physically?  What do you want to do? I mean what data do you want to send and or receive? More info is needed.... FYI the ioTiny does not have a uart port (it can only send data "soft" serially) so communication with the arduino will be one way only...

#2   — Edited

Hi Dunning-Kruger

I'm only new to Arduino and EZ-Robot, so my understanding on how they work on their own let alone together is very limited ATM :=)

I did see the Iotiny has a sig and EZ-B has RX/TX, I thought that in itself was going to be a push to EZ-B.

Project is an R2D2 type robot, that has a head that can turn right around.

Controls via PS4 Gamepad, Android app, voice and face recog.

Head will be running IoTiny or EZ-B with LEDs, Servos, Sensors, Speaker and Camera

Body running an Arduino Uno or Mega running LEDs, Servos, and Motors somehow.

My thinking is wifi from PC running the ARC/ARC software to IoTiny or EZ-B then that talking back and forth to the Uno or Mega, or am I supposed to keep the 2 separate and have 2 wifi connections, 1 to EZ-B and 1 to Arduino, is that the reason for the 4 connections in ARC?

Thanks Steve

PRO
Synthiam
#3   — Edited

When we talked before, you were going to have a laptop in the robot. Has that detail changed? Or maybe i'm confusing you with another user. If i am, will your robot have a laptop inside of it?

#4  

Hi DJ

Mine was always going to be a mini pc outside (wireless), but there is a guy in droids forum that tried putting it inside the bot. It didnt work, he said it killed the batteries to quick.

He went with some other system Ive never heard of.

My unit is too small for even the nuc inside.

My droid will never leave the livingroom.

PRO
Synthiam
#5  

Okay - so you'll control it over WiFi.

Then my recommendation is to have either an EZB or IoTiny inside the droid and connect to it remotely via wifi from a PC. The arduino can be programmed to move the motors and monitor the limit switches.

Your question is, how to have the IoTiny or EZ-B send instructions to the Arduino.

The answer is via hardware UART on the EZ-B v4, or digital pin software serial on the IoTiny. Never use software UART on the EZ-B v4 unless you really really really must, because it's not reliable on the EZ-B v4 for some reason.

Anyway, your arduino will simply have a piece of code that listens for commands being sent. First, you have to make a list of what those commands will be, and what byte is being sent to trigger the command. This is how you create a protocol :)

0x01 means move thing #1 up 0x02 means move thing #1 down 0x03 means move thing #2 up .... etc

I forget my arduino code but on the Arduino will be something like...



while (Serial.Available) {

  byte cmd = Serial.ReadByte();

  if (cmd == 0x01) {

    // Move thing #1 up
   
  } else if (cmd == 0x02) {

    // Move thing #1 down

  } else if (cmd == 0x03) {

     // Move thing #2 up
  } 
}

And to send the data to the arduino from the ezb which triggers the commands ...

on Iotiny...


// instruct arduino to move thing #1 up
UART.sendSerial(d0, 9600, 0x01); 

on EZB v4 with hardware uart #0...

first we must initialize the UART somewhere. Do this in the connection control, so it initializes when the ezb connects


// Init uart #0 for 9600 to sent to arduino
UART.initHardwareUart(0, 9600);

Now, anywhere in code in other controls, you can send the instructions..


// Move thing #1 up
UART.hardwareUartWrite(0, 0x01);

PRO
Synthiam
#6  

Some other links for assistance...

  1. https://synthiam.com/Community/Questions/Serial-Communication-With-Arduino-3471

2) https://synthiam.com/Community/Questions/Uart-Connecting-To-An-Arduino-3016

#7  

Have you considered a Latte Panda? Can't get much smaller than that.... Anyway the newer models are pretty pricey but the original ones have no problem (at least the older ARC builds anyway) running arc..... FYI.... I have a 4g gen 1 model but have not tried it with ARC yet....

PRO
Synthiam
#8   — Edited

Oh yes - the lattepanda is pretty amazing. I support that decision!!

I can say ARC would run faster than ARC on a lattepanada, because of the efficiency updates

#9   — Edited

The latte panda also has an arduino built in (Leonardo if I am not mistaken}... and they are pretty frugal on power. If I remember correctly I think I measured somewhere between 1 and 1.2 amps?.... :)

#10   — Edited

Hi Dunning-Kruger

That's the one he went with ;-) Maybe I should look at that, looks like they are a couple of hundred for a basic one, and has an arduino built it, very tempting. If I went this way I think I would like the bot to have a base station it automatically returns to for charging, like a robovac. (You've opened up a whole new can of worms now) lol

Hi Dj Guess plans are changing ;-) I still connect wirelessly to EZ-B / Iotiny even with the Latte Panda in the bot, don't I, or is there a cable available?

Future plans are for my next bot to be your Wall-e (cute lil fella) or a stationary bot that was going to have the Nuc in the base, controlling multiple bots. but I think this Latte Panda idea is a goer.

PRO
Synthiam
#11  

If you have a computer in the robot, you can probably get away with using the onboard Arduino as an EZ-B and not need an EZ-B v4 or IoTiny at all.

But, if you decide to also add an EZ-B v4 to the robot with the onboard computer, don't use an IoTiny. This is because the EZ-B v4 can be configured to hook to the PC via USB TTL. So that means you won't need wifi at all.

The charging is quite easy actually. The only trouble is the physical design. It's best to use an iRobot Roomba as the base, and that way the whole process is done for you. The only downside to the iRobot is the navigation to the base station is random. Meaning, the robot drives around until it detects the base station beacon. That's pretty normal for most systems like that though, without a complex navigation system.

The topic of navigation is something everyone's been trying to solve for long time. The lidar approach works to "sort of" get you in the area. But the trouble with lidar is the lack of standardization. At ez-robot, we had created a lidar with a slam control that was going to be sold - but the price to manufacturer was too high. I'm always looking for modular solutions, not single-use specific solutions. I like the idea of something working in any environment, and there isn't a good solution for that. Well, the IPS would work, but the market was way too small for us to move ahead with it. The IPS is now open source, so anyone can make one. The trouble is the cost to make anything like that requires mass quantities (in the thousands) and there aren't enough customers to support that quantity.

I got off topic a bit... but the answer to your question about self docking is either a Roomba or Glyph as visual beacon. The glyph works really well for docking, that's how our omnilab telepresense do it. You can see the details in the getting started section under the product list. They simply have a camera that looks for the glyph and aligns the robot to it.

It's quite easy to do using the camera control's variable speed turning option. You simply select the checkbox in the config of the camera control and the robot will use variable speed to keep the object centered. It's very specific.

#12  

I just found https://synthiam.com/GettingStarted/Build-Robots/LattePanda-18256 & https://synthiam.com/Community/Tutorials/LattePanda-Beginners-Guide-18552

Yer I was wondering if using the glyth system would be accurate enough to work for homing to a charge station.

I like your face/voice regoc and the glyph tutorials you've done with EZ-B, will face/voice and glyth using the panda and arduino by itself work as well as they do with the EZ-B?

PRO
Synthiam
#13  

The processing for all that is done on the pc (aka latte panda). So ya, it’s all the same :)

the EZ-B v4 or Arduino EZ-B do the same thing. All you miss is the camera and audio connector that the Arduino doesn’t have. Which is ok because you have an onboard pc and use usb camera and it’s sound card

#14  

Of course lol

So ARC will find the usb camera connected to the LattePanda for face and glyth recog?

#15  

@stevethurston.... Yes a usb camera that is recognized by Windows will do the same thing as the ez robot camera....

#16  

@DJ Sures

Loved ya vids on LattePanda, ya just like a lil kid when ya play with ya toys xD, then again, isnt that partly why we all have our hobbies.

Its a done deal, got one on the way, should have it to play with by next weekend :D

I think they will be my go to for the brain from here on, guess my Ez and arduino brains are getting added to the, "will use one day toy box"

Thanks Dunning-Kruger and DJ for your help and sugestions :-)))

#17  

I'm liking the LattePanda, thanks for the recommendation Steve