Jump to content

C++ Newbie: What do I do now?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
9 replies to this topic

#1
king.oslo

king.oslo

    Newbie

  • Members
  • Pip
  • 6 posts
Hello there,

I feel comfortable writing OO in php and javascript, and recently read some tutorials about c++ and would like to go ahead and have some fun. These tutorials showed me how to write some simple programs that I compiled with Code::blocks. That was fun.

What I want to do now is to take input from a temperature sensor inside a water-kettle and the computer clock to switch on/off power supply to a 230V water pump and adjust the flame of a gas burner.

The problem is I have no idea how to get myself set up to experiment with these things. I already have a water pump, but need the other things.

My questions:
1. where can I buy them?
2. any advice you think I should have, I will be forever grateful!

Thank you for your time.

Kind regards,
Marius

#2
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts
Er du norsk? :)

Okay for a normal external temperature sensor, check out Biltema or Clas Ohlson (I'm assuming you are Norwegian here). I don't know how you are planning to control this from the computer, though.. For the gas burner, it depends how powerful it needs to be. I know there are lots of them to be found in German web-shops, if that helps.. Could check out ebay.de. Or finn.no :)

Advice: Be careful with that gas burner! :D But again, how are you planning to control this from the computer?
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#3
JCoder

JCoder

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 245 posts
Gas burner controlled by a C++ program run on a PC computer...
Its like landing a Boeing 767 using handheld Garmin navigation system.
You must be insane. :w00t:

#4
king.oslo

king.oslo

    Newbie

  • Members
  • Pip
  • 6 posts

JCoder said:

Gas burner controlled by a C++ program run on a PC computer...
Its like landing a Boeing 767 using handheld Garmin navigation system.
You must be insane. :w00t:

I thought about controlling the it with a servo. Many gas burners have a wheel where you can turn it up or down. What do you think of that idea? :)

#5
king.oslo

king.oslo

    Newbie

  • Members
  • Pip
  • 6 posts

marwex89 said:

Er du norsk? :)

Okay for a normal external temperature sensor, check out Biltema or Clas Ohlson (I'm assuming you are Norwegian here). I don't know how you are planning to control this from the computer, though.. For the gas burner, it depends how powerful it needs to be. I know there are lots of them to be found in German web-shops, if that helps.. Could check out ebay.de. Or finn.no :)

Advice: Be careful with that gas burner! :D But again, how are you planning to control this from the computer?

In Norwegian:

Ja jeg er norsk! Så kult å treffe på en annen nordmann! Jeg har et ølbryggeri og tenkte å forsøke å helautomatisere det med et enkelt program :) Det er to store tanker, og så har jeg en pumpe som flytter væskene fra den ene tanken til den andre, og vice versa. Jeg trenger at programmet mitt kan skru på/kutte strømmen til denne. Ellers har jeg en 200 kW gassbrenner (koke opp 1000 liter på en halvtime og høres ut som et jetfly :P ) og i forhold til å kontrollere den fra en pc tenkte jeg å bruke en servo.

Kan jeg koble clas Ohlson biltema sensor til pcen? Åssen fungerer det? Også trenger jeg en måte å stenge av/skru på strømmen til pumpa.

In English:
Yes, I am Norwegian! How cool meeting another Norwegian! I have a beer brewery that I am planning to automate with a simple program :) I have two large kettles and a pump that moves the liquids from one container to the next, and vice versa. I need my program to be able to switch on/off the power supply to this pump. Apart from that, I have a 200 kW gas burner (boils 1000 liters in half an hour and sounds like a jet engine :P ) and I was planning controlling it with a servo.

Can I connect the Clas Ohlson or Biltema sensors to the computer? (my guess is that these sensors weren't built for use on a computer) How does that work? And I need a way to switch on/cut the power supply to the pump.

Thank you for your time.

Kind regards,
Marius

#6
grisha

grisha

    Learning Programmer

  • Members
  • PipPipPip
  • 35 posts
Try to test it on a desert :) Seriously, I think that usage of a microcontroller could be much better - ATMega, STM8? They can be easy programmed using C.

The electical part of the project strongly depends on the mechanisms used in the target burner - but dealing with high voltages will be hard if you don't know much about circuit development. Hardware programming is great - I don't know what experience you have, but this thingy can be dangerous.

#7
king.oslo

king.oslo

    Newbie

  • Members
  • Pip
  • 6 posts

grisha said:

Try to test it on a desert :) Seriously, I think that usage of a microcontroller could be much better - ATMega, STM8? They can be easy programmed using C.

The electical part of the project strongly depends on the mechanisms used in the target burner - but dealing with high voltages will be hard if you don't know much about circuit development. Hardware programming is great - I don't know what experience you have, but this thingy can be dangerous.

I am not 100% sure whether you, and others think I am picturing in my head without a brilliant illustration :P

Posted Image

Can I do something like this? What is the closest to this I can expect?

Thank you for all your input! :)

Kind regards,
Marius

#8
JCoder

JCoder

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 245 posts
There should be an independent security system that cuts off the gas burner if the temperature exceeds the limit.
Otherwise, what would happen if your OS hung while the gas burner was in the maximum position? What if your C++ program breaks?
Do you have any idea on the algorithm to control the temperature?

I think the idea of controlling it with a self-written program is just pure insane. Buy a PID controller and you are done. It would definitely be cheaper than a PC.

#9
king.oslo

king.oslo

    Newbie

  • Members
  • Pip
  • 6 posts

JCoder said:

There should be an independent security system that cuts off the gas burner if the temperature exceeds the limit.
Otherwise, what would happen if your OS hung while the gas burner was in the maximum position? What if your C++ program breaks?
Do you have any idea on the algorithm to control the temperature?

I think the idea of controlling it with a self-written program is just pure insane. Buy a PID controller and you are done. It would definitely be cheaper than a PC.

Safety system is a good idea!

Where may I buy the sort of components I need, PID, controller of the components, and the servos and thermometer and power switch (is this kind of power switch called a relay).

Thank you for your time.

Kind regards,
Marius

#10
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts
You know, this is more of an electronics problem than a computer programming problem, when you think about it... When it comes to electronics, you could check out elfa or farnell for parts
Not sure about the servo. If you go with an electronics-based solution, the biltema/clas ohlson sensor type might work. Not sure about that... I'd check with an electronics-guru for that :D
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa