DIY hardware interface for simple data collection and robot control?
DIY hardware interface for simple data collection and robot control?
Hello folks,
I have just landed a very exciting job as a 5th to 8th grade math/science teacher, and I am planning on using FB as an integral part of my education. I'll be teaching in a type of school with less restrictions, and there is considerably less "chalkboard teaching" than in a typical public school. Besides science, I will also be doing blacksmithing and gardening with the kids. One of the things I would like to use FreeBASIC for is to collect data and control simple, home-made robots via a hardware interface. I am keeping everything as simple as possible, as my pupils will be making everything themselves, and I don't want to discourage them by throwing too hard challenges at them.
So, my question is: Since I haven't worked with hardware interfaces since the happy Commodore 64 days, could someone here provide blueprints or simply a link to some good resources about this topic? I would like to be able to do simple stuff like turning LED's / low voltage electric motors on and off, read data from a feedback switch / electromagnetic coil / light sensitive resistor, and perhaps control a stepper motor for more advanced stuff.
Cheers,
Michael
I have just landed a very exciting job as a 5th to 8th grade math/science teacher, and I am planning on using FB as an integral part of my education. I'll be teaching in a type of school with less restrictions, and there is considerably less "chalkboard teaching" than in a typical public school. Besides science, I will also be doing blacksmithing and gardening with the kids. One of the things I would like to use FreeBASIC for is to collect data and control simple, home-made robots via a hardware interface. I am keeping everything as simple as possible, as my pupils will be making everything themselves, and I don't want to discourage them by throwing too hard challenges at them.
So, my question is: Since I haven't worked with hardware interfaces since the happy Commodore 64 days, could someone here provide blueprints or simply a link to some good resources about this topic? I would like to be able to do simple stuff like turning LED's / low voltage electric motors on and off, read data from a feedback switch / electromagnetic coil / light sensitive resistor, and perhaps control a stepper motor for more advanced stuff.
Cheers,
Michael
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: DIY hardware interface for simple data collection and robot control?
Great project! I've done a lot of such stuff in the past and I'd like to offer you my support (including the derivation of the Bresenham algo from the line equation).
First of all: To keep things easy you will need a computer with a parallel port and for Win >= XP a driver called "inpout32.dll".
For now a few links:
https://www.codeproject.com/articles/49 ... light-emit
https://kartikmohta.com/tech/parallelport/
http://electronics-diy.com/stepper_motors.php
http://www.globu.net/pp/english/pp/ne555.htm
http://electrosofts.com/parallel/lcd.html
First of all: To keep things easy you will need a computer with a parallel port and for Win >= XP a driver called "inpout32.dll".
For now a few links:
https://www.codeproject.com/articles/49 ... light-emit
https://kartikmohta.com/tech/parallelport/
http://electronics-diy.com/stepper_motors.php
http://www.globu.net/pp/english/pp/ne555.htm
http://electrosofts.com/parallel/lcd.html
Last edited by grindstone on Jan 20, 2018 12:14, edited 1 time in total.
Re: DIY hardware interface for simple data collection and robot control?
Sorry, grindstone but, IMHO the worst idea, in the context is, to start with "outdated"
technologies (Win-XP, aswell as Parallel Port).
I'd have a first look at cheap MicroProcessor's such as ARDUINO, as I/O device at first.
Later on, those can also be used, for simple Robotics ... (they are modular built).
With only the Chips, they can be built on a BreadBoard too, later on (in HW class).
(All the construction plan's/diagram's are "Open Source".)
(Only drawback is, that they have to be programmed in C, alternatively there is a
BASIC Compiler available, but not for free.)
technologies (Win-XP, aswell as Parallel Port).
I'd have a first look at cheap MicroProcessor's such as ARDUINO, as I/O device at first.
Later on, those can also be used, for simple Robotics ... (they are modular built).
With only the Chips, they can be built on a BreadBoard too, later on (in HW class).
(All the construction plan's/diagram's are "Open Source".)
(Only drawback is, that they have to be programmed in C, alternatively there is a
BASIC Compiler available, but not for free.)
Re: DIY hardware interface for simple data collection and robot control?
Thanks a ton man! This is exactly the kind of things I've imagined. As MrSWISS mentions, I know controlling stuff on an old PC with a parallel port is a bit outdated, but this is exactly something we can manage by ourselves with a few wires and a soldering iron. I want to get as far away from the shiny (and very expensive) educational robot sets you can buy. I want my students to experience a feeling of ownership about the stuff they are doing, so I'll have them make as much of it themselves, with duct tape, plastic cups and wooden sticks if we have to. Having said that, the stuff you can do with the Arduino, Raspberry pi and similar is pretty amazing too.grindstone wrote:Great project! I've done a lot of such stuff in the past and I'd like to offer you my support (including the derivation of the Bresenham algo from the line equation).
First of all: To keep things easy you will need a computer with a parallel port and for Win >= XP a driver called "inpout32.dll".
For now a few links:
https://www.codeproject.com/articles/49 ... light-emit
https://kartikmohta.com/tech/parallelport/
http://electronics-diy.com/stepper_motors.php
http://www.globu.net/pp/english/pp/ne555.htm
http://electrosofts.com/parallel/lcd.html
Cheers, Mike
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: DIY hardware interface for simple data collection and robot control?
On the contrary. That "outdated" hardware is going cheap and that old OSes (I'd even recommend DOS for the first steps) are quite easy to handle. Later on you can use more sophisticated hardware.MrSwiss wrote:Sorry, grindstone but, IMHO the worst idea, in the context is, to start with "outdated"
technologies (Win-XP, aswell as Parallel Port).
Re: DIY hardware interface for simple data collection and robot control?
Instead of buying a new PC with a parallel port (might be difficult to find one), you could check if USB->X converters could do the job. See e.g. My New Laptop Does Not Have Any RS232 Ports. If you search for USB to Printer DB25 25-Pin Parallel Port Cable Adapter on the website of a well-known online seller who doesn't pay taxes and reminds me of a Brasilian river, you will find a little gadget that costs just 4 bucks.
Re: DIY hardware interface for simple data collection and robot control?
NO, its not just "outdated", it is in ICT terms: "Dinosaur-technologies".h4tt3n wrote:I know controlling stuff on an old PC with a parallel port is a bit outdated
And, your pupils will be the first, to tell you all about it!
@grindstone, we are talking about young kids here (not "old" people).
Re: DIY hardware interface for simple data collection and robot control?
Well okay then, but what realistic alternatives are there? The students needs to be able to build and program everything themselves and it needs to be doable on a limited budget.MrSwiss wrote:NO, its not just "outdated", it is in ICT terms: "Dinosaur-technologies".h4tt3n wrote:I know controlling stuff on an old PC with a parallel port is a bit outdated
And, your pupils will be the first, to tell you all about it!
@grindstone, we are talking about young kids here (not "old" people).
Re: DIY hardware interface for simple data collection and robot control?
Thanks, I will take a look. Seems like a reasonable workaround.jj2007 wrote:Instead of buying a new PC with a parallel port (might be difficult to find one), you could check if USB->X converters could do the job. See e.g. My New Laptop Does Not Have Any RS232 Ports. If you search for USB to Printer DB25 25-Pin Parallel Port Cable Adapter on the website of a well-known online seller who doesn't pay taxes and reminds me of a Brasilian river, you will find a little gadget that costs just 4 bucks.
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: DIY hardware interface for simple data collection and robot control?
@jj2007: If you know how to control single lines of such a USB to parallel cable, please let me share your wisdom. I'm trying in vein to figure out how that can be done since more than a year.
That's exactly the point. Those young people can operate their smartphones perfectly, but have hardly any clue how they work.MrSwiss wrote:@grindstone, we are talking about young kids here (not "old" people).
Re: DIY hardware interface for simple data collection and robot control?
And, you want to explain it, with a not any longer existing Parallel Port, you surely must be joking!grindstone wrote:Those young people can operate their smartphones perfectly, but have hardly any clue how they work.
Every Smartphone has a USB-Port, nowadays ...
Basically, the first question to answer, would be: do you want to start off, with HW or SW?h4tt3n wrote:Well okay then, but what realistic alternatives are there?
More into the details:
First step, work out a Agenda/Time-Line, before going into technical details.
Second step, remember that humans, tend to think analogue vs. machines, digital.
Therefore, I think that, before going into hardware, you'd have to teach some digital
concepts, like Gate operations theory, etc. (which in turn helps, to understand some
SW concepts, such as: Boolean operators/logic/variables and so on).
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: DIY hardware interface for simple data collection and robot control?
Another alternative would be a cheap USB-to-RS232 converter (e.g. with FT232R). It can be accessed by freeBasic via a virtual COM port (usually COM4) and provides 6 TTL lines. Nevertheless it's not suitable for driving stepper motors, because the timing is too unprecise.
Re: DIY hardware interface for simple data collection and robot control?
The base problem, seems to me is (at this point in Time) that, OP has to decide first:
what he/she wants to pack into those lessions, aswell as the priorities.
Currently it looks to be, 3 different subjects:
I'd cut out, the complete Electronics part, by using a pre-built cirquit, as a Arduino since,
they are quite cheap to buy (aswell as minimising, all the "going up in smoke", issues).
what he/she wants to pack into those lessions, aswell as the priorities.
Currently it looks to be, 3 different subjects:
- Electronics (all the soldering related stuff)
- HW, only theory? (or coupled, with above?)
- SW, related to HW
I'd cut out, the complete Electronics part, by using a pre-built cirquit, as a Arduino since,
they are quite cheap to buy (aswell as minimising, all the "going up in smoke", issues).
-
- Posts: 3908
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: DIY hardware interface for simple data collection and robot control?
I have interfaced electronics to all the computers I owned. TRS80, C64, Sorcerer, Amiga and the PC bidirectional ports.h4tt3n wrote:So, my question is: Since I haven't worked with hardware interfaces since the happy Commodore 64 days, could someone here provide blueprints or simply a link to some good resources about this topic? I would like to be able to do simple stuff like turning LED's / low voltage electric motors on and off, read data from a feedback switch / electromagnetic coil / light sensitive resistor, and perhaps control a stepper motor for more advanced stuff.
The problem with using FreeBASIC is the lack of anyone capable of writing the software to read from and write to a usb port.
If you could find a C .dll capable of doing it and if you have the ability to write the code required to call the routines from FreeBASIC....
The Python community provides a lot of support for interfacing to hardware and would probably be my choice of language.
For my robot I used escapi.bi for webcam vision and K8055.bi for controlling motors and reading sensors both were provided by D.J.Peters
Last edited by BasicCoder2 on Jan 21, 2018 9:32, edited 1 time in total.
Re: DIY hardware interface for simple data collection and robot control?
Once again, many USB-Devices provide VCP (virtual COM port), which means, they canBasicCode2 wrote:The problem with using FreeBASIC is the lack of anyone capable of writing the software to read from and write to a usb port.
easily be controlled, with ordinary Serial-Interfacing, from FB! (as Arduino does)
Open COM and the like ... this then means: nobody needs to be able, to program USB directly!
What you've been underestimating was: the Arduino must be programmed (first), before any sort
of communication, can be established (which you never understood!), by: FB / C or otherwise.
Your "stupid" Velleman Device is just able to do, what it was built for. A Micro-Controller can do,
whatever you program it, to do (far more versatile, and cheaper, on top of it).