Hello from Yorkshire

User avatar
Rick Kimball
Posts: 1077
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Hello from Yorkshire

Post by Rick Kimball » Fri Jan 06, 2017 3:57 pm

BennehBoy wrote:BTW could anyone point me at a good reference for doing analogue voltage translation from 5v to 3.3v
Are you actually reading analog values or digital? Many of the maple mini pins are 5v tolerant if it is digital.

See the chart for the 5 V Tolerant ones:

http://wiki.stm32duino.com/index.php?ti ... Pinout.svg
-rick

User avatar
BennehBoy
Posts: 500
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Post by BennehBoy » Fri Jan 06, 2017 4:08 pm

racemaniac wrote: ehh, just a voltage divider? 2 resistors (or a potentiometer, then you've got an adjustable voltage divider)
https://en.wikipedia.org/wiki/Voltage_divider
This is what I intended to do, but after doing some searches people were suggesting all manner of craziness, opto isolators, opamps, etc etc.

I'm a relative novice so wanted to make sure I wasn't about to fry the STM32s when they arrive.

KISS FTW.
Rick Kimball wrote: Are you actually reading analog values or digital? Many of the maple mini pins are 5v tolerant if it is digital.
Reading analogue values - for example the boost sensor (MAP) that I'm using it driven from vehicle power (12 to 14.5v) and outputs a 0-4v DC signal, scaled linearly 1v= -1 bar, 4v= +3bar
Last edited by BennehBoy on Fri Jan 06, 2017 4:11 pm, edited 1 time in total.
-------------------------------------
https://github.com/BennehBoy

User avatar
Rick Kimball
Posts: 1077
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Hello from Yorkshire

Post by Rick Kimball » Fri Jan 06, 2017 4:10 pm

That MAX13xx device you mentioned is 3.3v .. and talks via SPI. What else are you reading and how ?
-rick

User avatar
BennehBoy
Posts: 500
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Post by BennehBoy » Fri Jan 06, 2017 4:13 pm

Rick Kimball wrote:That MAX13xx device you mentioned is 3.3v .. and talks via SPI. What else are you reading and how ?
See previous post edit. I'm quite confident about driving the MAX since I'm already running that at 3.3v with the nano. (it is 5v tolerant on the SPI lines).
-------------------------------------
https://github.com/BennehBoy

User avatar
BennehBoy
Posts: 500
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Post by BennehBoy » Fri Jan 06, 2017 4:15 pm

I'm also reading NTC thermistors, but am driving those at 3.3v with 1kohm pulldown/divider so not an issue. Steinhart/hart beta coefficient to work out the temp.
-------------------------------------
https://github.com/BennehBoy

User avatar
Rick Kimball
Posts: 1077
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Hello from Yorkshire

Post by Rick Kimball » Fri Jan 06, 2017 4:17 pm

If they are truly analog you will need to use a voltage divider or it will fry the analog peripheral.
-rick

User avatar
BennehBoy
Posts: 500
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Post by BennehBoy » Fri Jan 06, 2017 4:33 pm

Rick Kimball wrote:If they are truly analog you will need to use a voltage divider or it will fry the analog peripheral.
Yup will do, and yes it's truly analogue.... photo of bench test circuit below...

Image

It's a bit of a rats next, but essentially there's:
* a TSSOP14 to DIP adaptor housing the MAX31856, connected via Software SPI to the Nano
* a small amount of input circuitry on a daughter stripboard for the K-type, basically capacitors for filtering.
* pull down resistors for some of the analogue inputs - I've just been adding some fault detection code which flashes a warning graphic if a sensor is disconnected
* Software SPI to a single OLED display - unfortunately I've had to drive the OLED's and MAX from different software SPI buses because the libraries stomp on one another.
* Voltage divider/pulldown for the Bosch NTC M12 ( 0 280 130 026) Analogue input - already being driven at 3.3 volts.

Not pictured is the boost sensor part, because it's in the vehicle on the existing production setup. This is the part being used -> https://www.aliexpress.com/item/New-Hig ... 21605.html

There are probably other better choices but this part is the most economical that covers the range of pressures that I need.

I've found some posts on the forum that seem to suggest issues with multiple devices on the same h/w SPI bus, is this still the case?
-------------------------------------
https://github.com/BennehBoy

User avatar
BennehBoy
Posts: 500
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Post by BennehBoy » Fri Jan 06, 2017 4:41 pm

Here's the production system in the vehicle, minus any sensors hooked up I hasten to add!

Image

And this is my first love that it's monitoring :D

Image
-------------------------------------
https://github.com/BennehBoy

User avatar
BennehBoy
Posts: 500
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Post by BennehBoy » Sat Jan 07, 2017 4:46 pm

I've put the code on github if anyone is interested.

https://github.com/BennehBoy/LRDuino
-------------------------------------
https://github.com/BennehBoy

User avatar
BennehBoy
Posts: 500
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Hello from Yorkshire

Post by BennehBoy » Wed Feb 07, 2018 8:44 am

I thought I may as well add some bio info - seems to be a micro trend just now :D

I've always been a lover of technology, from an early age I was disassembling things and most importantly correctly reassembling them.

Although I was a reasonably good artist I followed a scientific education which culminated in a degree in the burgeoning subject of Information Technology during the very early 1990's. I was not academic, but a hands on engineering type. The course was a feeder for technology companies (mainly telecoms) and covered information theory, electronics, mathematics, C programming, 4GL/DB, PLC's, Embedded devices, etc.

It was a great way to expand upon the computer science theory I had acquired during my O & A levels, and to augment my fledgling electronics & programming repertoire. Not to mention the booze, socialising & girls. Prior to this I had owned a VIC20, C128, and an Amiga 500, self learning 6502 assembly language/machine code, and C on the Amiga: I never bothered with 68k assembly in any detail but I had a cottage industry at school of breaking rudimentary copy protection and uplifting games from tape to floppy for the C64 - pretty simple when you have the hardware reference manual (ROM Kernal Manual) and can understand why the machine code loaders are poking certain values into registers/page 0.

Unfortunately, just as I graduated, the 90's recession really kicked into swing - my work placement year with a mobile phone manufacturer (Orbitel) fell through due to them making redundancies - although I did get to tour their facilities and see the state of the art SMD reflow line they had.

So, I scrambled about and got a job at the bottom rung of the ladder working in a High School as an IT technician. This turned out to be a great learning experience, had my first encounters with ARM - Acorn Archimedes computers, fixed the school's Econet Server and Network. Introduced a thin wire Ethernet network, Windows NT server, classroom of WFWG client PC's, Learned Netware by maintaining the school's administration network, and began playing with linux.

A brief stint at a local council followed where I grew my wintel experience, desktop support, server support, more ethernet, lots of other comms and esoteric hardware and software, GIS systems, Ice prediction, CAD. etc. This involved lots of floppy disks & tape drives carried in car boot to physically visit the myriad locations that the council operated - there was no cash for a network - everything was still vested in the BULL DPX mainframe and serial comms to green screen terms.

With a move to work in the IT dept of the local University I steadily fell further into the intel side of things with a concentration on NOS systems, Netware 3.x & 4.x, NT 3.x & 4.x, Linux, and E-mail systems, Pegasus, MSMail, Exchange. Really cut my teeth here on industrialising IT, automated deployments of multiple labs full of PC's - self rebuilding via network boot roms, dealing with registering 30000 users every year uniformly across ~ 300 different systems... This was just as large directory services were coming into their own, but even these had limits on objects.

I moved back into the commercial world with a move to a call center company where I saw out the Y2K frenzy and stagnated somewhat in terms of skills, this saw me jump ship to a .net startup whose mission was to provide online FPS game servers, things went well until our venture capitalist (owner by a competitor who joined the market after us) pulled the funding plug - we were in discussion with a huge console manufacturer at the time to provide all their server infrastructure. Ah well. I'm really good at online games :D

About this time I got some code in the linux kernel, it was tiny, it checked endianness in the Amiga fast file system port so that the code would function on x86 as well as MC68K, but I like to call it out for geek factor.

Next job after the folding of the gaming company was with a heavy manufacturer in the concrete, stone, and aggregates industry. Here I built a geographically separated failover DC & ISP provision. This covered some huge SQL db's and cubes, HPUX based ERP, web, internet e-mail, windows servers, corp email, and finance systems, all sat on EMC fibre connected Storage. Another huge learning opportunity.

And from there a brief stint contracting which led me to my present employer where I'm now in middle management, but still in the IT game.

Along the way I acquired a Land Rover, and that brought me here after mucking about briefly with an Arduino Nano.
-------------------------------------
https://github.com/BennehBoy

Post Reply