Water drop controller

bfgstew

Senior Member
I have had a good investigation and the above is more complex than I care for, it really is for driving PLC's and the like, a bit overkill for what I want, for now anyway.....

So it looks like an OLED with a 18M2 chip set to get this project started.

Would it be advisable to have a numeric keypad to 'write' changes? along with some n/o push switches for cursor up/down, select and start?

Cheers guys.

ps would it help when working out programming and stuff to draw a flow chart to show start up conditions, sub routines etc?
 

Texy

Senior Member
slightly off topic!

Hi,
I was one, perhaps the only one, to build the camera/flash controller designed by Styrophil linked in post 2. That box of tricks of course detects the drop and controls the timing needed to fire the flash at the correct time (once established by the user!), the next problem is acurately controlling and timing the water drop(s) itself, and this is where the OP is working on. At the time, crikey its 2 1/2 years ago now, I devised a picaxe program/circuit to do the same thing, although at the time I was happy to do the comms via serial link and terminal to send commands to the picaxe. The values were also stored to eeprom so didn't need re entering on every switch on. Anyway at the time I had reasonable results for single drop shots, but couldn't get any of the double 'umbrella' drop shots I was after. Recently I have gone back to it with better success. I got a lot of help and tips from this page :
http://www.scantips.com/drops/shako/

Anyway, back to the OP's issue - making the water drop controller stand-alone. It's very doable using a keypad and an LCD. I used the extensively suggested Shako PU220AR , a FET supplied by techsupplies, an arduino and an arduino LCD shield. Yes, sorry, but i moved over to the arduino platform for this project, but no reason why this can't be done by the a picaxe.



BTW, why do you need 4 solenoids?

Texy
 

bfgstew

Senior Member
Thanks Texy for that link, I have seen it before and it was one of the pieces that got me interested in this idea!

The reason for multiple solenoids is to create a simple rain fall effect. But also the solo, multi drop effect (umberella) shots.

So I can have 1 solenoid running, 1, 2, 3 or more drops totally controllable, or 1, 2, 3 or more solenoids running dropping, 1, 2, 3 or more drops totally controllable.

If you have any more info on your original Picaxe idea, it would be nice to see it so I can have some ideas.

Many thanks

Stewart
 

Texy

Senior Member
No probs - I,ll post my code when I get home from work later. Have you gone for the suggested solenoid?
Driving the solenoid is easy enough - I think the example I used using a FET is in one of the picaxe manuals.
You can see from the link that the nozzle used is also quite critical for good, consistant drop sizes, as is using
a mariotte syphon to keep the water pressure constant. I used a 1/8" nozzle, although when it came (via ebay)
it didn''t have the correct NPT connection to fit to the solenoid that I thought it woulod have,
so I,ve used bluetack to hold it in place .;)


Texy
 

bfgstew

Senior Member
Thanks very much for that Texy.
I have the availability of 240V solenoids that are very small and look ideal for the job in hand,and are free!!!! Will trigger them using an SCR as they can handle 600V. Nozzles are not a problem as I can get blank ones and drill the orifice to suit.

Hear from you later Texy, cheers.

Stewart
 

Texy

Senior Member
It took me some time to set up, but once you get there, the shots are fairly repeatable :



Getting the technique is the first milestone, then we can concentrate on composure :)
Texy
 

SAborn

Senior Member
Gee, i didnt think the water was that blue in the UK.:)

Nice shots.

A few drops all in a row would look neat, as they went from focus to blured into the depth of field.
 

bfgstew

Senior Member
Amazing indeed.

But with what I am after, if it works, should give more amazing views of these collisions..........:D
 

Texy

Senior Member
Thanks guys. (The blue effect is done by adjusting the white balance on the camera - it looks more interesting that just plain water. Other common practices are with milk and food colouring).
The code wasn't quite as I remembered, but it will do the job :

Code:
#picaxe 18x

#no_data


symbol timespan = w3
symbol between = w2
symbol SOL = 0 ; Out port 0 = solenoid driver
symbol SOL_LED = 1 ; SOL LED indicator
symbol SW1 = pin6 ; input 0 = GO!


setfreq m8


sertxd("start",cr,lf)


main:


if SW1=0 then goto main ; wait until button pressed


main2:
if SW1=1 then goto main2 ; wait until button released


readadc 2, b1
between = b1*10
 
readadc 0, b1
timespan = b1*10
                 
sertxd("between= ",#between,13,10)
sertxd("timespan= ",#timespan,13,10)


high SOL
high SOL_LED
pause timespan
low SOL
low SOL_LED
pause between
high SOL
high SOL_LED
pause timespan
low SOL
low SOL_LED


goto main


end
Basically it uses 2 pots, 1 to control the drop duration (for both drops) and the other for the interval time between the drops.

Hope this helps, but there are many ways to do it - an LCD with a keypad is much more elegant and controllable.


Texy
 

bfgstew

Senior Member
Hi again,

I have been looking at this Beijer E100 control unit again, sorry but it seems a shame just sitting there doing nothing!!!!!http://common.leocom.jp/datasheets/127720_56200.pdf
I am I correct in thinking that it 'could' communicate with a Picaxe chip via the RS-232 port, it only uses 3 pins Tx, Rx and ground, i can get hold of a connector and simply wire it to my strip board with the chip on board. Both use ASCII for characters for LCD, it's just whether the E100 can control the Picaxe???????
 

Texy

Senior Member
Should work ok, but check the 232 voltages coming out/expected in. You may need a max232 chip inboard with the picaxe.
Texy
 

bfgstew

Senior Member
The E100 runs on 5VDC, so no need to worry about voltages, as long as it is clean and regulated.
 

bfgstew

Senior Member
Thanks for the warning Texy!

Right, i am ready to start planning the board for this project.
A few questions need answering if possible please.
I am going to use the 18M2 chip and the previously mentioned E100 interface (if possible).
I am connecting the E100 to the 18M2 via the RS 232 serial port - Rx, Tx and ground, now I want the ability to have the 18M2 programmable through the normal download socket, but the RS 232 uses the same pins, so I am adding a switch so it can be in programme mode, then run mode, so far so good, but in the manual (manual 3 section 3 page 44) is the MAX 232 chip or a series of resistors to ensure correct voltages, which one can I use?
Once I have it built, I shall add some LED's to test functionality.
Many thanks in advance from a novice..................;)
 

Texy

Senior Member
Assuming you have enought spare I/O pins to go around, why not use other pins for the E100 commas and leave the standard tx/rx pins for programming and debug?
Texy
 

bfgstew

Senior Member
Didn't realise you could do that Texy! Then I presume you assign a pin/pins to become Rx and Tx in programming?

I should have enough spare pins as I shall be using 8 maximum.

Stewart
 

bfgstew

Senior Member
Ok........... I have just started building my circuit on breadboard and I can download programmes to the 18M2 chip, fine.
The programme is a simple test one to light 4 LED's on pins B.7, B.6, B.5 and B.4. Now B.7 lights on and off fine, the others don't, am I doing something stupid?

main:
high B.7
pause 1000
low B.7
pause 1000
high B.6
pause 1000
low B.6
pause 1000
high B.5
pause 1000
low B.5
pause 1000
High B.4
pause 1000
low B.4
goto main
 

hippy

Technical Support
Staff member
I am connecting the E100 to the 18M2 via the RS 232 serial port - Rx, Tx and ground, now I want the ability to have the 18M2 programmable through the normal download socket, but the RS 232 uses the same pins, so I am adding a switch so it can be in programme mode, then run mode
It may be best to provide a block diagram of what you are planning as MAX232 and the like invert signal polarity while Serial In and Out use a fixed polarity. You may need to add additional inversion rather than just use a switch.


The programme is a simple test one to light 4 LED's on pins B.7, B.6, B.5 and B.4. Now B.7 lights on and off fine, the others don't, am I doing something stupid
Possibly :)

Perhaps post a photograph of what you have as we can only guess. Check you don't have LED's in back to front.
 

bfgstew

Senior Member
Hi Hippy,

The E100 is not connected yet, that is still a long way off at the moment.

The LED's are correctly orientated, I have used several to check and only the one connected to pin B.7 works. Each are with a 330 ohm resistor.
 

Texy

Senior Member
So you got led on B.7 to work OK. Just to be sure thats physical pin 13 of the device, right?
Shorten your program to light up B7 only and check the LED you expect to come on is on. If you are happy that is working, post you complete program for all of the LED's and use the code tags. You have configed all of the pins that drive the LED's as outputs as well haven't you?

T.
 

hippy

Technical Support
Staff member
The LED's are correctly orientated, I have used several to check and only the one connected to pin B.7 works. Each are with a 330 ohm resistor.
I would guess it's a wiring or connection issue then. Post a photo of what you have.

Is it a bread board where all 0V tracks aren't actually joined together ?

Have you double-checked they are 330R resistors, not 330K or something else; that one had me stumped for hours.

Have you checked the voltage on the actual PICAXE pins even if the LED's aren't lighting ?
 

bfgstew

Senior Member
So you got led on B.7 to work OK. Just to be sure thats physical pin 13 of the device, right?
Shorten your program to light up B7 only and check the LED you expect to come on is on. If you are happy that is working, post you complete program for all of the LED's and use the code tags. You have configed all of the pins that drive the LED's as outputs as well haven't you?

T.
Hi Texy,

I have tried just B.7 on and off, that works fine, but when I try for 4 it doesn't. I did post my code on previous page, it shows on simulation that it works? But not on the board.
Configure pins? That maybe the problem. The 18M2 is a bit more complex than the little 08M2 i have used in the past, may need a little lesson on configuration..........................;)
 

hippy

Technical Support
Staff member
See post #63 as replies crossed.

Plus : Take the High B.7 / Low B.7 out of the code; what happens then ?

If B.6 lights then it's possibly an over-current situation or similar when B.87 comes on causing a reset.
 

bfgstew

Senior Member
Have you double-checked they are 330R resistors, not 330K or something else; that one had me stumped for hours.
Panic over, just goes to show, it's the simple things that trip you up!!!!!!!!!! Set of resistors marked up as 330 ohm's but are 330K ohm's!

Thanks for that Hippy, I can now move on on my project.
 

bfgstew

Senior Member
Hi all, been thinking more about the interfacing with ths project and trying to get my head round the coding! I came up with a short overview of the type/style I want in a flow chart format. Can anyone see anything blindingly wrong with this. I am hoping to get the previously mentioned E100 device to work with this but if not I shall go with the 20 X 4 OLED unit from Tech Supplies. If the E100 works it would be ideal as it is complete with numeric, direction, function and enter keys, if not the 20 x 4 OLED, but I did read that the 18M2 chip is not compatible with a keypad, how could I get round that without buying the 18M2+ chip?

image006.jpg

I have read the manual for programming but it is a bit heavy and for a newbie fairly daunting, has anyone got some good tips about programming?

Many thanks

Stewart
 

Texy

Senior Member
Break it down into small chunks. At this point I would either,
i) concentrate on getting the E100 to communicate with the picaxe, say be able to switch on or off a LED, or
ii) use fixed value delays and get 1 solenoid working, ie 1 or 2 drops of water

Texy
 

bfgstew

Senior Member
I think your right there Texy, going to concentrate on communicating with the Picaxe and E100 as I have just got hold of a RS 232 and a RS 422 serial cables, I have the pin outs for the E100 and tech data sheets, so fingers crossed on this one!!!!!

Cheers

Stewart
 

bfgstew

Senior Member
Ok, this is the pin out http://www.scantime.co.uk/_docs/149967.pdffor the E100 RS 422 serial port, which wires would be needed to communicate with the 18M2 chip?

I have 'belled' out the wires and have wires - 2, 3, 7, 12, 15, 16, 20 and 24.

Thanks in advance for your help guys.
 
Last edited:

Buzby

Senior Member
The E100 appears to be a device designed to connect to Mitsubishi PLCs.

Your biggest challenge is not connecting the wires, that's straightforward, but making your PICAXE emulate the correct communications protocol.

It will be virtually impossible to determine the required comms if you only have the E100, without a partner PLC.
If you have a PLC as well then decoding the two-way comms between E100 and PLC is a lot easier, but still no picnic.

Have you got the programming software for the E100 yet ?.
You are going to need this to configure the application in the E100.
You can also have a look in it to see which PLCs the software supports, then Google ( or ask here ! ) to get the communication protocol.

I think if your priority is the drop controller, then you would be better of sticking with a simple LCD or OLED solution which has loads of help on these forums.

Getting an E100 to work with a PICAXE is a project in itself, and it would be really cool to see it happen, but it's a lot of work.

Cheers,

Buzby
 

bfgstew

Senior Member
Thanks Buzby,
Yes, the E100 is for using with a PLC, it was surplus to requirements as we no longer use them and all software has gone! Just thought it could be used in some sort of fashion rather than go to waste. I shall keep it just in case.
As you mentioned, I shall now go for the 20 X 4 OLED from tech supplies and build the controller around that and the 18M2 chips, some tactile buttons for navigating the screen and a smart box to house it all in.
Thanks guys, I do appreciate your time and effort.
Stewart
 

Buzby

Senior Member
Hi Stewart,

... it could be used in some sort of fashion rather than go to waste.
Don't give up on the E100 yet, there maybe another way to utilise it.

Take the E100 apart, and if you are lucky, you may find that the buttons, case, and display could be re-used.

If the 'guts' of the E100 are suitable, you could replace it's existing electronics with a PICAXE, and program your drop controller in that.

This could be only slightly more work than programming a separate display and keyboard, but you would get a controller with an uber-cool case.

Post some close up and clear pictures of the insides of the E100, and we'll have a look.

Cheers,

Buzby
 

bfgstew

Senior Member
I have took the unit apart.
e100.jpge1001.jpg
I may be able to squeeze the 20 x 4 OLED into the window, all depends on were the tracks go. 12 buttons on the front, plenty to play with, just have to connect something other than that carbon ribbon cable, will work something out.
 

bfgstew

Senior Member
I have taken the unit apart and looks like I may be able to squeeze a 20 x 4 OLED into the window of the E100, depends on where those tracks are under the membrane!
e1001.jpge100.jpg
The ribbon cable may be a bit of a pain as it looks like carbon and difficult to bell out, so a little more investigation work to sort out yet, but am sure I can make this look uba.
 

Buzby

Senior Member
Have you a picture of the other half of the E100, the bit where the ribbon plugged into ?
 

bfgstew

Senior Member
Ah, I think I know what your going to say! Remove the socket the ribbon goes into and solder on to the legs of that..........good thinking!
 
Top