Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by Herr Ball!

Can The Iotiny Be Made Into An Openai Chatbot Connected To ARC?

Can the IoTiny be made into an OpenAI Chatbot connected to ARC? My thought is yes based on everything I have seen on this site so far but I still have a few questions I hope can be answered.

Goal is the following: Make a Robot head using the IoTiny connected to ARC over wifi with a EZ Robot camera attached to it and a speaker for audio out. Two 3V LED’s connected to the ADC ports to make the eyes light up and some type of LED/RGB setup for the mouth to to come on this.
User-inserted image



I want to use the following skills
1. Openai Chatbot robot skill with audio out going to the speaker on the IoTiny.
2. Bing Speech recognition robot skills taking audio commands from a headset to the ARC PC.
3. Camera Cognitive skills

Here are a few of the questions I have
1. Does the IoTiny speaker out need to have and audio Amp added to it like stated by Jeremie "There is no DAC breakout on the IoTiny but you can solder to the left side of C11 if you'd like to run the audio to your own amplified circuit. Or can your just add a TDA2030A Audio Amplifier Module to the existing speaker pins?

2. For the mouth I want to be able to do something like the following on the IoTiny also.  

Check out the following video:
https://www.youtube.com/shorts/M9N4cfYbx5A

This is a project Derek Levesque and what he used was MAX7219 Dot Matrix Module 32x8 4 in 1 LED Display Modules for Arduino Raspberry Pi Microcontroller with 5Pin Wires and then created some nodejs/raspberry pi (ubuntu) code like the following. It looks like I would need to EZ-Robot I2c 8x8 RGB module the question I have is there a way of programming it to do the same type of thing based on the OpenAI’s Response?

Code:

here is the basic nodejs for his leds (part 1) ...
var syllableCount = function (word) {
word = word.toLowerCase();
var t_some = 0;
if (word.length > 3) {
if (word.substring(0, 4) == "some") {
word = word.replace("some", "");
t_some++;
}
}
word = word.replace(/(?:[^laeiouy]|ed|[^laeiouy]e)$/, '');
word = word.replace(/^y/, '');
//return word.match(/[aeiouy]{1,2}/g).length;
var syl = word.match(/[aeiouy]{1,2}/g);
// console.log(syl);
if (syl) {
//console.log(syl);
return syl.length + t_some;
}
}

here is the basic nodejs for his leds (part 2) ...
function voiceBox(word, matrix, cb) {
//calculate sylabuls
var ccb = syllableCount(word);
if (!ccb) {
ccb = 1
}
//set speed word is said
var cc = ccb * 150;
//initialize led on/off
var r = 0;
var s = 0;
var m = 0;
var l = 0;
//set which leds are on based on word length
if (word.length > 8 {
r = 1;
s = 1;
m = 1;
l = 1;
} else if (word.length >= 6 && word.length <= 8 {
r = 1;
s = 1;
m = 1;
l = 0;
} else if (word.length > 4 && word.length < 6) {
r = 1;
s = 1;
m = 0;
l = 0;
} else {
r = 1;
s = 0;
m = 0;
l = 0;
}
// turn on appropriate leds
matrix.led(0, 5, 0, r);
matrix.led(1, 5, 7, r);
matrix.led(0, 6, 0, r);
matrix.led(1, 6, 7, r);
matrix.led(0, 7, 0, r);
matrix.led(1, 7, 7, r);
// short
matrix.led(0, 5, 1, s);
matrix.led(1, 5, 6, s);
matrix.led(0, 5, 2, s);
matrix.led(1, 5, 5, s);
matrix.led(0, 6, 1, s);
matrix.led(1, 6, 6, s);
matrix.led(0, 6, 2, s);
matrix.led(1, 6, 5, s);
matrix.led(0, 7, 1, s);
matrix.led(1, 7, 6, s);
matrix.led(0, 7, 2, s);
matrix.led(1, 7, 5, s);
// medium
matrix.led(0, 5, 3, m);
matrix.led(1, 5, 4, m);
matrix.led(0, 5, 4, m);
matrix.led(1, 5, 3, m);
matrix.led(0, 6, 3, m);
matrix.led(1, 6, 4, m);
matrix.led(0, 6, 4, m);
matrix.led(1, 6, 3, m);
matrix.led(0, 7, 3, m);
matrix.led(1, 7, 4, m);
matrix.led(0, 7, 4, m);
matrix.led(1, 7, 3, m);
//long
matrix.led(0, 5, 5, l);
matrix.led(1, 5, 2, l);
matrix.led(0, 5, 6, l);
matrix.led(1, 5, 1, l);
matrix.led(0, 5, 7, l);
matrix.led(1, 5, 0, l);
matrix.led(0, 6, 5, l);
matrix.led(1, 6, 2, l);
matrix.led(0, 6, 6, l);
matrix.led(1, 6, 1, l);
matrix.led(0, 6, 7, l);
matrix.led(1, 6, 0, l);
matrix.led(0, 7, 5, l);
matrix.led(1, 7, 2, l);
matrix.led(0, 7, 6, l);
matrix.led(1, 7, 1, l);
matrix.led(0, 7, 7, l);
matrix.led(1, 7, 0, l);
// matrix.clear();
// matrix.off();
//callback at specified speed (turn off leds in initial function)
setTimeout(function () {
cb()
}, cc);
};
So DJ/Jeremie or anyone else, I would love to hear your comments


Related Hardware EZ-B IoTiny

ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
#19  
Hey Dave,
 I wouldn't mind looking into getting one of those boards too, sounds very interesting. I tried the links above but all I get is "unsecure web site".
#20  
@Dave I also am having the same issue with the website.

@Perry_S. In this project I have 40+ servos to manage and currently one Seeed Studio XIAO&6050MPU I need to connect to a serial port on the Mega to send XYZ data.  The original plan was not to use ARC at all and just code everything and build a Bluetooth controller to operate the robot.  

The real goal of this project is to get the robot walking and stable.  But looking forward If that can be done then I would also like it to do more and ARC would make that easier in the long run.  So currently the plan is to put the IoTiny in the head, with camera, a speaker and Seeed Studio XIAO & Mic to make the mouth work.  This will all be connected to ARC to support the OpenAI, Speech, and Camera skills.

The Mega  is going to be the main logic for movement control.  The plan is to use inverse kinematics formulas to develop the walking gait need. All of the other servos will be connect to a 32 port RTRobot board and the Mega will send the commands to it also by Serial port.  So I need the three serial ports on the Mega.  Because this guy is only like 4ft tall he does not have a lot of room for electronics and batteries.   We designing an added backpack to try and put stuff in there.  Anyway I hope that helps to give you more of an idea.   

Note I always love to here other ways of doing stuff because this is still very new to me only being a year into this hobby.
PRO
Synthiam
#21  
I think the mega is suitable but I’d probably consider only one wifi point and a wired network across all other arduinos. Implemented like the stepper motor robot skill. 

You don’t need them all to be Megas. Just connected together with one long serial network. 

as for the mega controlling the legs, write a bit of code that uses an imu to maintain an inverted pendulum (there’s example code in the balance robot on here). Once you do that, create a few functions in the mega that have to robot walk. Finally, have those functions triggered by arc

you don’t want to offload the balancing act to ARC or any external processing (like a computer). You need the balancing to be a tight loop on the microcontroller - without exception. The time between measuring the sensor and adjusting the servos needs to be as low as possible. And I mean low. Like a millisecond or 2 -  not over wifi or serial. It needs to be on the microcontroller.
#22   — Edited

Quote:

"unsecure web site".
@Dave I also am having the same issue with the website.
Ugh, we sometimes have this happen with people trying to access the clubs website. I don't know why and I guess I need to look deeper into it. However, I assure you that it is safe to proceed. I've maintain this site for many years and know it to be safe and secure. So if you still want to view the site then you'd have to look at the bottom of that waning screen, click on the "proceed anyway" link (or something like that) and then OK the trip on the next screen. Sorry. 

I really think this voice interface board is a wonderful tool to use when you want to sync a flash from any kind of light source to an audio source. It's inexpensive, small, reliable, easy to use and well made.

Here's the response I got from Steve last night when I asked him about using this board with LED's and not being triggered by a transformer linked to a neon:

Quote:

Yes my board is simply like a switch that is triggered by an audio input and will happily run LEDs. All it really does is simply supply what ever voltage you put into it at the output terminals in sync with the audio. You can defiantly run the LEDs with 12 volts with the appropriately sized resistors, actually the board only supplies to the load whatever voltage you put into it. I think it can work as low as 9 volts but I've never tested that. I have attached the power connection diagram and if you look at figure 2 it shows how to connect an LED strip to the board. This is actually the method I use to test the boards when I make them. I hope this answers you question, please let me know if I can help further.
So, if you are still having trouble getting into his vendor page on the B9 Robot Builders website I'll post the most pertinent info and links below:

Contact: 
Steve Neal
Email for questions or to order: Steve.B9@bigpond.com

Ordering:
The Neon-Voice Interface Board V1 can be ordered as a fully assembled completed board ready to plug in and enjoy. It comes with detailed easy to follow instructions complete with clear diagrams to make connecting to your robot a breeze.
For the more adventitious, the board can be supplied as a kit you build yourself. It comes complete with the Neon Voice Interface V1 blank board, all the components required, easy to follow assembly and connection instructions and of course, diagrams. Each component will be labeled with a designator number that corresponds to the footprint labels on the board.

Price:
Fully Assembled: $35
Assemble Your Self Kit: $21





Here is the power circuit. Remember to adjust the output voltage with the proper value resistor if your light source is rated for less then the input voltage:

User-inserted image

There are many ways to connect a sound system. Steve supplies many diagrams to assist. Here is one that may make the most sense for robots using one sound source:
User-inserted image
#23  
DJ,  I was going to try to connect the Mega to the Iotiny's Wifi AP as a client if I can and have the Seeed's hardwired to the Mega.  I was wanting to build out the EZB mega firmware to basically do what you are talking about.  But first I need to get the Wifi stuff worked out in the firmware.  I have to tell you this Xbee ESP8266 and Mega setup has been a challenge understanding where and how to program it it looks like some code needs to go in the xbee and some in the mega but I can't seen to figure it out yet but I will get there I hope.  LOL
#24  
@Dave,  that is cool but I need to be at less voltage the method Herr Ball provided basically does the same thing so I am going to go down that path because it looks kind of straight forward.   I ordered the supplies to give it a try anyway...  Time will tell if it works as planned.
#25  
That's cool.;) . There has been other people asking about this too so maybe this info will help someone. I have no skin in this game with this sound interface. Just want to help. 

What voltage will you be running at?
#26  
@Dave for that part of things 5-7.4v is the plan but like everything else that could change.xD
PRO
Synthiam
#27  
I really dislike xbee. I avoid it at all costs so can’t help you much there.
#28  
DJ. Are you saying it would be better to just order a mega with the Wi-Fi on board?
PRO
Synthiam
#29  
It would probably be easier to have onboard wifi. And less hardware required
#30  
I just want to thank everyone for their input it has been a big help once together I will post a video.
PRO
Canada
#31   — Edited
I wish I had been on here earlier! I took a bit of a longer break this holiday season to look after my kids and nephew who had an extra week of vacation.

I wanted to mention that I've had great results with porting the IoT speaker to make it louder. I did a bunch of experimenting and found a decent method of 3D printing a small chamber that increases the sound from the speaker by at least 1.5 times. It also deepens the sound, bringing out more of the lower-frequency bass tones. I was pumped by how full the music sounded with porting. I will officially measure it when my decibel meter arrives next week to see how much lower it goes.

The TS4902 amplifier chip on the IoTiny/EZ-Bv4 will put out 0.3W so that's your maximum power output but if you increase the speaker size you will get a louder sound. If you remember those old record phonograph players with the larger cones on them, that's how they amplified sound without electronics.

User-inserted image


You could also use a small electronic board to amplify sound (taking your input from soldering on C11) and you can amplify from the speaker pins (it won't be as clean) but I swear the IoTiny speaker plus a bit of porting is plenty loud! 

You'll see this method used in an upcoming product;)

Here's a cross-section of what I designed (dimensions in mm):

User-inserted image
#32  

Quote:

You could also use a small electronic board to amplify sound (taking your input from soldering on C11) and you can amplify from the speaker pins (it won't be as clean) but I swear the IoTiny speaker plus a bit of porting is plenty loud!
You'll see this method used in an upcoming product;)
:p Wow! Exciting stuff! 

Quote:

You could also use a small electronic board to amplify sound (taking your input from soldering on C11) and you can amplify from the speaker pins
So, you can solder an off board amp directly to C11 and use the IoTiny's speaker pins? Where would the amp's output attach to? Are you saying "amplify from the speaker pins" of the attached amp?
#33  
@Jeremie
I agree, there is a little porting tick to make the stock system perform surprisingly well. I didn't try anything like you show above, just a simple box.
PRO
Canada
#34   — Edited

Quote:

So, you can solder an off board amp directly to C11 and use the IoTiny's speaker pins? Where would the amp's output attach to? Are you saying "amplify from the speaker pins" of the attached amp?
@Dave, sorry I probably wasn't very clear. I meant you could do either/or.

ex1: You could solder a small amplifier board's input to C11 and GND and the amp output to a larger speaker (or to the IoTiny speaker up to 0.5W). The IoTiny SPKR pins would be empty in this case.

ex2: You could solder a small amplifier board's input to the IoTiny SPKR+ and GND and the amp output to a larger speaker (or to the IoTiny speaker up to 0.5W). This method would further boost the audio from the onboard 0.3W amplifier, which would be louder but more static would be present. 

ex3: Leave the IoTiny speaker as-is on the SPKR pins and amplify the audio the old-fashioned way with porting:D

Quote:

@Jeremie
I agree, there is a little porting tick to make the stock system perform surprisingly well. I didn't try anything like you show above, just a simple box.
@Perry right on, good idea! I'm curious if you have any pics of it. I'm interested!
#35   — Edited
@Jeremie
Here is what I did in my inmoov. Just a simple box for the 2 ohm speaker. Made a huge difference.

User-inserted image



User-inserted image
#36   — Edited
Thanks @Jeremie for the explanation. I tried both your example 1 & 2 on a EZB and did not like the results of #2. Like you said, poor sound and static. I ended up #2 and soldered in a pig tail to the proper points on the EZB board and plugged in a 20w amp to it. Gave booming and clear sound. 

Your porting box is a wonderful idea. I can validate that this really works! I did do something like this on a Bradford Exchange Nightmare Before Christmas Cuckoo Clock that I redid the sound system on. When I got it I was very disappointed with both the sound quality and the music it played. However unlike you, I did upgrade to a new small speaker and a new amp. After trying a couple different speakers I ended up using a full range laptop speaker. By doing this it really amplified the sound and had a lot better quality. Here's the link to Mouser and the final speaker I used:
Speakers & Transducers 3.2 cm (1.3") fullrange speaker, 150 20000 Hz, 220 Hz, 24-5W

I guess my point is that I used the small space inside the clock to enhance the sound like you are doing in your porting box that you've designed. However, even with the new amp and nicer speaker that I used my sound was underwhelming until I placed the speaker inside the clock.

Here are a couple pictures and videos if the process and result if anyone is interested. 

User-inserted image



Here is the build video:


Here is the result Video:
#37  
@smiller29, Sorry. I guess I kinda hijacked your thread with my project above. I did however want to point to the speaker I used and validate how sound can be enhanced in many ways.
#38  
@Dave,  All good man BTW I got this clock for my wife for Christmas so who knows I may use your project!