Reproducing the Electronic Set Models

In the 1970s, Meccano marketed an Electronics Set:

Open in new window

The Set allowed a number of "automated" models to be built.

All relied on input from the PhotoCell. So having built a photoCell replacement (see article on how to build your own Photocell) we can get on with making the MotorVator operate as required:

All of the routines use the "Tuning Potentiometer" method described in the PhotoCell article, with the PhotoCell into Analogue 1 input, the Tuner into Analogue 2 Input, and the motor (PowerDrive or whatever you want - after all, the speed can now be adjusted programmatically) in Motor Output A.

The Electronic Set allowed three Modes of Operation, as follows:
Circuit A Operation: Motor runs when the PhotoCell is blocked.
Open in new window

 


begin program

Declare Byte threshold 
Declare Byte light
declare byte speed 50       change this to suit your motor
Loop

light 

ReadAnalogue(1)

threshold ReadAnalogue(2) ; get the threshold
If light threshold Then       reading goes up when dark
     SetMotor 1
,"F",Speed  Run motor if Blocked

Else
       
SetMotor 1,"F",0           stop motor
End 
If

End loop

End Program

Circuit B Operation: Motor runs continuously, and Solenoid operates when the PhotoCell is blocked.
Open in new window

We are going to use Servo rather than the Solenoid. This has the advantage of being to tune the extent of the movement.

 


begin program

Declare Byte threshold 
Declare Byte light
declare byte speed 50       change this to suit your motor

SetMotor 1

,"F",Speed  Run motor continuously

Loop

light 

ReadAnalogue(1)
threshold ReadAnalogue(2) ; get the threshold
If light threshold Then       reading goes up when dark
     SetServo 1
,"F",90       ; If BLockedturn fully one way

Else
       
SetServo 1,"B",90           ; else turn full the other way
End 
If

End loop

End Program

Circuit C Operation: Motor runs when the Photocell is NOT blocked

Open in new window


begin program

Declare Byte threshold 
Declare Byte light
declare byte speed 50       change this to suit your motor
Loop

light 

ReadAnalogue(1)

threshold ReadAnalogue(2) ; get the threshold
If light threshold Then       reading goes up when dark
     SetMotor 1
,"F",Speed  Run motor if NOT Blocked

Else
       
SetMotor 1,"F",0           stop motor
End 
If

End loop

End Program