FreeBASIC controlled robot

For issues with communication ports, protocols, etc.
Post Reply
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

FreeBASIC controlled robot

Post by BasicCoder2 »

badidea wrote:
"I once bought this robot http://www.arexx.com/rp6/html/en/rp6.htm (not cheap). I thought it would be fun, but I could never think of something interesting to do with it."

Often a product is claimed to be only limited by your imagination. Unfortunately for most of us that is a severe limitation!!

First program it to map and navigate a house. Then to recharge itself. Then maybe add a little vacuum cleaner and have it suck up dirt and then blow it out into a dust bin. Maybe put a little water container on it with a pump to fill or empty itself. It can go around watering the pot plants (after testing the soil for moisture). Or maybe a little sponge mop to clean tiles and lino floors. Now I could go on with suggestions but one problem here is the size and strength of the robot. This is why my robot base was built a reasonable size and strength to start with. Ideally you need a small electric wheel chair as a base and build on that.
Last edited by BasicCoder2 on Jan 25, 2018 4:04, edited 1 time in total.
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: FreeBASIC controlled robot

Post by badidea »

I bought the small robot when I was reseaching aritifical intelligence, using simulated neural networks. I quickly realised that the small onboard cpu was too limited for that. controlling a robot directly from a laptop would be better. But in the end, I gave up on neutal networks completely. Too complicated, or the modern pc is still way too slow for that. Probably a million parallel cores needed and years of training the network to get somethong worth mentioning. Like raising a child for years, but only after milions of years of evolution and selection of even more individuals.
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: FreeBASIC controlled robot

Post by BasicCoder2 »

Maybe you were being too ambitious. You might evolve a simple behaviour like learning to walk with a very large ANN or you might hard code a useful behaviour with a much smaller set of connections. For example think about how you might automate a machine to play Tetris. Would you go for an ANN or would you just hard code it?
grindstone
Posts: 862
Joined: May 05, 2015 5:35
Location: Germany

Re: FreeBASIC controlled robot

Post by grindstone »

BasicCoder2 wrote:Often a product is claimed to be only limited by your imagination. Unfortunately for most of us that is a severe limitation!!
LOL
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: FreeBASIC controlled robot

Post by lizard »

LOL++
dasyar
Posts: 372
Joined: Dec 04, 2008 15:31

Re: FreeBASIC controlled robot

Post by dasyar »

I was thinking about, for my next project, a scratch build robot; how would freeBasic fit in?

First off, on what kind of a system could you have freeBasic access? x86 PC, Raspberry Pi, or some other type of computer. Considering this, how big would your robot have to be when you figure in the onboard power source. Yes, I know, somebody will bring up the fact that there are Li-ion batteries available. Has anybody here really worked with Li-Ion batteries for powering a robot just to move around and have a working cpu that could provide freeBasic access. Probably not, since a lot of the forum members here are really good at theoretical arguments.

So, one possibility, for a functional use of freeBasic, could be, a radio controlled robot, maybe something along the lines of XBee. You could have your PC housing a freeBasic program that would have a constant communication with the robot, the program would be collecting the robot functioning data, and then instruct the robot as to what it should do. With the PC, now you have the power to store big amounts of data, compute the data, and provide instruction for the robot functionality.

This project, for me, is still at the thought stage. The biggest hurdles would be, to figure out the mode movement and how to efficiently power the darn thing.
grindstone
Posts: 862
Joined: May 05, 2015 5:35
Location: Germany

Re: FreeBASIC controlled robot

Post by grindstone »

I would recommend to avoid Li-ion batteries, for they have proved to be firebombs in the past.
dasyar
Posts: 372
Joined: Dec 04, 2008 15:31

Re: FreeBASIC controlled robot

Post by dasyar »

Yes, Li-Ion batteries are still to finicky to work with, especially for an amateur like myself. I am leaning more towards a 12V SLA system.

I have been experimenting with a Gigabyte Brix BXBT-2807 box, powered by a 12V battery. I still have to figure out, for real time, how much amp hours the battery would need to power the Brix box and be able to drive the robot.

FreeBasic, because of its capability to use threads, would be a good solution. The freeBasic program would have to have a dedicated thread for overseeing the battery, things like checking for charge condition, calculating how much charge will be needed, in order to get back to the charging station, and other small details like like that.

Now, once a decission is made for the type of power supply that is going to be used, that more less dictates what the robot platform itself, will have to be.
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: FreeBASIC controlled robot

Post by BasicCoder2 »

The batteries required depend upon what kind of motors you are going to use.
It is crucial the motors have encoders.

Regarding the safety of a Li-Ion battery my understanding is you need the electronics to manage them.
They should never be overcharged nor should they be undercharged.
The roomba robot vacuum cleaner I hacked used a heat sensor in the battery pack to turn off the batteries should they get too hot.
I myself would just use the sealed lead acid batteries.

Back when I was keen to get something up and running a PC was needed to run the software for vision which I hoped to write myself using escapi.bi although you could use a cheap commercial package such as RoboRealm. Unfortunately I had no idea how to write the FreeBASIC interface to RoboRealm to make use of it.

Here is an example of a simple test of concept base.
http://www.instructables.com/id/Quick-N ... obot-Base/

If I decide to have another go at it I would use the Arduino for low level control.
A cheap solution is if you can get a old discarded Roomba robot vacuum cleaner for parts.
I picked one up at a garage sale. The owners had let the batteries corrode.
Here is the hack for its motors.
https://www.irobotweb.com/-/media/MainS ... .pdf?la=en
Dinosaur
Posts: 1481
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: FreeBASIC controlled robot

Post by Dinosaur »

Hi All

LiPo4 batteries need individual cell monitoring to avoid a faulty cell pulling down the others (and causing over heating)
I don't know if the kind of Lithium batteries (or the size) you are talking about have access to each cell voltage.
There are small "CellLog" units on the market that will output an alarm to allow you to take action to prevent a disaster.

However there are some serious advantages to using LiPo4 batteries.
1.They can be charged to nearly 100% at a very fast rate.
Lead Acid or Gel batteries want to crawl the last 6 or 7 %
2.They can equally handle high output currents without dropping the output voltage.
Lead Acid or Gel will drop the voltage causing voltage sensitive devices to drop out.

Regards
Dr_D
Posts: 2451
Joined: May 27, 2005 4:59
Contact:

Re: FreeBASIC controlled robot

Post by Dr_D »

Hey, guys. I just wanted to mention that I've been doing this as well. I'm using Arduino UNO, and I haven't done *anything* using FreeBASIC yet, but I'm gonna read up on what all of you have been doing and see what ideas pop in my head. It's already super fun. :)
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: FreeBASIC controlled robot

Post by BasicCoder2 »

@Dr_D
What ideas did you have in mind?
In theory you could program a hardware interface using just FreeBASIC and a Raspberry Pi. Unfortunately I don't have a Raspberry Pi to play with.
As for the Arduino I imagine you could use it to allow FreeBASIC to interface with hardware by writing a FreeBASIC program and an Arduino program to exchange data the same way as was done using a dll for the K8055 board.
Maybe a dll written in FreeBASIC would allow the FreeBASIC interface program to be used by other languages as well.
As for autonomous machines like a vacuum robot the Arduino is very much all you need. The PC would only be required for higher level functions.
Dr_D
Posts: 2451
Joined: May 27, 2005 4:59
Contact:

Re: FreeBASIC controlled robot

Post by Dr_D »

Well, it all started when I bought an Elegoo robot car kit for Christmas. I didn't realize how easy it is to program these things, so we've been playing with it a lot. Also, I bought a kit from a guy at work for 10 bucks. He said he didn't really understand it, so he wanted to get rid of it, just to get some money out of it. I offered to help him out, but he just wanted to sell it. It came with an Arduino Uno, infrared sensors, ultrasonic sensors, a variety of capacitors, resistors, breadboard, connectors, etc... I got a steal! I've been looking at a lot of Arduino projects too. One thing that I thought was really awesome, was a PC-ish rig this guy made, which used two Arduino Unos. He had it running some home-brew of BASIC and everything. I think one of them was basically just used to drive the display, but that's still really awesome to me.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: FreeBASIC controlled robot

Post by caseih »

Yeah it's pretty nice how easy it is to get started with the Arduino. The hardware itself is unremarkable, and not too powerful. But the idea of being able to program it just by plugging in a USB cable was revolutionary. No programmer hardware, no complicated flash procedure. It's entirely self-contained (at least if all you want to do is flash an LED). It's a great learning platform. One thing I like about the Arduino language and IDE is that it can actually work with a wide variety of devices (even ARM devices), and in fact I've successfully used the Arduino Processing framework on an AtTiny85 chip[1] (no boot loader; had to flash it). Beats programming raw AVR C code any day. I suppose for experts the Processing framework becomes limiting, but I still find it works well for me.

[1]AtTiny needs only power and ground to run; no other hardware needed to get basic functionality.
Post Reply