Picaxe Project Ideas for Physics

kam

Member
Hi,

My Physics Department has allowed me to do a research sort of project but only if i come up with a good research question.

They are not really that fussy abt it being too deep a research question. I was wondering if i could do something with the PICAXE, u know like some robot. I came up with a servo mount, but thats been done before and doesnt really strike as a research question. Any Ideas?

Kam
 

kam

Member
That seems like a good idea. Hey is it possible to make the RGB sensor into a tracker.

What i cooked up in my mind is that if i had the RGB sensor on top of a X-Y servo Mount and i could tell the picaxe to follow the Colour where ever it goes.

But i cant see exactly how? How will the PICAXE know if the object has moved right or left? Perhaps if i used a CCD module then maybe i would be able to tell but then again HOW???

Im just taking a guess here, I think that in a CCD there are different cells. so if a paticular cell or a set of cells can tell that they detect a "Red" colour, then it can be checked if the cells that detected are the ones in the center, if not then move accordingly till they are in the center. but considering the size of the CCD i dont think it will be able to get enough coverage. Because if i used an apple it would take up the entire space and would mess up the chip. right? what if i used an array of RGBs, thats too expensive

OK NOW IM REALLY MESSED UP.... SOS !!!
 

gbrusseau

Senior Member
There is a sort of answer to your question.... I almost hesitate to mention this, but the CMUCam2 does a good job of tracking bright red objects and has built in servo tracking. Just plug in the servos to the CMUCam and your ready to so.

http://www.cs.cmu.edu/~cmucam/

The down side is that the CMUCam is a sun of *"%*!!%* to work with. I played around with it for about a week and finally decided its limitations didn't fit my needs. The other down side is that it's really not a reseach project, unless you want to see how much frustration a person can take before blowing up. A little expensive too.

If you want to go all the way, then there is great research to be done on a new product called CogniMEM. Its an object and data pattern recognition system. The sky's the limit with this one. Oh ya... Its $600.00

http://www.roadnarrowsrobotics.com/acatalog/Recognetics.html
 

kam

Member
Now thats some really neat stuff. But i've got a prob.

1) I doubt the department will let me spend that much.

2) Considering that the tracking system has been done by them, my research question is out the window.

So now i've got to look at a new question, darn, just when i thought i was getting somewhere.

I'll try to talk to my teacher. see how that goes. but i've started thinking that considering im looking at robotics and thats a physics department, maybe they just want something less exciting. Never the less i can always talk about image recognition as being a part of photonics etc.

Thanx but still the window's open any ideas welcome.
 

manuka

Senior Member
I've had a long tertiary career that's covered assistance in many such open ended student projects, so am happy to offer ideas. Aside from budgets (!),THE FIRST THING TO ASK IS - time frame!. Please also fill us in on your skills, experiences, workshop facilities,resources & -yes- boring old assessment needs. The latter may require all sorts of tedious slog to support what you do. I recall a past student's great "approaching bus alert" project falling over due to lack of "academic rigor", even though the setup worked brilliantly.

Projects can be quite political! Your supervisor may of course have a slant on technology that may be worthwhile heeding- if only to get you bonus points at later job interviews. What are YOU really interested in & how do you see your career developing?

As an insight into my technical life (which is normally educational & energy related) outside this esteemed forum,I've been asked to help with a tight budget electronic treatment of "Diabetic Foot"- would such a - ahem- down at heel project interest you? Stan (in NZ)
 

Tom2000

Senior Member
If I was assigned this task, I'd crack my Physics textbook, trying to find a classic experiment of old that interested me. (Something like measuring the gravitational constant or the mass of the electron, any of Hertz' experiments, etc.)

Think about the apparatus used. Let your imagination roll. Try to think of ways that a Picaxe could be incorporated into said apparatus to simplify or automate the measurement(s). In other words, examine 200 year old technology and bring it into the 20th century.

A project like this doesn't necessarily have to cost an arm and a leg. You'll see that much of the apparatus used to do some amazing Physics was surprisingly simple. You can follow those principles, be a bit clever, scrounge like crazy, and come up with something interesting and educational.

Good luck!

Tom

PS - It's a shame that the field isn't Chemistry. An idea for a Picaxe-controlled automatic titration machine popped instantly into my mind when I read your first post.
 

demonicpicaxeguy

Senior Member
this sounds like fun,

exploring projectile motion with an accellerometer a 18x and external eeprom could be quite a bit of fun

maybe hook up a thermister and log tempreture vs light vs air pressure

when i did physics we used an oscilisope to look at the speed of sound

with a simple data logger, you'll find the students will probably come up with the best ideas for a good experiment
like logging fridge temperatures when you place different amount of room tempreture items in them and how much of a temperature drop you get vs how many times per hour you open and close the door


what school/country is it , a few of us might have somthing to donate/lend
 

hippy

Ex-Staff (retired)
If I was assigned this task, I'd crack my Physics textbook, trying to find a classic experiment of old that interested me.
I hesitate to suggest ESD breakdown testing using a PICAXE attached to a kite flown out a window during a thunderstorm :)

I'm not sure what "physics research" is when related to micro-electronics. In my day, physics was about the properties and intrinsic behaviour of things.

The only things I can think of is bi-directional communication between two PICAXE's over a single piece of fibre-optic, or an extension of Stan's communications using damp string or through people holding hands.
 

Dippy

Moderator
Haha. yes. Cooking. You're right.

But analysing smoke particulates could be interesting, especially as it involves Physics rather than just twiddling around with a uP.

Some people like Pylons, some people like particulates, some people like trans-oceanic canoes for smuggling Fosters 'beer'.
Whatever floats your boat eh? (Ha).

I bet your average person doesn't know what's in a cheap smoke detector or even know how it works. It's a very small canary.
There's a joke about Fosters and activities in canoes but I won't say it.
 

manuka

Senior Member
Whoa Dippy-it's vice versa. Classic coal mine style canaries in fact STOP singing (usually for good...) when the air gets nasty!It's perhaps fitting you mentioned this, as shrinking glaciers are considered a global warming "canary". Yes- they sway on their perches & fall to the cage floor too.

I too fancy revisiting the classic , but in such an era as todays you really can't ignore energy related Physics investigations, perhaps via a simple ( & cheap!) PICAXE data logger. Someone mentioned solar PV tracking recently- how about you investigate their benefits versus static PVs? Given seasonal changes maybe investigate domestic heating variables (humidity,temp etc) over an extended period.
 
Last edited:

Dippy

Moderator
You're right. Maybe the micro-perch has a transducer on it? I shall never believe what people tell me ever again!!


KAM: If you mention "Global Warming" or "CO2" in your request you'll get a huge grant. Remember to use the word "sustainable" at least five times per sentence to make you look serious. It works for thousands of scientists all over the world.
 

kam

Member
Thanx for the input guys,

Projectile motion seems like a good idea, i can use a tennis ball and fill it with an assembly of a pcb including a 3 axis accelerometer, 14M or 18X and a wireless module, oh yeah and a battery pack.... ok probably not a tennis ball :) ...something close. So my research question can be something like to calculate the effect of wind on an object during free fall or flight.

The time frame I have is about 2 to 3 weeks, that includes time for my other subjects. So i really need to be on my feet and know what im doing.

So Im hoping i can rely on some expert support later on ( that is ... if i ever get this approved).:)

I'll find out tomorrow
Thanx guys
 

manuka

Senior Member
2 or 3 weeks- grr- wish you'd mentioned this initially. In my experiences it used to take many unmotivated students that sort of time just to fire up a 555 & write up the outcome! Forget anything fancy hence & go for something ACHIEVABLE, for which I suggest breadboards (of course).
 

Dippy

Moderator
Didn't someone propose a ball and accelerometer yonks ago. Did it ever work?

Yes, a breadboard inside football will be great ; when it hits the ground all the components fall out, or wires touch together and produce a smoking ball. However, the smoke will give a very clear indication of wind direction ;)

Kam: As Stan implies, you have very little chance of getting that working in two weeks.

"So i really need to be on my feet and know what im doing." - I say that to myself every day :)
 

hippy

Ex-Staff (retired)
The time frame I have is about 2 to 3 weeks, that includes time for my other subjects.
That's not really much time to do anything.

What you haven't told us is the "why and what for". Is this a project you'll be getting marked on or just something fun you want to do ? What do you have to 'deliver' as a result of the project, will that be done as part of that 2-3 weeks ?

What previous PICAXE and circuit building experience and skills do you have ?
 

kam

Member
I've been using picaxe in school and for hobby. I have a reasonable command over the chip, maybe not too deep but thats the only language i know as far as programming is concerned. we were tought C with an 8051 but its soo mch easier to use a PICAXE and heaps more fun.

Now in my currnet semister the physics department has given us the option to do normal labs or do any sort of physics related research. We have to give a proposal for the question we have to answer and if approved will be provided with the equipment and facilities. then we will be marked for that instead of our normal labs.

So we have to answer a research question and yes, its suppose to be done in the same time frame.

Oh... guys i just found out, Its due start of june... :eek: sorry... that gives us more time. But still i have to finish the circuit very soon and get it up and running so that i have enough time to experiment with it and maintain a log report.
 

Shack

Member
My opinion is:
If you are really interested in your education you should consider doing the regular labs instead of wandering off in a fun project that will only provide a narrow subject. I think the lab would offer a broader view .... such as why a jet engine propels an airplane with no propeller! Or how does a propeller work and why?

What is the grade level?
 

hippy

Ex-Staff (retired)
Now in my currnet semister the physics department has given us the option to do normal labs or do any sort of physics related research. We have to give a proposal for the question we have to answer
That fits with my view of physics ( at least at the level I was at ); what happens to a stretched spring, what happens when water is heated or cooled, etc. I just cannot relate much of that to something a PICAXE would be be involved in answering, I'm afraid. Maybe logging how temperature changes in a block of ice melting, determining if a cup of coffee is hotter if milk is added before or after the boiling water, but most of those can be done in the traditional way, a thermometer and some graph paper.
 

Dippy

Moderator
Kam:"...that gives us more time".
- nah. That gives YOU more time :)
I hope the 'us' meant 'we dear students'?

And surely you want to do something with a novel twist?
Blocks of ice etc. is stuff for 14 year olds.
 

manuka

Senior Member
Hippy's hot drink mention reminded me of Newton's classical "Law of Cooling", which can easily & cheaply be PICAXE-08M monitored. It's quite straight forward to setup as well- YAH! The law states that a hot object transfers heat to its surroundings (thus cools) at a rate proportional to the difference in temperature between the two, & it can be investigated at a number of levels depending on your academic needs. Gutsy differential equations & exponential curves,to please your supervisor, can even be involved if your maths is up to it.

Essentially you'd investigate all manner of conditions under which the law holds true- breezes/ambient temps/solid-liquid types/container shape & surface area etc etc. This is very TEDIOUS by manual means, as temps have to be taken every minute or so for ages, & hence insights suit automated data gathering.

See a simple 08M/DS18B20 setup => http://www.picaxe.orconhosting.net.nz/datds08m.jpg

With luck you may be able to stretch the budget to a crate of cold drinks (both still & fizzy) & even monitor exponential warming. Naturally left over drinks could be consumed - you can't ask for better project resources than that! Stan
 

Attachments

demonicpicaxeguy

Senior Member
You're right. Maybe the micro-perch has a transducer on it? I shall never believe what people tell me ever again!!


KAM: If you mention "Global Warming" or "CO2" in your request you'll get a huge grant. Remember to use the word "sustainable" at least five times per sentence to make you look serious. It works for thousands of scientists all over the world.
if in Australia don't forget the term "working families" as well
 

moxhamj

New Member
I like manuka's suggestion. He is suggesting this as a teacher who would be marking such a project, so his advice is well worth listening to.

You can take the cooling law further and start moving on to practical applications, such as measuring the thermal resistance of various heatsinks. You could even move on to the thermal resistance of thermoelectric coolers and some of the newer water coolers used in PCs.

The picaxe aspect is you can code the measuring in the picaxe (multiple temperature sensors, current, volts, watts) and then interface with a simple .net (vb/c etc) program that logs the data to an excel file.

And you can add "green" and "sustainable" and "global warming", as suggested by Dippy. I read somewhere recently that server farms consume the same amount of energy in the world as does aviation. And half the energy that goes into a server farm is not for running the computers, but rather is used for cooling them. And an air conditioner may not be the most efficient way of cooling. If you can design a better cooling system then you will save huge amounts of energy. Is it water cooling? Is it piping air around better? Is it spacing out the computers more? Is it using different heatsink materials? I don't know, but this project could well point to some answers.

Ok, not as "fun" as a robot. But likely to get more marks. And more likely to get completed. Do the robot at the same time at home as a hobby.

As an aside, manuka's graph looks a bit like the ones we used to hand up. Do the experiment in the wrong order. First work out the formula and plot a rough graph in pencil. Then do three experiments to work out the error bars. Then make up another 20 experiment points based on these error bars. Then go home early!

With a picaxe, you can actually measure all the data points. So this research will be of great benefit to working families.
 
Last edited:

kam

Member
Ok,

I guess i can give the teacher a pre proposal of the accelerometer and the temprature sensor.

I think the "sustainable" thing has better chances than the rest. I'll find out today.

Also I dont know how to write a VB code. But i can always get the data off the terminal and paste it to Excel.

Thanx
 

kam

Member
I'll put some vb code together for you.
Thanx DOC,

I would really appreciate that.

I'll let you know which one do i get approval for and then if you can make the interface for it.

I wasn't able to talk to my teacher today but got an appointment for tomorrow.

Thanx again.

Kam
 

moxhamj

New Member
Writing the full article with all the photos will take a few more days but in the meantime, here is a picaxe program and a vb.net program which are working fine. The vb.net program has one rich text box, one text box, one picture and 4 labels on the form. I do have all this working but I need the results of my own experiments before I post the full article (my experiment is to work out the capacity of a rechargeable battery, as I have a sneaking suspicion based on two tests so far that the ones made in china marked 2600mAH are actually 450mAH batteries.) I know what Dippy is going to say to that...

main:serin 3,N2400,("Data"),b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13
readadc10 1,w0' read the analog value on pin1 (physical leg 6)
readadc10 2,w1
serout 0,N2400,("Data", b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13)
goto main

and .net


Imports System.IO
Imports Strings = Microsoft.VisualBasic ' so can use things like left( and right( for strings
Public Class Form1
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Integer) ' for sleep statements
Dim WithEvents serialPort As New IO.Ports.SerialPort ' serial port declare
Dim PicaxeRegisters(0 To 13) As Byte ' registers b0 to b13
Dim ModifyFlag As Boolean
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Timer1.Enabled = True ' put this in code as defaults to false when created
Timer1.Interval = 5000 ' every 10 seconds
PictureBox1.BackColor = Color.Gray ' start with the comms boxes gray
ModifyFlag = False ' if modify a value manually then skip download
RichTextBox1.Multiline = True ' so can display more than one line
Label1.Text = "Picaxe communications; red=not working, green=ok"
Label2.Text = "Location of data file"
Label3.Text = "Date and time"
Label4.Text = "Picaxe registers"
TextBox3.Text = "c:\Datafile.csv" 'name and location of data file
Call DisplayPicaxeRegisters() ' display the 14 registers
End Sub
Sub SerialTxRx()
Dim DataPacket(0 To 17) As Byte ' entire data packet "Data"+14 bytes
Dim i As Integer ' i is always useful for loops etc
For i = 0 To 3
DataPacket(i) = Asc(Mid("Data", i + 1, 1)) ' add the word "Data" to the packet
Next
For i = 0 To 13
DataPacket(i + 4) = PicaxeRegisters(i) ' add all the bytes to the packet
Next
If serialPort.IsOpen Then
serialPort.Close() ' just in case already opened
End If
Try
With serialPort
.PortName = "COM1" ' Most new computers default to com1 but any pre 1999 computer with a serial mouse will probably default to com2
.BaudRate = 2400 ' 2400 is the maxiumum speed for small picaxes
.Parity = IO.Ports.Parity.None ' no parity
.DataBits = 8 ' 8 bits
.StopBits = IO.Ports.StopBits.One ' one stop bit
.ReadTimeout = 1000 ' milliseconds so times out in 1 second if no response
.Open() ' open the serial port
.DiscardInBuffer() ' clear the input buffer
.Write(DataPacket, 0, 18) ' send the datapacket array
Call Sleep(300) ' 100 milliseconds minimum to wait for data to come back and more if data stream is longer
.Read(DataPacket, 0, 18) ' read back in the data packet array
.Close() ' close the serial port
End With
For i = 4 To 17
PicaxeRegisters(i - 4) = DataPacket(i) ' move the new data packet into the register array
Next
PictureBox1.BackColor = Color.GreenYellow ' working
Catch ex As Exception
PictureBox1.BackColor = Color.Red ' not working
End Try
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Call SerialTxRx() ' send to the picaxe and read it back
System.Windows.Forms.Application.DoEvents() ' so windows doesn't hang
Call DisplayPicaxeRegisters() ' refresh registers on the screen
Call SaveRegistersToLocalFile() ' save numbers to file
Label3.Text = Now ' refresh date and time on screen
End Sub
Sub DisplayPicaxeRegisters()
Dim i As Integer
Dim registernumber As String
RichTextBox1.Multiline = True ' so can display more than one line in the text box
RichTextBox1.Clear() ' clear the text box
For i = 0 To 13
registernumber = Trim(Str(i)) ' trim off leading spaces
If i < 10 Then
registernumber = "0" + registernumber ' add 0 to numbers under 10
End If
RichTextBox1.AppendText(registernumber + " = " + Str(PicaxeRegisters(i)) + Chr(13))
Next ' chr(13) is carriage return so new line
End Sub
Sub SaveRegistersToLocalFile() ' save register array in a local text file
' use a file with extension .csv for excel (comma seperated)
Dim i As Integer
Dim DateTime As String
Dim LineOfText As String
FileOpen(1, TextBox3.Text, OpenMode.Append) ' open the text file named in the text box
For i = 0 To 13
LineOfText = LineOfText + Str(PicaxeRegisters(i)) + ","
Next
DateTime = Now
LineOfText = LineOfText + DateTime ' add the date
PrintLine(1, LineOfText)
FileClose(1) ' close the file
End Sub
End Class
 

vk6bgn

New Member
Hey KAM,

How about a physics project for testing the characteristics of a PICAXE at room temperature and then testing them again while the PICAXE is submerged in liquid Helium. (super conducting?) While interesting, it’s probably not really a particle project.

I really only wasted this post to reply to Dippy’s comment on page #2 of this thread about smuggling Foster beer. Hey Dippy, who drinks Foster beer mate? True blue, fair dink’um Aussie’s don’t even drink Fosters:)

"HamRadioAddict"
 

Tom2000

Senior Member
Hey KAM,

How about a physics project for testing the characteristics of a PICAXE at room temperature and then testing them again while the PICAXE is submerged in liquid Helium. (super conducting?) While interesting, it’s probably not really a particle project.

I really only wasted this post to reply to Dippy’s comment on page #2 of this thread about smuggling Foster beer. Hey Dippy, who drinks Foster beer mate? True blue, fair dink’um Aussie’s don’t even drink Fosters:)

"HamRadioAddict"
LOL! Liquid helium might fall slightly outside Microchips operating temperature range. But maybe you can use it to keep your Foster's cold. :)
 

Dippy

Moderator
I s'pose you could dip a PICAXE in Fosters... I'd sooner drink liquid helium. Mind you, both can make your voice go funny.
I might even PM you my joke about Fosters and Canoes. It started as a joke about Whitbread, but easily modified to suit.

DrAc: no, I won't comment. But a battery tester sounds good. Pukka ones are quite expensive.
 

hippy

Ex-Staff (retired)
I might even PM you my joke about Fosters and Canoes. It started as a joke about Whitbread, but easily modified to suit.
I thought it was with reference to Watney's which pre-dated that. Could this be the most recycled joke in the history of mankind ?
 

Dippy

Moderator
Oh, it might be Watney's. It seems the joke pre-dates me.
And yes, it's probably the oldest joke in the world apart from: Man walks into a bar. Ouch, it was an iron bar. And Man: "Doctor, I'm so worried, sometimes I think I'm a teepee and sometimes I think I'm a wigwam." Doctor "Relax, you're too tense".
 

manuka

Senior Member
Your Instructable is indeed a great idea- checking liquid in glass (LIG) thermometers every few minutes is akin to watching paint dry ! PICAXE dataloggers using DS18B20s are a breeze as well => www.picaxe.orconhosting.net.nz/datds08m.bas

However VB may not really be needed, as .csv variables can be easily read out & graphed from the PICAXE EEPROM, both under Excel or via such popular 3rd party programs as StampPLOT or StampDAQ ( both free?).

Yet another way to do this monitoring may be with cheap ($$) serial fitted DMMs on their temp. setting- most come with A1 graphing software. Stan
 

kam

Member
Hey every one,

Sorry for the late reply, but guess what I got it? My teacher gave me the approval.

I'll get on to it. right away. Also we modified the project idea. Um the picaxe wont have a problem getting data from 3 different inputs as im trying to get the data from a before, during and after experiment.

Thanx
 
Top