Candice the personal assistant robot

Post Reply
L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Candice the personal assistant robot

Post by L67GS »

Just ordered the case and plastic panels for my new project. I'm not quite ready to start a thread but I'm excited so I have to post something, lol.
In another thread I made reference to it, but it's a personal assistant robot in the style of Dr. Theopolis from Buck Rogers.
Her "AI" is all C++, and she has a handful of real world functions but I just started working on speech recognition with pocketsphinx so that hurdle needs overcome before I can call her "ready".
I was particular with coding so all of her real world functions are in seperate header files which keeps her main lean and clean and makes it easier to write new functions for her.
Candice will run on a C0, providing pocketsphinx isn't too much for it, she's got a mammoth 26800 mah battery with solar charging, Odroid sound card, and she'll be doing the traditional "blinking lights while speaking" thing.
Festival is doing the speech, but I'm having trouble with the Nitech voices so she has a mediocre voice atm.
I've learned more C++ in the last month writing Candice than I learned in almost a year online schooling, even wrote my first multithreading code a couple days ago.
These users thanked the author L67GS for the post:
odroid (Wed Jun 24, 2020 9:53 am)

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

Sounds like a great project! Make sure to document your progreas for the magazine.

Also test speech recognition speed. I was playing with mycroft a couple of years ago on a c2. It was ok, but a bit slow in response time and a bit of a cpu hog. https://youtu.be/mIM81al60TI

These users thanked the author mad_ady for the post:
L67GS (Fri Jun 26, 2020 11:17 pm)

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Haha, I found that video a month or so ago and didn't realize it was yours. I looked at Mycroft for a while but going to a pre-made bot defeated the purpose for me because the whole concept of this is to teach myself how to code.
From what I read on the Sphinx documentation as long as I keep her dictionary on the small side she should be efficient enough to run on a single board computer so hopefully this one has the nuts for it.

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

Indeed - having a goal while learning how to code can keep you motivated.
These users thanked the author mad_ady for the post:
L67GS (Fri Jun 26, 2020 11:17 pm)

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Is C0 traditionally big balls to get wifi from command line or is mine special?

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

No. You can install NetworkManager and use nmtui to setup a new wifi connection.
If you notice latency or dropped pings, search /etc/NetworkManager for a config file where you can turn off powersave mode.
These users thanked the author mad_ady for the post:
L67GS (Fri Jun 26, 2020 11:17 pm)

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Thanks, I'll try that, I've been trying wpa_supplicant and for some reason everything is fine but it just won't connect to my wifi. I'm using an Odroid dongle too.
I was hoping to start fabrication and assembly this weekend. The 1/8" plastic sheets and thin acrylic sheets are perfect! They even diffuse light fairly well.
The tins for her "body" arrived damaged so I had to put into Amazon for replacement.
I suppose I can still start fabrication on the plastic stuff and do mock up inside one of these tins.
The battery sits at about a 45* angle, about what I was looking for so it's solar panels are angled up some.
They'll probably be covered somewhat with the thin acrylic but hopefully some light gets to them. Solar charging wasn't sopposed to happen but it was a feature on the best battery I could find for my application.
Still have USB ports and standoffs on order so I couldn't really assemble anyway.
Realistically she could go together now, everything software will happen through tty.
I'm mounting the sound board and audio amp seperate and connecting them to the C0 with umbilical cords so as not to obstruct the view of the C0 with it's shiny heatsink and all.
Attachments
20200626_093255.jpg
20200626_093255.jpg (309.07 KiB) Viewed 749 times
20200626_092915.jpg
20200626_092915.jpg (371.25 KiB) Viewed 749 times

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

I'm not wasting any more time trying to get the C0 on wifi. Tonight I ordered a C1+, I'll pop the eMMC into it and do all the setup, then put it back in the C0. I do want to get the C0 online but I don't need it for now so I'll come back to it when it becomes a necessity.

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Today I took a big C++ step for me, learned how to use std::filesystem to point Candice at a folder where her responses are so everything isn't piled into one directory.
I still have to learn how to drop back a directory for my vision of a bot with multiple moods to come to life though.
I'm writing multiple response folders, so certain words, phrases, or real world inputs can change her attitude.

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Made some more progress this weekend, the 2" speakers I ordered, while very nice are also entirely too large after some kind of enclosures so they don't sound raspy and crappy so I got some 1.5" speakers on order but my plan of fabricating and assembly this weekend was thwarted.
So I turned my attention to software again. Dropping back to the parent response directory is now done with absolute path, but I named the data directories with the same number of characters for later.
I figure I can have her get the absolute path of the current directory and iterate it into a string and knock a predetermined number of characters off the end so that string becomes the path to the parent directory, but that's not necessary for now as she'll just be running on the C0 and C1+ with the same eMMC.
I also rewrote and optimized a second thread so she makes random sounds at random times like we do, cough, sneeze, sigh, ect.....
The second thread is simple enough that I was able to lay the groundwork for polling GPIOs.
She's getting tilt switches and vibration sensors so she can be a bit more interactive and mistreatment will of course affect her mood ( which folder her responses come from) as well.
And a silly question, is it possible to open a remote console like we do with serial over Bluetooth or wifi?
I think it would be really cool to be able to have control over her from the computer in the lab without any wires, and even cooler for her to be able to run system commands on the lab computer without any wires.

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

I think it would be really cool to be able to have control over her from the computer in the lab without any wires, and even cooler for her to be able to run system commands on the lab computer without any wires.
That's why ssh with key authentication was invented
These users thanked the author mad_ady for the post:
L67GS (Mon Jul 06, 2020 3:54 am)

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Ady, can I do that directly between two computers without a network hub?
Edit: it looks like wpa_supplicant can do so. Cool

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

Yes, as long as you use IP addresses from the same subnet.

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

I'm starting to write code for inputs and in this chart it shows pins labeled as p/u which I assume is internal pull up and p/d which I assume is internal pulldown.
What's confusing is that it looks like pins 7 & 12 are internal pull up but they have a 0 in the V column which I was assuming was boolean.
Could somebody explain to me what this means please?

https://wiki.odroid.com/odroid-c1/hardw ... connectors

User avatar
odroid
Site Admin
Posts: 34850
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 932 times
Been thanked: 759 times
Contact:

Re: Candice the personal assistant robot

Post by odroid »

I think the table is wrong or outdated.

This "gpio readall" output seems to be much more accurate.
Image

Refer this thread. viewtopic.php?t=30899#p297571
These users thanked the author odroid for the post:
L67GS (Tue Jul 07, 2020 9:21 pm)

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

That's a great help thank you! And the work that's happening in that thread, wow! That's something I need to follow.

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Tested the audio amp and voided the warranty on a perfectly good HIFI shield+, thinned it down and got the amp mounted on it. Also replaced the I2C port with a topside 90* male header. I want the C0 to be visible so the sound needs to be mounted elsewhere..
Also got lucky enough to find the right size thin wall tubing and made speaker enclosures.
The breakout board for the 40 pin GPIO is together but I hate the header and ribbon cable so I got some new headers on order.
Ameridroid has a sleek ribbon cable that looks like it has TE Connectivity plugs so I'll put together yet another order from them. The TE ones are generally pretty easy to disassemble and reassemble so I can shorten it and flip one side and be much happier about it than this rainbow color one I currently have with plugs that are 3/4" tall and uglier than a $10 prostitute.
I also started looking at the charging board I'm using, it's not bad but it's not going to give me useable inputs for testing voltage level from the status LEDs like I hoped because they are in an odd series / parallel PWM arrangement.
I'd considered using the built in charger on the C0 but I'm uncomfortable giving it 26,800mah of battery to charge when it was designed with 3000mah in mind.
Also, I'm leaving space to swap the C0 for a C1+ in case she outgrows it, but I doubt that could happen.
Anyway I'll be voltage dividing into adc to get a reading so Candice will be able to tell me exactly the voltage, I'm open to suggestion as far as the minimum voltage she should see before shutting herself down.
I'm including a picture of the sound portion of the project as that was the most time consuming this weekend due to the very small pin spacing on the PAM8403 amp, I suppose I could have just hit mouser and gotten a header and plug but I want to keep everything at 2.54mm.
Wiggle those wires a few times and they break, resulting in a repair that wiggles more wires so it was frustrating to assemble for something as silly as a header plug.
The amp is incredible for it's size, or even something twice it's size for that matter, very clean and it has a poweroff pin that is compatible with GPIO, pulling it low resulted in 0.00ma of draw on my power supply!
The poweroff pin is so sensitive any kind of low triggers it, like just touching with a finger, now if it only had 2.54mm hole spacing it would be perfect.
I'm going to try to get some time this week to keep fabricating so maybe I'll have her hardware assembled sooner than later.
20200712_015434.jpg
20200712_015434.jpg (389.84 KiB) Viewed 449 times
These users thanked the author L67GS for the post:
Ameridroid (Tue Jul 14, 2020 3:29 am)

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Getting cozy with ssh, played with it both directions, then just for kicks did an ssh connection into the C1, and from that connection to the C1 back to my computer, lol.
Most ridiculous use of a terminal ever.

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

L67GS wrote:Getting cozy with ssh, played with it both directions, then just for kicks did an ssh connection into the C1, and from that connection to the C1 back to my computer, lol.
Most ridiculous use of a terminal ever.
Oh, my sweet summer child... You're being drawn into the black hole that ssh is...
Try out noninteractive execution: ssh host hostname, ssh keys, ssh port forwarding, ssh_config tweaks, etc...
These users thanked the author mad_ady for the post:
L67GS (Wed Jul 15, 2020 12:57 am)

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

mad_ady wrote:
Tue Jul 14, 2020 3:00 pm
Oh, my sweet summer child...
I'm in my 40's, lol.but this is all new to me so it's cool. I'll get more in depth with ssh though and looking forward to learning more about it's functions.

Tonight was good, I got out of work, grabbed a couple burgers and came right back to my shop. I worked on one of our cars until about 9 p.m. I have to have it finished and out of here by Friday because Saturday I'm dismantling a strip-n-scrap and bringing it's parts to where that car now resides.
Then I got some time in the lab with Candice! About half of the Candice structure is complete. I made a super slick battery box and then miraculously I had the correct tap for the thread size of the 3mm standoffs I bought so I started Drilling and tapping holes and fabricating more parts.
I still have a couple more boards to make, a breakout board for power and a ground bus with a small circuit more than likely based on a 3055 transistor with a small RC timer that Candice will enable to keep her power running, that way in the event she has to shut herself down she will kill the power to the entire system rather than having the battery slowly deplete below the threshold it can recover from, and the RC timer will hold the power long enough to make sure the computer makes a clean shutdown.
The last board will be a real simple Bank of transistors, 3904s, or maybe 2222s so that the GPIOs don't have to power the LEDs since I'm planning on running 2 off of each pin.
And I'd like to get a fuse or two in there somewhere so I never have to worry about a catastrophic failure if she were to become damaged or wet.
Also redoing part of the GPIO breakout board when my last order from Ameridroid arrives with a decent header and ribbon cable.
The space in between the speaker pods I'm thinking about making a little rack for the charging board and the new boards I'm making to slide right into.
I could bring the power wires from the battery out right behind that spot but then if I need to replace the battery I have to mess around and get them fished out of there in order to plug them back in, and I really don't want the weight of the battery sitting on its power wires.
The lower enclosure that is sort of half moon shape that now holds the soundboard is where I'm planning on installing a USB plug so that I can easily transfer files, a micro USB to charge the battery, and power switch.
Doing some fabrication was good for me, it's nice to see some physical progress after so much time just writing code. Tomorrow night if everything goes well I should have the light boxes for behind her eyes fabricated and installed and maybe have some of the internal jumpers fabricated and installed but I'd really like to r&d and build the new boards before I keep fabricating.
20200715_035122.jpg
20200715_035122.jpg (498.33 KiB) Viewed 403 times
20200715_035100.jpg
20200715_035100.jpg (433.66 KiB) Viewed 403 times
20200715_035133.jpg
20200715_035133.jpg (358.99 KiB) Viewed 403 times
These users thanked the author L67GS for the post (total 3):
odroid (Wed Jul 15, 2020 5:50 pm) • Ameridroid (Thu Jul 16, 2020 1:12 am) • joy (Mon Jul 27, 2020 11:10 am)

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Had an interesting thought the other night and brought it to fruition. I think I'm going to be able to get everything I need to make on one board. Rather than using transistors to switch the LEDs and running yet another thread in C++ to drive them I programmed a PIC16F628A so the PIC controls all of the lighting, the computer just tells it that it should blink the eyes because it's speaking and it does a random pattern, it also does random stuff with two other sets of LEDs very much like the computers that were in the old sci-fi show.
I could have used a smaller PIC12 for this but the microcontroller also has a 30 second timer and gets an input from the computer to hold the gate on the mosfet, so I'll have to start it with a push button but when it shuts off the mosfet will kill the power to everything including the microcontroller so there won't be anything draining my batteries when it's in its off State.
I ordered in some tiny fuse holders and I think this is going to be small enough that I should be able to get power and ground rails along with the fuse on the same little board as the microcontroller and mosfet.
Attachments
20200718_135317.jpg
20200718_135317.jpg (347.44 KiB) Viewed 360 times

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Try as I may, that turned out to be a buttload of stuff to fit on one such specifically sized board, the MOSFET and fuse holder are going to have to live in the bottom with the sound portion.
I made these the other night, tonight one of the cars kept me busy.
Small board: power in from battery, power out to distribution, and a single wee header pin to the gate on the MOSFET. Positive is fused, the IRFZ44N is switching the ground.
"Big" board: PIC in a socket (I'm not a fan of ICSP on one-off projects and space was limited anyway so the socket affords me the luxury of swapping the PIC if I do a revision), 6 pin header to blinky lights (sinking control), 3 pin header (2 GPIOs from the C0, and the jumper to the MOSFET gate), plug to take power from the small board, and 2 rows of power distribution headers for the C0, lights, death ray, ect...
Took me more time to lay out the boards than make them.
Attachments
20200723_184636.jpg
20200723_184636.jpg (293.79 KiB) Viewed 285 times

mad_ady
Posts: 8316
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 573 times
Been thanked: 434 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

death ray
Yeah, about that... when does it get installed? Image

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

mad_ady wrote:
Fri Jul 24, 2020 11:48 pm
death ray
Yeah, about that... when does it get installed? Image
Lol

Candice is getting closer, light boxes for her eyes are fabricated, made a little rack to hold the charging board and the microcontroller board. Also did a little precision sanding so the frame fits in the cookie tin ....um... I mean, CASE.
Still have a bunch of jumpers for I2C, light, power, ect.. to make and also modify the io breakout when my Ameridroid order arrives. And still need to make the mask that will cover utility areas and have her eye cutouts and grills for airflow/speakers. The C0 will be completely visible so she still has a little more robot appearance and a little less white plastic.
I'm hoping to get her mocked up and running in the next week so I can take on pocketsphinx, it seems I can make it drop output into a file so if she can start/stop pocketsphinx I'll have her pull incoming phrases from the file rather than incorporating it into C++.
I contacted Acapela about the developer licenses and they want 1000 euro / yr to give her a better voice.... ah, no.
In this picture her frame is mounted securely with 10 tiny neodendium magnets, if she moves I have a plan to pin her frame in.
I've also opted not to cut USB ports in, that would require opening up the case for charging so the new plan is a door on her back.
20200729_120359.jpg
20200729_120359.jpg (414.11 KiB) Viewed 174 times
These users thanked the author L67GS for the post (total 2):
Ameridroid (Fri Jul 31, 2020 8:49 am) • joy (Tue Aug 04, 2020 1:32 pm)

L67GS
Posts: 94
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: english
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 34 times
Been thanked: 11 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

I noticed today the C0 is no longer in active products. We all knew it was coming but it appears the C0 reign of terror is finally over.

Will C0 posts be moved to another section on the forum or remain grouped where it is until C1+ is discontinued like C1?

User avatar
odroid
Site Admin
Posts: 34850
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 932 times
Been thanked: 759 times
Contact:

Re: Candice the personal assistant robot

Post by odroid »

We will produce the C1+ boards one more year probably since there are still many B2B customers are buying it.
Therefore, C1/C0/C1+ sub-forum will exist as it is.
These users thanked the author odroid for the post:
L67GS (Mon Aug 03, 2020 11:14 am)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 0 guests