By continuing to use this site, you agree to our use of cookies. Find out more

Member postings for Peter Bell

Here is a list of all the postings Peter Bell has made in our forums. Click on a thread name to jump to the thread.

Thread: Another Workshop lighting problem
15/10/2018 15:16:01

A friend had a a similar problem, ie nothing wrong and new lights and it turned out the electronic ballasts were voltage sensitive and the incoming supply was occasionally too high causing them to shut down at random. He cures it by switching a water heater on when it happens.

Thread: Prototype Boards
14/10/2018 20:49:03

Thanks Neil, I'll have to work on that one once I get my head around the present learning!

Peter

14/10/2018 20:47:58

Hi Dave,

Thanks for all that, your description on debounce sounds logical. Yes a 100nf almost fixes it, adding a 1k resistor in series completely cures it as far as I can see. I'll have a look at the bounce libraries, a quick search reveals a lot to choose from.

Thanks also for the spin, makes sense apart from the syntax I'm afraid. The curly brackets with the semicolon inside are used to end a statement according the reference? { ; } I'm sure there's a simple explanation!

// Spin waiting for input

while ( digitalRead( switch1 ) == HIGH ) {
// Do nothing
;
}

Also adding a LOW digital read version first stops it just rolling through so that it increments each complete input cycle, what is the advantage of interrupt which (to me!) appears to be doing the same job?

Peter

12/10/2018 21:58:48

Hi Dave,

I must admit I thought that cut and past was just that, never realised what the editor was doing by tangling things around like that, another lesson learned.

The drop version works perfectly once I restored my lcd so many thanks for your help, still untangling what its all doing but its great to be learning and making progress at the same time. The switch bounce is horrendous but at least the serial numbers agrees with the lcd. The software solutions look very involved in the versions found so far so I'll try adding some r&c to see that the effect is. It may be ok in real life as I'm using a proximity sensor but I dont know what the rise time is yet.

You mentioned earlier "spin digitalRead() in a loop until a pulse is detected, then count it." as an alternative to attachinterrupt, could you point me to some info on it? Thanks

Peter

11/10/2018 21:34:01

Dave, Many Thanks for adding the code and explanations, just trying to work my way through them on a WiFi hotspot thats worse than dial up used to be.

At present it wont verify with a mysterious message (at least to me!) "of expected '' before ';' token" on the first LCD print up from the end of the sketch. Cannot spot anything obvious--looks the same as the one I listed and that verifies ok--perhaps I've lost some some syntax somewhere?

Phil, thanks for the blockly info, never heard of that for Arduino before--I'll explore.

Not sure where all the smileys came from though.

Peter

11/10/2018 09:27:33

Forgot to say that the input is pretty slow, between 0–5hz

11/10/2018 08:57:51

Looks like interrupt is being well covered thanks. Unfortunately Unable to try anything at present but looking forward to it

The other method mentioned by Dave is “spin digitalRead() in a loop” Perhaps that could be an alternative as once the code has been activated by an impulse it runs then just sits waiting for the next pulse.Is there an example of that somewhere? That would help—-thanks Peter

10/10/2018 22:49:53

Thanks for the replies, very helpful.

This is part of the code that I want count with from the sensor. It will eventually have more zones and successfully looped using the small delay when I tried it on my breadboard.

It is my first attempt with Arduino and although I'm sure it could be improved no end I was pleased to get it running with some help from a friend.

Due to bringing the wrong memory stick with me I do not have the version where I tried incrementing using attached interrupt, sorry.

I did think that perhaps I should practice adding attached interrupt to blink as pratice when I return?

#include <Wire.h> // Comes with Arduino IDE
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address

//int ledPin = 13;
int ledPin = 2;
int switch1 = 3;
int count;

void setup()
{
Serial.begin(9600); // Used to type in characters
lcd.begin(16, 2);// set up the LCD's number of columns and rows:
lcd.setCursor(2, 0); // Print a message to the LCD.
lcd.print("Rail Squirt";
delay (2000);
lcd.setCursor(0,1);
lcd.print(" by Peter Bell";
delay (2000);
lcd. clear();
lcd.print(" Version 2.7M"; //Version
lcd.setCursor(2, 1);
lcd.print(" 10-10-18";
pinMode(ledPin, OUTPUT);
delay (4000);
lcd. clear();
delay(1000);
}
void loop()
{

Serial.begin(9600);
Serial.println(count);


lcd.setCursor(2, 0);
lcd.print("Zone"; // ZONE 1 OFF
lcd.setCursor(9, 0);
lcd.print("1 OFF";

if (count > 155 && count < 175) {
digitalWrite(ledPin, HIGH);// output on

lcd. clear();
lcd.setCursor(2, 0);
lcd.print("Zone"; // ZONE 1 ON
lcd.setCursor(9, 0);
lcd.print("1 ON";
}
lcd.setCursor(9, 0);
lcd.print("8 ON";

if (count > 175 && count < 1500) {
digitalWrite(ledPin, LOW); //output off
lcd. clear();
lcd.setCursor(2, 0);
lcd.print("Zone"; // ZONE 8 OFF
lcd.setCursor(9, 0);
lcd.print(" END";

}

count ++ ;
lcd.setCursor(6,1);
lcd.print(count);
delay(200);

if (count == 1500) count = 0; //re-sets
lcd. clear();
}

10/10/2018 17:30:07

Thanks for the offers of help. Presume just copy the code in somehow?

I’ll try later if we survive the journey from a very enjoyable day at Kew Gardens

Peter

10/10/2018 15:25:39

Yes, I’m using a Nano which has only two pins and got the correct pin no’s.

all I want to do is inc a variable from a string of pulses from a proximity sensor, and count them. Got display and outputs working ok. It was suggested I use an attached interuppt with a service routine, perhaps there’s a better way?

10/10/2018 13:46:13

Thanks looks interesting from the link. Found somes neat toggle and tactile switches thanks to the help from this thread.

I’m only learning I’m afraid but find some of the Arduino error messages a bit misleading also the syntax confusing. Some success with simple things like counting and i2c displays but AttachInterrupt doesn’t want to play ball at present.

Thread: Sustainability of under powered VFD on Initial motor starting
09/10/2018 07:47:28

Like Alan my son has abandoned the 440v switch gear etc on his Harrison lathe and connects the VFD direct to the motor and enjoys full control and jog etc from the VFD by using the existing manual F&R switches to control the VFD .

A separate VFD runs his mill with similar functions, think both are off fleabay but he managed to find a few at the right price which simplifies programming.

Peter


Thread: Prototype Boards
03/10/2018 11:01:26

Thats impressive! Didnt realize the amount of pins that's needed, rather assuming that I2c would take care of things like that, bit too advanced for my present state of development!

Must admit find the cheap1602 type lcd display with white letters very readable but want to progress/learn as you do hence the question.

Thanks Peter

03/10/2018 08:43:47

Yes I'd like something a bit bigger if possible?

03/10/2018 08:14:27

Thanks for the replies and ideas.

A search using "breadboard friendly" has brought good results and switches which will do. The display is only a 2 line lcd but just realised that the board has an adhesive back so I can fabricate a bracket and attach it to take a display or switches.

Talking of displays is there a recommendation for an easy to use reasonably sized Tft?

Peter

02/10/2018 20:01:40

Using a standard prototype board( newish departure from a rats nest for me) for some Arduino work and struggling to attach an I2C display without it rolling about, also finding any toggle switches to plug straight in?

Can anyone offer any advice or advise what suits them?

Thanks Peter

Thread: Vacuum pump valve material
21/09/2018 20:40:32

Yes I got it going after I remembered that I had some 1mm roofing grade rubber in stock so made a valve out of that. Experimented unsuccessfully with different style valves before copying the original.

I drew the shape then printed the image onto film, selotaped together and then cut it out with a scalpel. I found it difficult to get the shape neat and shown is a practice valve with larger holes for the clamping screws to adjust the position.

There are a couple of felt filters in line to stop solder ingress also a glass tube to collect it. Works quite well, hope it continues! To get one I had to buy 2 so got a spare I dont need and intend disposing of it soon.

Quite well made (and heavy) apart from the valve material!

drawing film.jpg

fin valve.jpg

solder store.jpg

07/09/2018 14:34:07

I have a de soldering station which uses an inbuilt diaphragm vacuum pump. Unfortunately the valve material has perished so its just crumbled away.

Can anyone suggest a suitable material to make a valve from? Its about 2mm thick.

Thanks valve 2.jpg

valve 1 .jpg

Thread: Ruston Proctor piston rings (Wiston Kit)
04/09/2018 08:27:24

Paul,

That's brilliant, thanks! Can just about make your stampings out.

Looked at the back of mine again but no numbers as per yours, so the hunt continues, see pic. I suppose all will be revealed when we dismantle and remove the boiler to get it tested.

I have had a suitable lump of brass that would do for a pump laying around for years so could copy without needing to silver solder/fabricate. It just feels so helpless not being able to top up the cold boiler easily. Ours has complicated looking bypass valve mounted where the pump could go so expect we will need to alter the plumbing to suit.

Sounds like you've really got the bug if a 6" is on the stocks!

Peter

back boiler.jpg

03/09/2018 13:09:12

Paul,

Presume you mean under the stays? Gave it a good clean around that area but cannot see anything using a mirror and light, difficult really to get down there, hope to find it when I remove the boiler.

Yes the tubes are welded, so not so good to re tube.

The blurb from Winstons mentioned a hand pump but nothing fitted or found with the box of bits that came with it, does your have one?

Would certainly like to fit one but not sure of size or if drawings or even casting are available. Saw this very neat neat pump on another engine of a similar size. Never had any dealing with small steam engines so lots of learning!

Peter

hand pump.jpg

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Sign up to our Newsletter

Sign up to our newsletter and get a free digital issue.

You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy

Latest Forum Posts
Support Our Partners
cowells
Sarik
MERIDIENNE EXHIBITIONS LTD
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest

 

Donate

donate