Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


SamJan

3 posts

Wannabe Geek


#236251 25-May-2018 13:25
Send private message

Hi all

 

First time posting here so please let me know if I have missed anything.

 

I am after a programmer to help me with a small home project, I am willing to pay a fixed price for the project which can be negotiated however I am looking to spend around $200 (envisaged to be 4h work).

 

Project Details

 

I will provide a block diagram of the code and its function.

 

I will also provide all hardware you recommend.

 

 

 

Program needs to read a RS232 signal at the push of a button & activate the output (a 12V relay).

 

Then read the signal again when button is released.

 

 

 

I am based in auckland and ideally would like someone based here so we can meet to discuss the solution, but am open to anywhere in NZ with skype catchups.

 

 

 

 

 

Basic overview

 

Hardware: Rpi + recommended I/O modules (I will purchase and supply)

 

OS: as you recommend

 

Input:

 

1x RS232 signal (from scales)

 

1x Push Buttion

 

Output

 

1x 12V relay or 5-20ma signal

 

 

 

Ideal person is someone who is familiar with Rpi home projects and is a wizz at coding (i think in python) but im open to suggestions on what will run best on the pi. From my limited programming experience i feel this will be max a couple of hours work for someone who knows what they are doing. I just dont have the time to learn right now.

 

 

 

My background

 

Mechanical engineer, exp in automation, MATLAB etc. making some home gadgets.

 

 

 

Please reply to this / email me directly with some information about yourself to discuss further.

 

 

 

Regards

 

 

 

Sam


Create new topic
frankv
5583 posts

Uber Geek

Lifetime subscriber

  #2022595 25-May-2018 19:01
Send private message

Um, "reading an RS-232 signal" doesn't quite make sense. RS-232 isn't an analog voltage or something you can read instantly... it's the hardware part of a serial data comms standard. And a name that is commonly misused. You'd also need to know the format of the data (baud rate, parity, etc) and data representation (binary, ASCII, or whatever). Hopefully your scales will repeatedly send the weight value in some known format, in which case your proposed scheme will work. It would probably be easier if the RPi could send a request to the scales for a reading rather than synchronizing with a flowing stream.

 

There's also the potential for key-bounce and deciding what constitutes a valid button-press (1ms, 10ms, 100ms, 1second?).

 

 


 
 
 
 

Protect your online activity with NordVPN (affiliate link).
Tinkerisk
3074 posts

Uber Geek


  #2022669 25-May-2018 22:36

He likes to read the data transferred via RS-232, not the waveform itself. This is a simple task for an Arduino - a Raspberry is overkill.





- NET: FTTH, OPNsense, 10G backbone, GWN APs, ipPBX
- SRV: HA server cluster, 0.1PB storage capacity on premise
- IoT:   thread, zigbee, tasmota, BidCoS, LoRa, WX suite, IR
- 3D:    two 3D printers, 3D scanner, CNC router, laser cutter


IOTEE
11 posts

Geek


  #2024322 28-May-2018 22:04
Send private message

Sounds like an interesting project!

 

Would it be possible to post the part number for the scale or a link to its data sheet? The manner in which the data is communicated via RS232 will largely determine the amount of time required to complete the code.

 

Most likely, you will need a RS232 to USB conversion cable (about $40). The python code will use the pyserial module to interpret the RS232 data. Button press and relay output are easily accomplished with the standard Rpi.gpio library. You will most likely need a very simple electronic circuit (really just a FET) to switch your Relay, as the output current from the Rpi is most likely not sufficient to power the coil on your relay.

 

I will send you an email with a bit more information.

 

Cheers!

 

 




frankv
5583 posts

Uber Geek

Lifetime subscriber

  #2024368 29-May-2018 06:43
Send private message

Standard 5V relay boards e.g. https://www.aliexpress.com/item/5V-2-Channel-Relay-Module-for-Arduino-PIC-ARM-DSP-AVR-Electronic-Raspberry-pi/32385866986.html work just fine with a RPi.

 

Make sure your 5V supply has enough grunt to power the relay coil as well as the RPi.

 

 

 

 


IOTEE
11 posts

Geek


  #2024391 29-May-2018 08:08
Send private message

Good suggestion regarding the relay board - quite inexpensive. Quite nice that it integrates DP817C optocoupler part on that board, one step better than the FET i was suggesting.


SamJan

3 posts

Wannabe Geek


  #2025903 30-May-2018 20:46
Send private message

Hi All

 

Thank you so much for all of your responses

 

So much good information.

 

 

 

Yes tinkerisk - the scales will be outputting a weight over RS232, and i just need to read that.

 

It looks like you can do it with a RS232 to USB converter, can you just do it via the GPIO, this seams simpler?

 

RPi may be overkill, however it allows expansion for future ideas, I can never seam to stop with these sort of projects.

 

 

 

FrankV - that breakout from Ali express looks perfect, I think Ill get that one! 

 

 

 

IOTEE thanks for getting in touch and for all the info.

 

 

 

 

 

Supplementary question:

 

Is it easy to take push button inputs from a switch via the GPIO?

 

I assume we can just treat it like a normal input akin to any industrial PLC. then denounce add delays etc, etc

 

 

 

Ill post some photos of the outcomes when I get there.

 

 

 

Cheers

 

 

 

Sam 

 

 


nova
145 posts

Master Geek

Trusted

  #2025962 30-May-2018 21:44
Send private message

Arduino compatible boards are probably the simplest option. I like the Wemos D1 that comes with wifi out of the box:

 

https://nicegear.nz/product/wemos-d1-mini

 

You can also get these cheaper from China if you want to wait. You should be able to hook up the serial connection to the tx and rx pins on the d1, but you can also get RS232 shields if you wanted.

 

 




frankv
5583 posts

Uber Geek

Lifetime subscriber

  #2026053 31-May-2018 07:15
Send private message

SamJan:

 

It looks like you can do it with a RS232 to USB converter, can you just do it via the GPIO, this seams simpler?

 

Is it easy to take push button inputs from a switch via the GPIO?

 

I assume we can just treat it like a normal input akin to any industrial PLC. then denounce add delays etc, etc

 

 

Yes, you can just connect a pushbutton to a GPIO pin. You can debounce in software or hardware (I think a resistor+capacitor would do the job... Google "debounce circuit"). Rather than debounce, you could use two buttons... one to take a reading, the other to trigger the relay.

 

Practically speaking, you can't input RS-232 to a GPIO pin on a RPi.

 

I think most Arduinos can read RS-232 via the micro-USB connector (with some suitable hardware). Certainly my 3D-printer which is essentially an Arduino Mega2560) talks RS-232 via a USB cable.

 

I like the Wemos D1 too.Cheap, low power, plenty of RAM, flash, and CPU power, and WiFi.

 

You could even do this with 2 D1s for less than the cost of a single RPi... one to read the RS232 from the scale and talk to the other (which controls the relay) via WiFi. The relay wouldn't have to be close to scale (could then be anywhere in the world). If the scale has 5V or 12V supply available (which is pretty likely), the first D1 (or the whole system) could be powered from that. I wouldn't like to power a RPi like that.

 

 


olivernz
361 posts

Ultimate Geek

ID Verified
Trusted
Lifetime subscriber

  #2026072 31-May-2018 08:34
Send private message

I'd continually read weight on RS-323 and only transmit last measured weight on button press and trigger relay. And to do that I'd use an ESP8266 based board. The full thing can be bought off AliExpress. Just need to cobble together some arduino code to do all that. Probably can get away with cut & paste on most of it.

SamJan

3 posts

Wannabe Geek


  #2026168 31-May-2018 12:39
Send private message

THANKS ALL, 

 

Overwhelmed with the support for a Noob :-) 

 

looks like it is possible to complete this without a Rpi with the 2 solutions posted above.

 

I have not mentioned in this post that eventually I may want to add a screen and a barcode printer.

 

Given the possibility of future expansion and the fact that this is a one off build, I feel that a RPi is the way to go. 

 

If i were producing these, then the simpler chips may in fact be the best option. does this sound sensible?

 

 

 

Also with my level of skill, programming a Pi should be easier??? more tutorials, maybe slightly more general support out there? Or at the end of the day they will actually be running the same script in the same language, just the addresses of the I/O changes.

 

@OliverNZ sounds like you are doing exactly what I want to do, May i ask what scales you are using?

 

More questions, sorry team! 


olivernz
361 posts

Ultimate Geek

ID Verified
Trusted
Lifetime subscriber

  #2026196 31-May-2018 13:07
Send private message

No sorry, i don't have any scales hooked up. Just from what you said.

Create new topic





News and reviews »

New Air Traffic Management Platform and Resilient Buildings a Milestone for Airways
Posted 6-Dec-2023 05:00


Logitech G Launches New Flagship Console Wireless Gaming Headset Astro A50 X
Posted 5-Dec-2023 21:00


NordVPN Helps Users Protect Themselves From Vulnerable Apps
Posted 5-Dec-2023 14:27


First-of-its-Kind Flight Trials Integrate Uncrewed Aircraft Into Controlled Airspace
Posted 5-Dec-2023 13:59


Prodigi Technology Services Announces Strategic Acquisition of Conex
Posted 4-Dec-2023 09:33


Samsung Announces Galaxy AI
Posted 28-Nov-2023 14:48


Epson Launches EH-LS650 Ultra Short Throw Smart Streaming Laser Projector
Posted 28-Nov-2023 14:38


Fitbit Charge 6 Review 
Posted 27-Nov-2023 16:21


Cisco Launches New Research Highlighting Gap in Preparedness for AI
Posted 23-Nov-2023 15:50


Seagate Takes Block Storage System to New Heights Reaching 2.5 PB
Posted 23-Nov-2023 15:45


Seagate Nytro 4350 NVMe SSD Delivers Consistent Application Performance and High QoS to Data Centers
Posted 23-Nov-2023 15:38


Amazon Fire TV Stick 4k Max (2nd Generation) Review
Posted 14-Nov-2023 16:17


Over half of New Zealand adults surveyed concerned about AI shopping scams
Posted 3-Nov-2023 10:42


Super Mario Bros. Wonder Launches on Nintendo Switch
Posted 24-Oct-2023 10:56


Google Releases Nest WiFi Pro in New Zealand
Posted 24-Oct-2023 10:18









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.







Pluralsight