Primary Control Hardware

Classroom setup, good teaching practice and practical advice

11 posts
by simplesi » Fri Aug 10, 2012 4:30 pm
I'm wanting to make/get manufactured a simple/cheap input/output board for use with primary children.

This FlowGo Box by DataHarvest http://www.dataharvest.co.uk/products.php?&g=tec&ppg=tec&a=bot&ppa=sec&t=cd&code=3600UK&cat=control_interface is a pretty good starting point in terms of what is needed but I'm looking for ideas/thoughts/anything what people think would make good primary control projects and from there we can work out what i/o is actually needed.

So, the FlowGo has 8 out/4 digital inputs, 2 reversable motor outputs and 2 analogue inputs which is great but it costs £99 which isn't quite so great :)

Now thats plenty/maybe too much for a simple floor robot, fairground wheel model etc but what do others think?

And what ideas do you have for primary projects.

On separate initiative, I am aiming to get Scratch/Scratch Clone/Scratch look-a-like as the programming tool - I want to leave Python/C to High Schools :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 2115
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by techpaul » Fri Aug 10, 2012 11:22 pm
Well motors are always an issue finding ones at right cost that deliver the necessary horse power for the job.

I would consider looking at motors and gear assemblies from model shops for radio controlled cars/boats/planes as a cheap source of reversible DC motors. Also look for other motorised toys in there.

Make sure yiou get good driving electronics and separate power supply as even small motors gobble up current. The surges would spike the rails on a Pi so I would consider separate power supply for motors, possibly even use a large radio control toy battery.

Look for reverse diode protection for single direction motors and H bridge drive for reversible motors.

If you want some design help contact me but bear in mind that for small quantities issues that affect price are

Blank PCB costs
Power driving electronics
extra power supply.
Any casing and making of cases in small quantities

By small quantities I mean sometimes less than 100 normally less than 1000

Wiring this up on breadboard or strip board could be beyond the current carrying capabilities of the boards and be a recipie for cooked compents if wires are too thin or fall out.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/
Posts: 1510
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
by simplesi » Sun Aug 12, 2012 7:48 pm
I haven't fully checked things out yet, but schools usually have some little motors than run off 4AAs so they probably good for 5V operation - If we stick to 5V, then USB Hubs might be good enough as sources?

I believe H-bridge is the magic phrase when controlling motors so that signal levels switch motors powered from separate supply.

Anyway - my concern is whether the number/type of io is too much/too little.

I want as little as possible i/o as it'll make them as cheap as possible.

But I REALLY DON'T WANT too little if it means too many primary schools/people don't buy it as it won't do what they want :)

So floor robot - 2 motors (1 each wheel) Line Follower light detector needs 1 input or 1 A/D input??

Fairground needs 1 motor, maybe 2 if being really clever, and a lot of outputs for lights
Is 4 digital inputs too much - could we just have 2 - do we 2 A/D? - do we need 4 motors to build a quad-copter? (Are we really going to build a quad-copter in a primary????? )

:)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 2115
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by techpaul » Sun Aug 12, 2012 9:40 pm
simplesi wrote:I haven't fully checked things out yet, but schools usually have some little motors than run off 4AAs so they probably good for 5V operation - If we stick to 5V, then USB Hubs might be good enough as sources?


AA batteries are usually about 1Ah and upwards (some rechargables these days aroun 3Ah each so they can deal with gear and load inertia for motor start surges of a very short period of 1A or more, USB hubs not so well. Other reasons for surging are trying to go forward or even turn and somebody's foot in the way.

I believe H-bridge is the magic phrase when controlling motors so that signal levels switch motors powered from separate supply.

Anyway - my concern is whether the number/type of io is too much/too little.


Utilising I2C or SPI expands I/O immensely.

I want as little as possible i/o as it'll make them as cheap as possible.

But I REALLY DON'T WANT too little if it means too many primary schools/people don't buy it as it won't do what they want :)

So floor robot - 2 motors (1 each wheel) Line Follower light detector needs 1 input or 1 A/D input??


The problem is you need a self contained system with enough battery powery to power Pi and motors, that sits on the unit and has motors powerful enough to move it. You end up with the energy store -> vehicle weight -> motor power CIRCLE as one increases the others have to.

Otherwise you have to put in comms links Radio or Infra Red or other, as trailing wires causes other problems.

For a line follower it can be done with analog to 1 bit or 2bit per sensor decoding, with two or three sensorsand a default for do a 360 when lost completely. Easiest method is follow a black line on white background.

Simple 1 or 2 bit A/D per sensor, and a min of two sensors (better with three). Put a white LED between sensors to ensure illumination.

With fixed speed and two motors, it can be easily done in analogue or analogue with digital and no Pi, have an old cheap kit around from a few years ago.

Fairground needs 1 motor, maybe 2 if being really clever, and a lot of outputs for lights
Is 4 digital inputs too much - could we just have 2 - do we 2 A/D? - do we need 4 motors to build a quad-copter? (Are we really going to build a quad-copter in a primary????? )

:)

Simon


At worst case you only have three levels to detect - line (black), background (white) and unknown (grey) not on paper)

Other way is on line or not but needs two maybe three sensors.

Drop me an email if you wish
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/
Posts: 1510
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
by techpaul » Sun Aug 12, 2012 9:44 pm
Forgot to say the 1 bit A/D is a simple opamp tiny component, two bit A/D a couple of amps in one package.

Carefully mounted the sensor is larger than the opamp and components.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/
Posts: 1510
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
by simplesi » Mon Aug 13, 2012 2:12 am
You end up with the energy store -> vehicle weight -> motor power CIRCLE as one increases the others have to.

Not seeing that as a problem :) Lots of little cheap cars run around with rf/ir control - I sure we can add an RPi on top and still have them move :)

But your saying for line following, we are going to need 3 A/D sensors - that's what we need to know :)
Ta :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 2115
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by techpaul » Mon Aug 13, 2012 9:17 am
simplesi wrote:
You end up with the energy store -> vehicle weight -> motor power CIRCLE as one increases the others have to.

Not seeing that as a problem :) Lots of little cheap cars run around with rf/ir control - I sure we can add an RPi on top and still have them move :)

But your saying for line following, we are going to need 3 A/D sensors - that's what we need to know :)
Ta :)

Simon


The problem comes when you need two energy stores (batteries or packs) when Pi needs a separate 'battery' to avoid motor surges reseting the Pi. This means the extra weight Pi and battery, is more weight for the motors, which often means more energy to drive the weight, so the battery and motor size is upped increasing the weight so you have to increase the energy......

Note most toy cars have ONE way communications via RF/IR - controller to car NO feedback, so no sensor reading.

As soon as you start using RF/IR communications you are using some form of serial communications, which is usally low speed (for RF on models the frame rate is approx 50Hz) This is not normallt UART
comms and requires very specific bandwidth shaping to comply with the RF regulations for that band.

IR comms has other problems which are usually environmental, of signal being blocked or jammed.

It is easier to make this self contained, running with links puts a whole lot of different layers of programming and hardware issues, worst is extra cost.

Best line following uses three sensors to allow for varying line thickness, and then as sensors are simple enables some easier ways for lost line issues, more than anything else by keeping speed slow easier to deal with tight turns and weird patterns, let alone gone off edge of paper. Absolute best uses a diamond of 4 sensors for all directions of travel but more complex to code for environment conditions.

The first thing you need to worry about is what conditions will the sensors see for different line patterns and conditions then work out easiest way to sense them. Basically specify the limits of its operation and work to more detailo to find how the I/O will work and how fast the I/O can be updated and sensors read.

Actually the very first thing you have to specify is min and max line thickness to follow, this affects everything else.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/
Posts: 1510
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
by simplesi » Mon Aug 13, 2012 9:44 pm
Sorry - the idea is to bypass the ir/rf and use the wi-fi connection on the RPi :)

The idea of this thread was to discuss how many.what types of input/ouput would be needed and maybe come up with some ideas for primary pupils say aged 7-11 :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 2115
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by techpaul » Mon Aug 13, 2012 9:57 pm
Yes I understand the goals.

Just making sure you don't get caught in any probs overlooked, and not thought of that then tie you up when the I/O is relatively easy.

How do you intend to talk over wifi, web server?

How fast a response or update rate are you expecting?
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/
Posts: 1510
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
by simplesi » Mon Aug 13, 2012 10:30 pm
Just using the wifi to reprogram it without having to plug back into network - e.g. VNC into the RPi mounted on the robot/fairground ride/quadcopter :)

Also might be sticking webcam onto it :)

Who knows :)

Si
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 2115
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by simplesi » Tue Aug 14, 2012 12:39 pm
No board yet but very very 1st draft of the case :)
http://sketchup.google.com/3dwarehouse/ ... ff3c5b5223
Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 2115
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK